Add MSW mock layer and Playwright e2e tests#2067
Open
Conversation
Expand the minimal MSW mock setup into a full mock layer with realistic Norwegian transit data, enabling the app to run without a backend via VITE_ENABLE_MOCKS=true. Add 34 Playwright e2e tests covering app loading, provider selection, lines, flexible lines, day types, exports, networks, and stop places.
|
Visit the preview URL for this PR (updated for commit d49d19f): https://ent-enki-dev--pr2067-msw-and-e2e-tests-ojym7lf8.web.app (expires Sat, 14 Feb 2026 07:22:35 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 50f71a028b1cba336bad43cc33ce2755ca3f1855 |
Comprehensive Playwright tests covering: - Line editor: all 3 steps (General, Journey Patterns, Service Journeys), step navigation, form fields, dropdowns, notices, stop points, passing times - Brandings: listing, create form, edit form with populated data - Providers: listing, create form, edit form with populated data - Fix flaky app-loads test for provider selection redirect
The lines listing tests are already covered more thoroughly in line-editor.spec.ts.
New workflow tests that actually submit forms and verify results: - Line editor: edit+save on all 3 steps, delete with confirmation, cancel deletion - Brandings: create new, edit+save, delete with confirmation - Networks: edit+save, delete with confirmation, verify success toast - Day types: edit+save, verify delete disabled for in-use types Also reduce parallel workers to 4 and increase test timeout to 60s to avoid flaky failures under load.
|
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.


Summary
VITE_ENABLE_MOCKS=true npm start@playwright/testdev dependency and Playwright configTest plan
VITE_ENABLE_MOCKS=true npm start