-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2e test ci #986
E2e test ci #986
Conversation
963d72e
to
65eacb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some feedback and discussion points. if it's more efficient to address them in a call i'm up for it
c0d9c47
to
1a4dd5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick for function documentation + eslint
also, could we rename the files to remove dashes like Drawer-Login.test.ts
to DrawerLogin.test.ts
etc? This is for consistency with the rest of the codebase 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work! feel free to merge once package-lock conflicts are resolved
- delete download folder library - shift testcafe yml to ci yml
- add new otp rate limit config for end to end test - change otp rate limit to 10 for development mode - stick otp rate limit to 5 for production and test
- rename testcafe test in ci - refactor the tests - add login procedure - remove directory test - reduce setup waiting time to three minutes
- refactor config file - remove bottom comments - remove ip tracking test - remove reset otp test
- new function to generate and delete file of specific size - add new tests for large size file upload
Problem
Lack of end-to-end front-end testing in the CI pipeline.
Solution
Add end-to-end testing into GitHub action, triggered by push/pull request.
This will spin up a development environment, with 4 minutes timeout.
Subsequently, it will run testcafe test on headless chrome browser.
Others changes
The Otp rate limit is set higher in during testing so that all the tests are able to run without encountering rate limit error.
Add end-to-end folder under jest ignore config to stop jest from running the testcafe tests.
Test Coverage
The test cases originated from the wiki checklist: https://github.com/opengovsg/GoGovSG/wiki/Release-Checklist
Test coverage includes:
Login Page
Sessions
URL creation
URL Searching and Download
Transition Page
Drawer, Editing and Toaster logic
User page - Sort & Filter
New dev dependencies: