Skip to content

[dtq-dev-93] Run three quarantined e2e tests again, remove the deposit test - #1766

Open
milanmajchrak wants to merge 10 commits into
dtq-dev-93from
93/fe-ui-tests
Open

milanmajchrak wants to merge 10 commits into
dtq-dev-93from
93/fe-ui-tests

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • loginViaForm marks 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.ts and collection-create.cy.ts delay 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.ts checks 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_TESTS is 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.ts
  • To see the old failure, delay GET /api/authn/status by 3 s with cy.intercept after 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:

  • The older intercepts in my-dspace.cy.ts still match /server/api/, like the rest of the Cypress suite.
  • The create reply is held for a fixed 2 s, not until the spinner check.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

milanmajchrak and others added 10 commits November 26, 2026 20:26
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]>
@milanmajchrak milanmajchrak changed the title [dtq-dev-93] Run the quarantined e2e tests again [dtq-dev-93] Run three quarantined e2e tests again, remove the deposit test Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant