Skip to content

Integration qr recognition test#3

Merged
stesee merged 2 commits into
mainfrom
integration-qr-recognition-test
Jun 19, 2026
Merged

Integration qr recognition test#3
stesee merged 2 commits into
mainfrom
integration-qr-recognition-test

Conversation

@stesee

@stesee stesee commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 19, 2026 22:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end Playwright integration test harness to validate webcam-based QR recognition using a fake camera stream, and wires it into CI along with updated documentation.

Changes:

  • Add Playwright config, integration spec, and an HTML harness page to exercise QR scanning via a fake camera stream.
  • Add a minimal static HTTP server used by Playwright’s webServer to serve the repo artifacts during the test run.
  • Add @playwright/test, a test:integration script, CI workflow execution, and README instructions for running the integration test.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents how to run the new Playwright integration test.
playwright/support/static-server.cjs Adds a local static file server used by Playwright’s webServer.
playwright/qr-recognition.integration.spec.js New Playwright test asserting QR payload decode from the fake camera stream.
playwright/fixtures/qr-camera-harness.html Browser harness page that starts QrScanner and exposes scan state for the test.
playwright.config.js Playwright configuration: fake camera stream flags, webServer, baseURL, permissions.
package.json Adds @playwright/test and test:integration script.
.github/workflows/release-branch.yml Runs build + integration test on push; creates GitHub release on release branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +28
const requestUrl = new URL(request.url, `http://${request.headers.host}`);
let filePath = path.normalize(path.join(rootDir, decodeURIComponent(requestUrl.pathname)));

if (!filePath.startsWith(rootDir)) {
response.writeHead(403);
response.end('Forbidden');
return;
}
Comment thread README.md

```batch
npx playwright install chromium
npm run test:integration
Comment on lines +19 to +26
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

Comment on lines +8 to +10
permissions:
contents: write

@stesee
stesee merged commit cf57a36 into main Jun 19, 2026
2 checks passed
@stesee
stesee deleted the integration-qr-recognition-test branch June 20, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants