[Bug 40043] New: Agreements_spec.ts is failing randomly (2)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Bug ID: 40043 Summary: Agreements_spec.ts is failing randomly (2) Change sponsored?: --- Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org 17:45:28 koha_1 | <testcase name="Agreement CRUD operations Delete agreement" time="0.000" classname="Delete agreement"> 17:46:28 koha_1 | <failure message="Timed out retrying after 10050ms: `cy.click()` failed because the page updated while this command was executing. Cypress tried to locate elements based on this query: 17:46:28 koha_1 | 17:46:28 koha_1 | > <a.show> 17:46:28 koha_1 | 17:46:28 koha_1 | We initially found matching element(s), but while waiting for them to become actionable, they disappeared from the page. Common situations why this happens: 17:46:28 koha_1 | - Your JS framework re-rendered asynchronously 17:46:28 koha_1 | - Your app code reacted to an event firing and removed the element 17:46:28 koha_1 | 17:46:28 koha_1 | You can typically solve this by breaking up a chain. For example, rewrite: 17:46:28 koha_1 | 17:46:28 koha_1 | > `cy.get('button').click().click()` 17:46:28 koha_1 | 17:46:28 koha_1 | to 17:46:28 koha_1 | 17:46:28 koha_1 | > `cy.get('button').as('btn').click()` 17:46:28 koha_1 | > `cy.get('@btn').click()` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 182901 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182901&action=edit Bug 40043: Try to prevent Agreements_spec.ts to fail randomly One test is failing with: """ https://on.cypress.io/element-has-detached-from-dom" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10050ms: `cy.click()` failed because the page updated while this command was executing. Cypress tried to locate elements based on this query:
<a.show>
We initially found matching element(s), but while waiting for them to become actionable, they disappeared from the page. Common situations why this happens: - Your JS framework re-rendered asynchronously - Your app code reacted to an event firing and removed the element You can typically solve this by breaking up a chain. For example, rewrite:
`cy.get('button').click().click()`
to
`cy.get('button').as('btn').click()` `cy.get('@btn').click()`
https://on.cypress.io/element-has-detached-from-dom at retryActionability (http://localhost:8081/__cypress/runner/cypress_runner.js:112246:74) at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23) at Promise.attempt.Promise.try (http://localhost:8081/__cypress/runner/cypress_runner.js:4315:29) at whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143192:68) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:143133:14) 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:1701:18) at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)
From Your Spec Code: at Context.eval (webpack://koha/./t/cypress/integration/ERM/Agreements_spec.ts:630:18)]]></failure> </testcase> </testsuite> """
My guess is that it happens because we don't wait for the /agreements response. Test plan: Test should still pass, we will see how Jenkins behave after it's pushed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.11 |unspecified Assignee|chris@bigballofwax.co.nz |jonathan.druart@gmail.com CC| |matt.blenkinsop@openfifth.c | |o.uk, | |pedro.amorim@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182901|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 182911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182911&action=edit Bug 40043: Try to prevent Agreements_spec.ts to fail randomly One test is failing with: """ https://on.cypress.io/element-has-detached-from-dom" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10050ms: `cy.click()` failed because the page updated while this command was executing. Cypress tried to locate elements based on this query:
<a.show>
We initially found matching element(s), but while waiting for them to become actionable, they disappeared from the page. Common situations why this happens: - Your JS framework re-rendered asynchronously - Your app code reacted to an event firing and removed the element You can typically solve this by breaking up a chain. For example, rewrite:
`cy.get('button').click().click()`
to
`cy.get('button').as('btn').click()` `cy.get('@btn').click()`
https://on.cypress.io/element-has-detached-from-dom at retryActionability (http://localhost:8081/__cypress/runner/cypress_runner.js:112246:74) at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23) at Promise.attempt.Promise.try (http://localhost:8081/__cypress/runner/cypress_runner.js:4315:29) at whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143192:68) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:143133:14) 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:1701:18) at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)
From Your Spec Code: at Context.eval (webpack://koha/./t/cypress/integration/ERM/Agreements_spec.ts:630:18)]]></failure> </testcase> </testsuite> """
My guess is that it happens because we don't wait for the /agreements response. Test plan: Test should still pass, we will see how Jenkins behave after it's pushed. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. To run the tests: yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- │ ✔ Agreements_spec.ts 00:50 5 5 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 00:50 5 5 - - - Even outside KTD ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182911|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184304&action=edit Bug 40043: Try to prevent Agreements_spec.ts to fail randomly One test is failing with: """ https://on.cypress.io/element-has-detached-from-dom" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10050ms: `cy.click()` failed because the page updated while this command was executing. Cypress tried to locate elements based on this query:
<a.show>
We initially found matching element(s), but while waiting for them to become actionable, they disappeared from the page. Common situations why this happens: - Your JS framework re-rendered asynchronously - Your app code reacted to an event firing and removed the element You can typically solve this by breaking up a chain. For example, rewrite:
`cy.get('button').click().click()`
to
`cy.get('button').as('btn').click()` `cy.get('@btn').click()`
https://on.cypress.io/element-has-detached-from-dom at retryActionability (http://localhost:8081/__cypress/runner/cypress_runner.js:112246:74) at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23) at Promise.attempt.Promise.try (http://localhost:8081/__cypress/runner/cypress_runner.js:4315:29) at whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143192:68) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:143133:14) 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:1701:18) at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)
From Your Spec Code: at Context.eval (webpack://koha/./t/cypress/integration/ERM/Agreements_spec.ts:630:18)]]></failure> </testcase> </testsuite> """
My guess is that it happens because we don't wait for the /agreements response. Test plan: Test should still pass, we will see how Jenkins behave after it's pushed. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 --- Comment #7 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m Version(s)|25.11.00,25.05.02 |25.11.00,25.05.02,24.11.08 released in| | --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #9 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40043 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #10 from David Nind <david@davidnind.com> --- Test suite related, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org