Repository navigation
[dtq-dev-93] Run three quarantined e2e tests again, remove the deposit test - #1766
Open
milanmajchrak wants to merge 10 commits into
Open
milanmajchrak wants to merge 10 commits into
milanmajchrak wants to merge 10 commits into
Conversation
After login the app reloads the page. The server renders the page first, then the app starts and renders it again. Tests typed into the server page and lost the text, so the create and deposit tests failed now and then. loginViaForm now waits for the new page and for the app to leave /reload/. This takes three tests out of quarantine. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test waited for the search response and then checked each result element. The list renders again after the response, so the check could read the old list. It now retries one assertion on the current list. This takes the last test out of quarantine. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The create pages hide the spinner as soon as the save is done. When the reply came before Cypress saw the spinner, the test failed although the save worked. The tests now delay the reply of the create request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The archived filter test looked only at item rows. Workspace and workflow rows use other components, so a mixed list passed. The test now checks every row of the result list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The create intercepts expected the REST API under /server. They now match any path that ends with the create endpoint. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The response callback returned the value of setDelay, and the Cypress type check rejected it. The callback has a block body now. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test accepted any success alert, and the upload shows one too. It now waits for the deposit request, then looks for the deposit message and the redirect to MyDSpace. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test went on after the upload request without checking that the form shows the file. It now waits for the file name in the upload section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The deposit test looked for the English success message. It now checks that the deposit request answers 201, and still checks for no warning and the redirect to MyDSpace. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The CLARIN form needs more required fields than the test fills, so the deposit was never sent. The test passed only on the upload alert. The UI test suite covers deposit on the v9 form. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
References
The four tests were quarantined in dspace-angular PR 1573 as flaky.
Description
Three quarantined Cypress tests run again, and the deposit test is removed. The three typed into the page or read the results before the app finished drawing it again.
Instructions for Reviewers
List of changes in this PR:
loginViaFormmarks the window before the login click. It then waits for a new window and for a path without/reload/. After login the app reloads itself. The server sends the page, then the app starts and draws it again, so text typed before that was lost.community-create.cy.tsandcollection-create.cy.tsdelay the reply of the create request by 2 s. The spinner hides as soon as the save is done, so a fast reply failed the spinner check. The intercepts match**/api/core/..., so any REST path works.my-dspace.cy.tschecks that every row of the result list has the archived badge, with one retried assertion on the current list.submission.cy.ts: the deposit test is removed. The CLARIN form needs more required fields than it fills (type, contact person and others), so the deposit request was never sent. It passed only when the success alert of the upload was still shown, which made it look flaky. The UI test suite covers deposit on the v9 form ("create item should work").QUARANTINED_TESTSis empty. The skip hook stays for later use.How to test:
npx cypress run --spec cypress/e2e/community-create.cy.ts,cypress/e2e/collection-create.cy.ts,cypress/e2e/my-dspace.cy.tsGET /api/authn/statusby 3 s withcy.interceptafter the login click. Without this change community-create fails. With it the test passes.Codex review (gpt-6.2-sol, high), 4 runs: 7 findings fixed (the create reply is held for the spinner check, the archived badge on every row, the Cypress type check, the new intercepts work under any REST path, and 3 in the deposit test, which the CI run then showed never deposits). Not changed:
my-dspace.cy.tsstill match/server/api/, like the rest of the Cypress suite.Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code