feat(js): add playwright+mocha test to capture test context#267
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Playwright + Mocha example (js/playwright/capture-context) showing how to manually attach Mocha test context (test file path + title path) to axe Watcher scans via PlaywrightController.setTestContext(...), addressing watcher-examples issue #268.
Changes:
- Introduces a Mocha test suite that creates a fresh Playwright page per test and sets/clears axe Watcher test context in
beforeEach/afterEach. - Adds a second “logout” flow test to demonstrate multiple tests with distinct context.
- Adds a minimal
package.jsonto run the example with Mocha.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| js/playwright/capture-context/tests/login.js | New Mocha + Playwright tests wiring setTestContext per-test and clearing it after flushing. |
| js/playwright/capture-context/package.json | New example package config (deps + mocha test script). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Failing smoke test is not relevant to this. Seems like a flake. |
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.
Adds a new js/playwright/capture-context example demonstrating how to attach Mocha test context (file path + title path) to axe Watcher scans via PlaywrightController.setTestContext.
Closes - #268