t/cypress/integration/Admin/RecordSources_spec.ts Record sources CRUD tests ✓ Add (6169ms) 1) List ✓ Edit (1720ms) ✓ Delete (1658ms) 4 passing (16s) 1 failing 1) Record sources CRUD tests List: TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection. > $(...).tooltip is not a function When Cypress detects uncaught errors originating from your application it will automatically fail the current test. This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event. https://on.cypress.io/uncaught-exception-from-application at Proxy.beforeMount (webpack://koha/./koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue?../node_modules/vue-loader/dist/index.js??ruleSet%5B1%5D.rules%5B5%5D.use%5B0%5D:142:11) at eval (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:2849:40) at callWithErrorHandling (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:284:22) at callWithAsyncErrorHandling (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:293:21) at hook.__weh.hook.__weh (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:2823:29) at invokeArrayFns (webpack://koha/../node_modules/@vue/shared/dist/shared.esm-bundler.js?:625:15) at ReactiveEffect.componentUpdateFn [as fn] (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:5688:80) at ReactiveEffect.run (webpack://koha/../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js?:225:25) at instance.update (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:5844:56) at setupRenderEffect (webpack://koha/../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?:5858:9)
Created attachment 171461 [details] [review] Bug 37917: Add some wait time for the intercepted request responses This patch introduces the `cy.wait(500)` we use in several other Cypress tests when an (intercepted) API request is made. This is very important when tables are being rendered as DataTables is particularly bulky and prone to take longer to finish loading the components if the CPU load is a bit high. I wasn't able to reproduce the problem very often, but you can test yourself: 1. Run: $ ktd --shell k$ run_cypress --spec t/cypress/integration/Admin/RecordSources_spec.ts 2. Run it many times => FAIL: At some point it fails, you can overload your computer to try 3. Apply the patch 4. Repeat 2 => SUCCESS: No failures :-D 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed for 24.11! Well done everyone, thank you!
Can we get review before push on this kind of patches please?