-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
We want a Cypress project scaffolded and integrated with GitHub Actions for the Svelte-based web frontend under web/client within this repo. The Cypress project should include one end-to-end test for the core user workflow and several component tests for the most complicated Svelte components (.svelte files under src/lib and src/routes)
Roadmap
- Scaffold Cypress project
- Configure the online validator instance as the default baseUrl
[ ] Set up Cypress' Svelte integration- Create one end-to-end test against live web service
- Navigate to baseUrl
- Input
https://developers.google.com/static/transit/gtfs/examples/sample-feed.zipas URL - Click Validate
- Intercept POST to
/create-job, wait for it and assert it runs exactly once and succeeds and returns a{ jobId: '...' }data structure with a nonemptyjobId - Intercept HEAD to
/${jobId}/report.htmland wait for that to happen at least once with a response status of 200 OR 404 - With an extended timeout, wait for the "Your report is ready!" modal to appear and verify that the link is to your
${jobId}/report.html
- Update end-to-end test to use mock API responses and not hit the real web service at all
- Mock the
POST .../create-jobrequest to return a hard-codedjobId - Mock the
HEAD .../${jobId}/report.htmlrequest to respond 404 2 times and then 200 on the 3rd request - Adjust the wait for
/${jobId}/report.htmlto have 3 hardcoded waits in serial where each asserts the correct count of calls and the return status being 404, 404, and then 200 - Drop the timeout on the "Your report is ready!" modal UI appearing to assert that it is displaying nearly immediately after the 3rd and final wait for
report.htmlto return 200
- Mock the
[ ] Review.sveltecomponents and identify the 3-6 most complex ones to develop component tests for that try out different input parameters and assert on key UI elements that should reflect those inputs- Add a new GitHub Actions workflow that runs the action provided by the Cypress project
- Have it triggered by all pull requests against
masterlike the acceptance_test workflow is - Rather than using
paths-ignorelike other workflows triggered bypull_requestevents, this workflow can just use thepathsfilter onweb/client/**
- Have it triggered by all pull requests against
- Add E2E test cases to trigger error displays added in feat: Web Validator Client Display Errors #1383
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels