Repository navigation
Add Playwright end-to-end tests against the mock-data app - #23
Merged
Merged
Conversation
13 browser tests covering navigation, medications, intake logging, the calendar and analytics. They run against `vite --mode mock`, so they need no Power Platform access. The browser clock is pinned because the seed data is built relative to "now". - `npm run test:e2e` / `npm run test:e2e:ui` - e2e/ is excluded from Vitest and included in the type-check - CI gets a separate parallel `e2e` job that uploads the Playwright report - .vscode/extensions.json recommends the Vitest and Playwright extensions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The E2E job is outside the existing required ci merge check, so failures may not block merging.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds browser-level Playwright coverage for the mock-data application without requiring Power Platform access.
Changes:
- Adds 13 deterministic end-to-end tests across core user flows.
- Configures Playwright, TypeScript, Vitest, scripts, and documentation.
- Runs E2E tests in CI and uploads reports.
| File | Description |
|---|---|
vite.config.ts |
Excludes Playwright tests from Vitest. |
tsconfig.node.json |
Type-checks Playwright configuration and tests. |
README.md |
Documents E2E workflow and commands. |
playwright.config.ts |
Configures Chromium and the mock server. |
package.json |
Adds Playwright dependency and scripts. |
package-lock.json |
Locks Playwright packages. |
e2e/navigation.spec.ts |
Tests navigation and direct URLs. |
e2e/medications.spec.ts |
Tests medication management. |
e2e/log-intake.spec.ts |
Tests logging flows across pages. |
e2e/fixtures.ts |
Pins time and provides locators. |
e2e/calendar.spec.ts |
Tests calendar details and navigation. |
e2e/analytics.spec.ts |
Tests analytics and CSV exports. |
.vscode/extensions.json |
Recommends testing extensions. |
.gitignore |
Ignores Playwright output. |
.github/workflows/ci.yml |
Adds the parallel E2E job. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| # Browser tests against the mock-data app (`vite --mode mock`): no Power | ||
| # Platform access and no secrets, so it runs as its own parallel job. | ||
| e2e: |
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.

Why
The project had no automated end-to-end tests. Browser-level checks were done by hand against
npm run dev:mock, so nothing caught a broken flow across pages (for example, a dose logged on the dashboard not appearing on the calendar) unless someone walked through it.What changes
13 Playwright tests in
e2e/, run withnpm run test:e2e(ornpm run test:e2e:uifor the interactive runner). Playwright starts the app itself in mock mode on port 3100, so the tests need no Power Platform access, no secrets and nopower.config.json.Supporting changes:
e2ejob inci.yml, parallel to the existingcijob. It installs Chromium, runs the suite and uploads the Playwright report as an artifact. The existing job is untouched.e2e/, so the two runners don't pick up each other's files.e2e/andplaywright.config.tsare included intsconfig.node.json..vscode/extensions.jsonrecommends the Vitest and Playwright extensions, which is what makes both suites appear in the VS Code Testing panel..gitignoreand the README cover the Playwright output folders and the new commands.No application code changes.
Two things worth knowing when reading the tests
e2e/fixtures.ts). The mock seed data is built relative to "now", so without this, which doses are due or overdue would depend on when the suite runs.page.goto().Testing
npm run lint,tsc -band the 164 Vitest tests pass.--repeat-each=3).CI=1and without the local dev certificates orpower.config.json, which is the state CI sees. The Power Apps Vite plugin logs a "missing power.config.json" error there; the dev server still starts.download.path(), which is unavailable in that mode. They now usesaveAs().e2ejob passed on this PR's first CI run (55s), alongside the existingcijob, which includesactionlinton the edited workflow.After merging
Merging to
maintriggers the usual Deploy to Dev. It redeploys the same app content, since nothing undersrc/changed.🤖 Generated with Claude Code