Skip to content

Add QR integration test and fix CI web server path#4

Merged
stesee merged 3 commits into
releasefrom
main
Jun 19, 2026
Merged

Add QR integration test and fix CI web server path#4
stesee merged 3 commits into
releasefrom
main

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:55
@stesee stesee merged commit dc1c299 into release Jun 19, 2026
2 checks passed

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

This PR adds a Playwright-based end-to-end integration test that verifies webcam QR recognition using a fake video stream, and wires it into CI via a dedicated static file server and a new GitHub Actions workflow.

Changes:

  • Added Playwright integration test + HTML harness that scans a QR code from a fake camera stream.
  • Added a lightweight Node static server used by Playwright webServer to serve repo files during tests.
  • Updated docs/packaging/CI to support running the integration test and publishing release-branch artifacts.

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 locally.
playwright/support/static-server.cjs Adds a static server used by Playwright to serve the test harness and built assets.
playwright/qr-recognition.integration.spec.js New Playwright spec asserting QR decode output and corner points.
playwright/fixtures/qr-camera-harness.html Browser harness that starts QrScanner against the fake camera stream and exposes scan state.
playwright.config.js Configures Playwright (fake camera stream, baseURL, and webServer command/url).
package.json Adds @playwright/test and a test:integration script.
.github/workflows/release-branch.yml New CI workflow that builds, runs integration tests, and conditionally creates a 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 +8 to +10
permissions:
contents: write

Comment on lines +24 to +26
- name: Install dependencies
run: npm install

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