Repository navigation
[PM-45737] Add writing-end-to-end-tests skill - #24151
Conversation
Guide agents writing Playwright tests in e2e/: where fixtures and helpers live, locating elements only by test id (adding missing ones to templates), and running the tests before calling them done.
Claude Code validationResult: Pass Re-reviewed One correction to the previous report, which this comment replaces: its fix for Finding 5 pointed at the module filenames in Not covered: The configuration and security review covers no file in this changeset. The only changed path is a Findings
|
Key management owns the e2e suite, so it owns the skill that guides writing tests for it.
This reverts commit afb88b1.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adds one new file, Not covered: Skill review did not run. This review path cannot launch |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24151 +/- ##
==========================================
+ Coverage 59.82% 60.23% +0.40%
==========================================
Files 4723 4776 +53
Lines 149790 151810 +2020
Branches 23909 24248 +339
==========================================
+ Hits 89615 91436 +1821
- Misses 53947 54066 +119
- Partials 6228 6308 +80 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SaintPatrck
left a comment
There was a problem hiding this comment.
FYI @kdenney and @awiester-bw. I know you've been working on testing components. Might be worth collaborating with @quexten here to make sure we're not duplicating work or creating competing components.
|
@SaintPatrck Currently, this skill covers writing playwright e2e tests within the The testing tools: Is there any other effort you are referring to? |
|
@SaintPatrck Okay, after looking over it, the related effort https://github.com/bitwarden/ai-plugins/pull/212/changes#diff-243aa645e4b979d8704b8f196512b0ea47e03a67197f454850716c12cceda153 seems also orthogonal. That one ad-hoc assembles based on natural language a playwright script meant to run once. The repo's e2e tests are meant to be stable tests of behavior, not one-time validations. |
The e2e README asks other teams not to contribute yet, existing helpers use CSS and role locators, and non-web suites need a display on Linux. Align the skill with all three so agents do not spread the suite, rewrite helpers or chase a missing $DISPLAY.
An unquoted colon-space in the description broke frontmatter parsing.
| - Tests: `e2e/tests/<web|browser|desktop|shared>/**/*.e2e.ts`. `shared` holds flows spanning clients. | ||
| - Fixtures: `e2e/src/browser/fixtures.ts` (extension in a persistent Chromium context), `e2e/src/desktop/fixtures.ts` (Electron). Web tests use Playwright's own `page`. | ||
| - Page helpers: `e2e/src/<client>/*.ts` and `e2e/src/*.ts` (e.g. `LoginPage`, `LockScreen`). Reuse one before writing a new one. | ||
| - Client internals (feature flags, lock state, fake biometrics): `automationDriver(page, "<capability>")` in `e2e/src/automation-driver.ts`, backed by `libs/automation-driver`. Prefer it over poking app state through `page.evaluate`. |
There was a problem hiding this comment.
Something i'm not sure on; should we give concrete references here? Like: "If you want to emulate biometrics, use X" etc?
There was a problem hiding this comment.
💭 My general rule of thumb is to provide concrete references and detailed explanations or reasoning only after you observe the agent struggling.
Frontloading excess information without proof it's necessary often results in bloat that complicates ablation later, as the models improve.
When you feel concrete references are necessary, they're best isolated in reference/ files, to take advantage of progressive disclosure.
There was a problem hiding this comment.
Makes sense, we'll look into it as we use it then, thank you!
|
Agree with @quexten that this is orthogonal to the playwright testing skills I'm working on. Removed myself from reviewers to not hold up this pr. |
|
Also removing as this is orthogonal to PR282. |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-45737
📔 Objective
Add a
writing-end-to-end-testsskill for Playwright tests ine2e/:data-testids to templates in the same change.📸 Screenshots
n/a