feat: add Cypress e2e tests for dashboard push actions #1403
feat: add Cypress e2e tests for dashboard push actions #1403fabiovincenzi wants to merge 28 commits intofinos:mainfrom
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1403 +/- ##
=======================================
Coverage 90.01% 90.01%
=======================================
Files 67 67
Lines 4769 4769
Branches 885 885
=======================================
Hits 4293 4293
Misses 458 458
Partials 18 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ncenzi/git-proxy into feat/e2e-dashboard-tests
…2e-dashboard-tests
…ncenzi/git-proxy into feat/e2e-dashboard-tests
| // only handles 401 errors in authorisePush/rejectPush. The 403 is silently | ||
| // ignored and the user is navigated away without feedback. Once the UI properly | ||
| // handles 403, this test should assert a snackbar error message is shown. | ||
| cy.visit(`/dashboard/push/${this.pushId}`); |
There was a problem hiding this comment.
I'm having some issues with tests failing locally due to Cypress checking the first page which is full of repositories from previous test executions:
It'd be great to have some cleanup for repositories specifically, although general cleanup functions for everything affecting the local DB would be ideal!
There was a problem hiding this comment.
Added a cleanupTestRepos command that deletes all cypress-test repos from the DB before the suite runs,. Also fixed a pre-existing bug in the "Existing repo" after hook that was using repo.name instead of repo._id for the delete request, which silently prevented cleanup from working.
Fixes #1390
disabledprop not being forwarded inCustomButtoncomponent, which prevented the attestation confirm button from being properly disableddata-testidattributes to push detail action buttons and attestation dialog for reliable test selectorscypress/e2e/(local) andcypress/e2e/docker/(require Docker); local tests continue to run in the Node/MongoDB matrix inci.yml, Docker tests run ine2e.ymlcypress:run:dockerscript targeting Docker-only testse2e.ymlalongside existing vitest e2e tests, with log dump and screenshot upload on failurerepo.cy.js) compatible with Docker environment by replacing hardcoded URLs withCypress.env('API_BASE_URL')GIT_CONFIG_*env vars increatePushto avoid exposing them in CI logs