Goal
Consolidate frontend E2E from Jest/Puppeteer to Cypress; keep Python Playwright for backend/embeddings E2E (separate concern).
Context
Frontend browser E2E is effectively dead on main today:
yarn test:e2e runs Jest (package.json), but application/frontend/src/test/basic-e2e.test.ts is fully commented out (legacy Puppeteer)
.github/workflows/e2e.yml is entirely commented out — E2E does not run in CI
jest-puppeteer / puppeteer remain in package.json as dead tooling
Playwright in this repo is Python-only (application/prompt_client/ for embeddings/scraping). It is not the frontend E2E runner. make install-python must keep playwright install.
Two open PRs overlap on Cypress migration (see Pending merges):
- #729 — restore Cypress under
application/frontend/src/test/cypress/, re-enable e2e.yml
- #774 — fuller migration: root
cypress.config.js, cypress/e2e/smoke.cy.js, stabilized make e2e, switches test:e2e to cypress run
Related: #523 (fix e2e tests).
Implementation instructions
0. Playwright guardrail (dependency — do first)
1. Document legacy Jest/Puppeteer coverage
Read application/frontend/src/test/basic-e2e.test.ts (commented) and record what routes/flows it covered. Historical coverage included:
| Flow |
Route / behavior |
| Homepage search UI |
/ — #SearchBar visible, contains "Search" |
| No-results search |
/ → search asdf → "No results match your search term" |
| Successful free-text search |
/ → search crypto → results with standards + CREs |
| Standard browse |
/node/standard/ASVS — heading, pagination, section link, external reference, CRE link |
| CRE search by ID |
/ → search 558-807 → CRE title, nested accordion |
| CRE filter (case-insensitive) |
/cre/558-807?applyFilters=true&filters=asvs and filters=ASVS |
| Smartlink redirect |
/smartlink/standard/CWE/1002 → /node/standard/CWE/sectionid/1002; /smartlink/standard/CWE/404 → external CWE URL |
2. Migrate to Cypress
3. Wire Cypress into CI
4. Keep Python Playwright separate
5. Cleanup (in scope or follow-up PR)
Success criteria
All must pass before closing this issue:
Pending merges
| Item |
Status |
chore/playwright-install-guardrail (69049e3) |
Remote branch exists; no open PR; not on main |
| #774 |
Open — recommended base for consolidated work |
| #729 |
Open — supersede/close after consolidation |
| #732 |
Open — Cypress Makefile integration (stale, Test check failing) |
.github/workflows/e2e.yml on main |
Fully commented out — E2E not in CI |
PRs to merge/close
| PR |
Action |
| #774 |
Base for consolidated migration (after playwright guardrail) |
| #729 |
Close as superseded |
chore/playwright-install-guardrail |
Open PR and merge first (or include in consolidated PR) |
Goal
Consolidate frontend E2E from Jest/Puppeteer to Cypress; keep Python Playwright for backend/embeddings E2E (separate concern).
Context
Frontend browser E2E is effectively dead on
maintoday:yarn test:e2eruns Jest (package.json), butapplication/frontend/src/test/basic-e2e.test.tsis fully commented out (legacy Puppeteer).github/workflows/e2e.ymlis entirely commented out — E2E does not run in CIjest-puppeteer/puppeteerremain inpackage.jsonas dead toolingPlaywright in this repo is Python-only (
application/prompt_client/for embeddings/scraping). It is not the frontend E2E runner.make install-pythonmust keepplaywright install.Two open PRs overlap on Cypress migration (see Pending merges):
application/frontend/src/test/cypress/, re-enablee2e.ymlcypress.config.js,cypress/e2e/smoke.cy.js, stabilizedmake e2e, switchestest:e2etocypress runRelated: #523 (fix e2e tests).
Implementation instructions
0. Playwright guardrail (dependency — do first)
playwright installstays ininstall-python(Makefile) — required forapplication/prompt_client/chore/playwright-install-guardrail(commit69049e36) before or as part of this work — documents the guardrail in Makefile + AGENTS.md1. Document legacy Jest/Puppeteer coverage
Read
application/frontend/src/test/basic-e2e.test.ts(commented) and record what routes/flows it covered. Historical coverage included:/—#SearchBarvisible, contains "Search"/→ searchasdf→ "No results match your search term"/→ searchcrypto→ results with standards + CREs/node/standard/ASVS— heading, pagination, section link, external reference, CRE link/→ search558-807→ CRE title, nested accordion/cre/558-807?applyFilters=true&filters=asvsandfilters=ASVS/smartlink/standard/CWE/1002→/node/standard/CWE/sectionid/1002;/smartlink/standard/CWE/404→ external CWE URL2. Migrate to Cypress
e2efixes, rootcypress.config.js, smoke suite,package.jsonscripts)package.json:test:e2e→cypress run; addcypress:open/cypress:run; addcypressdevDependencycypress.config.js+cypress/e2e/suite (start with smoke, expand toward legacy coverage)cypress.jsonand commented/deletedbasic-e2e.test.tsmake e2e: deterministic Flask on127.0.0.1:5000, readiness wait, trap cleanup (from fix(e2e): complete Cypress migration and stabilize make e2e for #523 #774)form#search-bar, semantic roles) over brittle CSS chains3. Wire Cypress into CI
.github/workflows/e2e.yml(or equivalent job) so PRs run Cypress smoke E2Ee2e.ymlon main is fully commented)deploy.yml,deploy-staging.yml) can depend on a greenTest-e2ejob again4. Keep Python Playwright separate
application/tests/that use Playwright (e.g.prompt_client_pdf_embeddings_test.py, embedding registration tests) must still pass5. Cleanup (in scope or follow-up PR)
jest-puppeteer,puppeteerinpackage.json) without leaving dead toolingSuccess criteria
All must pass before closing this issue:
/search/{term}, browse/root_cres); stretch goal: port the flows in the table above (standard browse, CRE search/filter, smartlink)make e2e,yarn cypress:open).github/workflows/e2e.ymlor equivalent)playwright installinmake install-pythonunchanged; embedding/scraping tests unaffectedmake frontend/yarn buildpassestest:e2e→jeston mainmake lintpassesmake e2epasses locally (Cypress smoke: 3+ tests green)Pending merges
chore/playwright-install-guardrail(69049e3)main.github/workflows/e2e.ymlonmainPRs to merge/close
chore/playwright-install-guardrail