https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38461
--- Comment #33 from Victor Grousset/tuxayo <[email protected]> --- About comment 11 and it's consequences, I did some experiments: (to hopefully not end up with the same kind of struggles as with Selenium) I tried to change the browser: With Firefox 128 with the fixes for random failures still applied Run 1: One column hidden by default: TypeError: win is undefined at ./t/cypress/integration/KohaTable_spec.ts/</ (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:58:12) Input search bar and clear filter : AssertionError: Timed out retrying after 10000ms: Expected to find content: 'Showing 1 to 20 of 42 entries' within the element: <div.dt-info> but never did. at ./t/cypress/integration/KohaTable_spec.ts/</</ (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:370:56) Run 2: AssertionError: Timed out retrying after 10000ms: Expected to find content: 'Showing 1 to 20 of 42 entries' within the element: <div.dt-info> but never did. at ./t/cypress/integration/KohaTable_spec.ts/</</ (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:370:56) Looks like it consistently not pass and has some random failure of it's own. ----- With Chromium 120 with the fixes for random failures still applied: 2 passes at least. With Chromium 120 with the 2 patches reverted: In 3 runs, that same error: Shareable link: AssertionError: Timed out retrying after 10000ms: Expected to find element: `.tooltip`, but never found it. at Context.eval (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:278:23) So it doesn't pass consistently either. Next lead: update Cypress, it's a bit old. And so is Electron. But before that, I still can't reproduce the comment 11 issues. I'm at 105 runs. So far I got these unrelated issues: -------------------------------------------------------------------- 1) kohaTable (using REST API) Simple tables "before each" hook for "Jump to the configuration page": CypressError: Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise. The command that returned the promise was: > `cy.visit()` The cy command you invoked inside the promise was: > `cy.login()` Because Cypress commands are already promise-like, you don't need to wrap them or return your own promise. Cypress will resolve your command with whatever the final Cypress command yields. The reason this is an error instead of a warning is because Cypress internally queues commands serially whereas Promises execute as soon as they are invoked. Attempting to reconcile this would prevent Cypress from ever resolving. https://on.cypress.io/returning-promise-and-commands-in-another-command Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `kohaTable (using REST API)` at cy.<computed> [as login] (http://localhost:8081/__cypress/runner/cypress_runner.js:137643:64) From Your Spec Code: at eval (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:282:24) ---------------------------------------------------- 1) Hit all tables catalogue/detail/holdings_table correctly init: CypressError: The following error originated from your test code, not from Cypress. It was caused by an unhandled promise rejection. > Timed out after waiting `60000ms` for your remote page to load. Your page did not fire its `load` event within `60000ms`. You can try increasing the `pageLoadTimeout` value in `kohadevbox/koha/cypress.config.ts` to wait longer. Browsers will not fire the `load` event until all stylesheets and scripts are done downloading. When this `load` event occurs, Cypress will continue running commands. When Cypress detects uncaught errors originating from your test code it will automatically fail the current test. at timedOutWaitingForPageLoad (http://localhost:8081/__cypress/runner/cypress_runner.js:129355:64) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:130329:16) at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:4186:41) at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23) at Promise._settlePromiseFromHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:1519:31) at Promise._settlePromise (http://localhost:8081/__cypress/runner/cypress_runner.js:1576:18) at Promise._settlePromise0 (http://localhost:8081/__cypress/runner/cypress_runner.js:1621:10) at Promise._settlePromises (http://localhost:8081/__cypress/runner/cypress_runner.js:1697:18) at _drainQueueStep (http://localhost:8081/__cypress/runner/cypress_runner.js:2407:12) at _drainQueue (http://localhost:8081/__cypress/runner/cypress_runner.js:2400:9) at Async._drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2416:5) at Async.drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2286:14) From Your Spec Code: at Context.eval (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:518:19) From Your Spec Code: at Context.eval (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:518:19) ---------------------------------------------------- "before each" hook for "Jump to the configuration page": Timed out retrying after 10000ms + expected - actual -'Session timed out › Log in to Koha › Koha' +'Koha staff interface' at Context.eval (webpack://koha/./t/cypress/integration/KohaTable_spec.ts:56:19) ---------------------------------------------------- Is there hope that none of our different issues happen in CI? So we could try our chances without the commits - Fix ramdom failures (2.89 KB, patch) - Bypass the clipboard for tests to keep the test code the simplest. And add them if the CI shows the same errors. -------------------- I almost forgot: you could try updating cypress&electron and it might help to get away with the simplest version of these patches. And it needs updates anyway because Electron 106 would be Chromium from September 27, 2022 -------------------------- Hopefully there are some things helpful in all this. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
