Skip to content

Add Playwright browser tests and CI workflow - #94

Open
anchapin wants to merge 1 commit into
mainfrom
feat/e2e-playwright
Open

anchapin wants to merge 1 commit into
mainfrom
feat/e2e-playwright

Conversation

@anchapin

@anchapin anchapin commented Oct 7, 2026

Copy link
Copy Markdown

Adds a deterministic (no AI) Playwright suite in e2e/ plus .github/workflows/e2e.yml.

Tests

  • smoke.spec.ts: visits ~40 routes and property detail tabs; fails on console/page errors, failing /api/ calls, blank pages, horizontal overflow (390px for @mobile).
  • a11y.spec.ts: axe-core WCAG A/AA on core pages (all routes with SEED_E2E_A11Y_ALL=1); only new critical/serious violations fail.
  • flows.spec.ts: bad sign-in, auth redirect, create dataset, inventory grid loads.
  • known-issues.ts: tracked bugs (/organizations, /organizations/columns, /insights) use test.fail() so the suite goes red once they are fixed.

Backend: e2e/docker-compose.yml uses the published seedplatform/seed:develop image (override with SEED_IMAGE); no SEED checkout needed. e2e/seed-data.py seeds minimal inventory because create_and_load_sample_data is currently broken in SEED.

CI: every PR, pushes to main, nightly (full a11y scan), manual dispatch.

Tested: cd e2e && PW_CHANNEL=chrome npx playwright test against the published image: 102 passed. The workflow itself has not yet run in GitHub Actions; this PR is its first run.

Runs against the published seedplatform/seed image; no SEED source needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anchapin
anchapin requested review from kflemin and a balanced review from Copilot October 7, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The route matrix is incomplete and contains an invalid route, while accessibility suppression can hide new violations.

5 open findings
What changed in this PR

Adds deterministic Playwright end-to-end testing and CI coverage for the Angular frontend.

Changes:

  • Adds smoke, accessibility, authentication, dataset, and inventory tests.
  • Provides Docker-backed test data and browser-test configuration.
  • Runs tests on pull requests, main, nightly schedules, and manual dispatches.

Validation: Static review only; the PR reports 102 local passes, but the new workflow has not run yet.

File Description
.github/​workflows/​e2e.yml Defines browser-test CI execution and artifacts.
e2e/​.gitignore Excludes generated test artifacts.
e2e/​README.md Documents setup and execution.
e2e/​docker-compose.yml Provides isolated backend services.
e2e/​package-lock.json Locks test dependencies.
e2e/​package.json Declares Playwright tooling and scripts.
e2e/​playwright.config.ts Configures desktop/mobile projects and reporting.
e2e/​seed-data.py Seeds inventory fixtures.
e2e/​tests/​a11y.spec.ts Runs axe accessibility scans.
e2e/​tests/​fixtures.ts Captures runtime and API failures.
e2e/​tests/​flows.spec.ts Tests key user workflows.
e2e/​tests/​global-setup.ts Creates authenticated browser state.
e2e/​tests/​known-issues.ts Records expected failures and accessibility baselines.
e2e/​tests/​routes.ts Defines route and detail-tab coverage.
e2e/​tests/​smoke.spec.ts Verifies rendering, errors, and overflow.
Files not reviewed (1)
  • e2e/package-lock.json: Generated file

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread e2e/tests/a11y.spec.ts
test(`axe: ${route}`, async ({ page }) => {
await gotoSettled(page, route)
const results = await new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa']).analyze()
const serious = results.violations.filter((v) => (v.impact === 'critical' || v.impact === 'serious') && !(v.id in KNOWN_AXE_RULES))
Comment thread e2e/tests/routes.ts
@@ -0,0 +1,47 @@
// Static (parameter-free) routes under /ng-app. Keep in sync with src/app/**/*.routes.ts.
Comment thread e2e/tests/routes.ts
'/organizations/labels',
'/organizations/members',
'/organizations/data-quality/properties',
'/organizations/derived-columns',
Comment thread e2e/tests/routes.ts
]

// Tabs under /properties/:id (id resolved at runtime from the API).
export const PROPERTY_TABS = ['', '/analyses', '/cross-cycles', '/meters', '/notes', '/sensors', '/timeline', '/ubids']
Comment thread e2e/tests/fixtures.ts
Comment on lines +3 to +7
export interface Problems {
console: string[]
pageErrors: string[]
http: string[]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants