Conversation
There was a problem hiding this comment.
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
webServerto 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; | ||
| } |
|
|
||
| ```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 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.