It can cause random failures. We should rely on the existence of something, Cypress will retry if the test fails.
Created attachment 182905 [details] [review] Bug 40051: Remove cy.wait(delay) from cypress tests We should not use cy.wait(delay), it's a poor pattern and can cause random failures. Test plan: All cypress tests should still pass after this patchset. Note that t/cypress/integration/ERM/Titles_spec.ts is currently failing.
I've asked Pedro to have a look at Titles_spec.ts.
Created attachment 183835 [details] [review] Bug 40051: Remove cy.wait(delay) from cypress tests We should not use cy.wait(delay), it's a poor pattern and can cause random failures. Test plan: All cypress tests should still pass after this patchset. Note that t/cypress/integration/ERM/Titles_spec.ts is currently failing.
Created attachment 183836 [details] [review] Bug 40051: Remove cy.wait(delay) from cypress tests We should not use cy.wait(delay), it's a poor pattern and can cause random failures. Test plan: All cypress tests should still pass after this patchset.
All tests passing now (on top of "Bug 38899: Fix Cypress tests" not pushed yet).
Created attachment 183863 [details] [review] Bug 40051: Remove cy.wait(delay) from cypress tests We should not use cy.wait(delay), it's a poor pattern and can cause random failures. Test plan: All cypress tests should still pass after this patchset. Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Created attachment 183864 [details] [review] Bug 40051: Remove 'only' from KohaTable_spec.ts Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
InfiniteScrollSelect_spec.ts failed for me the first time: 1) Infinite scroll Should correctly display labels: CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `getPageTwo`. No request ever occurred. But it doesn't seem related to this patchset and I wasn't able to get it to fail again. Also not related to this patchset, but ManageMarcImport_spec.ts still fails for me consistently (3/3): 1) loads the manage MARC import page upload a MARC record: AssertionError: Timed out retrying after 10000ms: Expected to find content: 'View batch' but never did.
Created attachment 184999 [details] [review] Bug 40051: Remove cy.wait(delay) from cypress tests We should not use cy.wait(delay), it's a poor pattern and can cause random failures. Test plan: All cypress tests should still pass after this patchset. Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 185000 [details] [review] Bug 40051: Remove 'only' from KohaTable_spec.ts Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work everyone! Pushed to main for 25.11