[Bug 37620] New: Fix randomly failing tests for cypress/integration/InfiniteScrollSelect_spec.ts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Bug ID: 37620 Summary: Fix randomly failing tests for cypress/integration/InfiniteScrollSelect_spec.ts Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Keywords: RM_priority Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org One of the Cypress tests keeps failing randomly on D12. Last today, run #2999 Should correctly display labels.Infinite scroll Should correctly display labels Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `resetDropdown`. No request ever occurred. https://on.cypress.io/wait CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `resetDropdown`. No request ever occurred. https://on.cypress.io/wait at cypressErr (http://localhost:8081/__cypress/runner/cypress_runner.js:75187:18) at Object.errByPath (http://localhost:8081/__cypress/runner/cypress_runner.js:75242:10) at checkForXhr (http://localhost:8081/__cypress/runner/cypress_runner.js:134821:84) at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:134844:28) 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/InfiniteScrollSelect_spec.ts:248:11)
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 CC| |victor@tuxayo.net Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36012 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@ptfs-europe | |.com --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Matt, the tests are failing quite consistently for me now. They almost fail all the time, but the error can be different. Always related to a time out. I have noticed a couple of things: * X-Base-Total-Count and X-Total-Count are always 20 when they should be 60 (certainly not the cause of the problem however) * The "delay" (to prevent too many requests) does not work. licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25L%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25Li%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25Lic%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25Lice%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25Licen%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25Licens%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25License%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25License+%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25License+5%25%22%7D%7D licenses?_per_page=-1&q=%7B%22me.name%22%3A%7B%22like%22%3A%22%25License+50%25%22%7D%7D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #1)
Matt, the tests are failing quite consistently for me now. They almost fail all the time, but the error can be different. Always related to a time out.
I have noticed a couple of things: * X-Base-Total-Count and X-Total-Count are always 20 when they should be 60 (certainly not the cause of the problem however)
* The "delay" (to prevent too many requests) does not work.
We are only using setTimeout (so postponing the request), not implementing a throttle function. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #2)
(In reply to Jonathan Druart from comment #1)
Matt, the tests are failing quite consistently for me now. They almost fail all the time, but the error can be different. Always related to a time out.
I have noticed a couple of things: * X-Base-Total-Count and X-Total-Count are always 20 when they should be 60 (certainly not the cause of the problem however)
* The "delay" (to prevent too many requests) does not work.
We are only using setTimeout (so postponing the request), not implementing a throttle function.
Not the same place, this is for the scroll, not the filtering. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.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=37620 --- Comment #4 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170468&action=edit Bug 37620: Improve cypress test to reduce random failures This patch makes some improvements to the Infinite Scroll cypress test to try and prevent random test failures - Fixes X-Base-Count and X-Total-Count for intercepted requests - Makes element selection more precise - Adds an intercepted request returning the requrired result for the filtered search - Awaits this request before selecting an element from the dropdown - Awaits all 10 requests triggered by typing "License 50" rather than just the first one - Ensures that the select dropdown is closed between operations by clicking into another field to remove focus from the select dropdown Test plan: 1) yarn cypress run --spec t/cypress/integration/InfiniteScrollSelect_spec.ts or 1) yarn cypress open and select the InfiniteScrollSelect test from the Cypress GUI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- This should offer a substantial improvement, prior to this the test would fail relatively consistently locally, with this patch it passes every time. It will be interesting to see what happens when this is applied to a full test suite run on a Jenkins node -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks Matt! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Tested on main locally - tests pass. I'll throw it at Jenkins with the next push :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37620 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |matt.blenkinsop@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 | released in| | --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- We should actually throttle here, not request on every key press. Also I don't think the "40" are correct in this patch, it should be 60 everywhere (even for page 2 we expect 60 rows in total in DB). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170468|0 |1 is obsolete| | --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170749&action=edit Bug 37620: Improve cypress test to reduce random failures This patch makes some improvements to the Infinite Scroll cypress test to try and prevent random test failures - Fixes X-Base-Count and X-Total-Count for intercepted requests - Makes element selection more precise - Adds an intercepted request returning the requrired result for the filtered search - Awaits this request before selecting an element from the dropdown - Awaits all 10 requests triggered by typing "License 50" rather than just the first one - Ensures that the select dropdown is closed between operations by clicking into another field to remove focus from the select dropdown Test plan: 1) yarn cypress run --spec t/cypress/integration/InfiniteScrollSelect_spec.ts or 1) yarn cypress open and select the InfiniteScrollSelect test from the Cypress GUI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #11 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170750&action=edit Bug 37620: Fix Total-Count headers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170750|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 170752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170752&action=edit Bug 37620: Fix Total-Count headers Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed follow-up patch to main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to main |Pushed to stable Version(s)| |24.05.04 released in| | --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.04 |24.11.00,24.05.04 released in| | CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |32474 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32474 [Bug 32474] Implement infinite scroll in vue-select -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 32474 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED CC| |david@davidnind.com --- Comment #16 from David Nind <david@davidnind.com> --- Fixes tests, no change to UI, no changes required to the documentation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38475 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38475 [Bug 38475] InfiniteScrollSelect_spec.ts is failing again -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org