-
Notifications
You must be signed in to change notification settings - Fork 72
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
Cypress end to end smoke test #2241
Conversation
Thanks for doing this - on first blush this is precisely what we need, so what I want to do now is figure out how to structure this best for maintainability. I'll give it some more time this week. I tried running locally and the tests failed because of timeouts... because it was having to build the admin UI pages first before it could navigate to them 🙃. A production build of the Admin UI feels more appropriate for Cypress E2E... |
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.
🚬 Most of my comments could be spun out as enhancement tickets, maybe TODO once we have more cases in mind.
ddfca03
to
3fd0396
Compare
Codecov ReportBase: 88.65% // Head: 88.66% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2241 +/- ##
=======================================
Coverage 88.65% 88.66%
=======================================
Files 331 331
Lines 16099 16099
Branches 4469 4469
=======================================
+ Hits 14273 14274 +1
+ Misses 1669 1668 -1
Partials 157 157
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
79830a0
to
1d9541c
Compare
1d9541c
to
74cdd4d
Compare
Passing run #20 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
privacy center check passed locally. the CI test seems to be failing across multiple branches, will need to look into it separately... |
A good chunk of #1293
Code Changes
cypress-e2e
withinclients
with Cypress 12 set upSteps to Confirm
nox -s test_env
cypress-e2e
, install dependencies vianpm i
npm run cy:run
to run all the cypress testsnpm run cy:open
to watch the tests run in their UIPre-Merge Checklist
CHANGELOG.md
Description Of Changes
This is the first chunk of #1293. The new shiny thing is
cy.origin
which was introduced in Cypress 12 and makes it possible for us to write tests that go between different origins (i.e. privacy center and admin ui) without cross origin errors.The original requirement wanted one single test to test all the things, though I thought it made sense to break them up and wasn't sure if there was a benefit to them all being in one test. (mostly checking mongo + postgres seemed independent of approving an access request)
I'd like to get this reviewed and discussed first, and then I can break out the remaining work in #1293 to separate tickets.
One thing I'd like to discuss is if it is okay that we are running these tests against the development UI servers (
nox -s test_env
spins uplocalhost:3000
andlocalhost:3001
for the web apps). I think ideally we'd test againstlocalhost:8080
(the built frontend for admin-ui at least) to more mimic the production environment. But then we'd likely have to change some configurations withtest_env
, perhaps to not volume mount our local built front end?Also, do we want this running in CI?