Conversation
Give coverage scoring a stable list of product behaviors, with prefix and category legends, instead of treating a route hit as full coverage.
Match catalog cases to current specs (--full, --out, --json) and detect stub pages from page source so the hardcoded route list is not required.
Expose the coverage script as a frontend yarn command.
Describe how to run the regenerable report and how to add a catalog row.
Make the catalog easier to read by walking through what an id means and when a row is covered, partial, or missing.
Show why a case is missing, coverage by category, and which test title counted so loose matches are visible.
Print summary, categories, and missing rows with no flags. Use --verbose for every row and --routes for the old URL table.
✅ Deploy Preview for activist-org ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Thank you for the pull request! ❤️The activist team will do our best to address your contribution as soon as we can. The following are some important points:
Note activist uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
|
@aasimsyed I kind of understand what you did here but maybe break it up and clean the code here so that if someone hops on can understand what is happening. Maybe create a parser folder since you are doing so with each file within a folder called coverage and maybe once cleaning and refactoring is done we can bring it in and maybe we could run it as a separate test for e2e. Right now, as it is. Having files of 1000 lines is not great and I think this could be separated made cleaner. |
Split the two ~1,000-line files (scripts/e2e-coverage.mjs, scenario-matrix.mjs) into utils/, parsers/, catalog/, scoring/, and report/ modules. CLI flags and output are unchanged. Old import paths stay as thin shims.
Nothing imports it once the catalog lives in e2e-coverage/catalog/.
Fails a local run when required scenario coverage drops below the baseline in scoring/constants.mjs. Not wired into default e2e CI. Skips global-setup auth since the gate only does static analysis.
Point catalog edits at e2e-coverage/catalog/flows/, add the folder README, and document yarn test:e2e:coverage:gate.
The next two commits close the gap this uncovers.
- Defer org/group PERM rows: that role-based UI is still in development - Tighten S-INT-01 and C-VAL-01 matchers so a page-load spec cannot also claim behavior it does not test - Drop H-INT-04/H-INT-05: duplicates of S-INT-01 and T-INT-03 - Defer T-INT-03: /home has no query handler wired to its topic filter
Adopt the FAQ suite's pattern for event, organization, and group resources: one test walks create, update, and delete against the real API, replacing separate create/edit/delete tests that a validation or server-error spec could partially satisfy. Consolidate each surface's three CRUD catalog rows into one that matches the new test name. Closes the gap the 90% gate raised, from 89% to 91%.
yarn test:e2e:coverage now passes --out, so the markdown report is always saved alongside stdout. Output stays under the gitignored test-results/ directory.
Lead with a concrete c(...) example, reorder subsections so adding a scenario comes before reference tables, and note the gate's known limitations (no CI enforcement, fragile title matching, manual staleness cleanup, a calibrated rather than derived 90% threshold).
|
Fair callout, those files had grown past the point of being readable in one sitting. done: split done: also added the optional |
|
@aasimsyed how much time it takes to run it if we do so? |
|
@nicki182 Ran it locally a few times, consistently ~1s wall clock, 300ms of that is the actual assertions. It's a static scan of source files, no browser or server, so that cost wouldn't grow with the size of the E2E suite the way the real Playwright job does. |
|
@andrewtavis what do you think of adding it in the ci tests? |
Contributor checklist
Description
Route coverage still counts a page as done if a spec opens the URL. This adds a required-scenario catalog and scores it against current specs.
frontend/test-e2e/e2e-coverage/catalog/flows/: catalog of flows and cases, one file per flow (e.g.events.mjs), withID_PREFIXESandCATEGORIESlegends (EF-PERM-01= event FAQ, permissions, first case)frontend/test-e2e/e2e-coverage/{utils,parsers,catalog,scoring,report}/: coverage engine. Old import paths (scripts/e2e-coverage.mjs,scenario-matrix.mjs) stay as thin shims--verboseprints every row and thetest()titles that counted.--routesis the old URL table.--outwritesfrontend/test-results/e2e-coverage-latest.md(gitignored, and now on by default)@coveragePlaywright gate (yarn test:e2e:coverage:gate): fails a local run when required scenario coverage drops below the 90% baseline. Static analysis only, no browser needed, not wired into default e2e CI:underDevelopmentor an empty template (not a hardcoded list). Does not close Remove stub route detection from e2e-coverage.mjs #1972yarn test:e2e:coverageand docs inFRONTEND_TESTING.md, including the gate's known limitations (no CI enforcement, fragile title matching, manual staleness cleanup, a calibrated rather than derived 90% threshold)From
frontend/:yarn test:e2e:coverage(same asnode test-e2e/e2e-coverage/scripts/e2e-coverage.mjs).Related issue