[Bug 42801] New: Race condition in ERM/UsageReports_spec.ts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 Bug ID: 42801 Summary: Race condition in ERM/UsageReports_spec.ts Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 35229 cy.get("#report_builder").contains("Submit").click(); cy.intercept("GET", "/api/v1/erm/eUsage/monthly_report/*").as( "reportRequest" ); cy.wait("@reportRequest"); We should intercept before the click. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35229 [Bug 35229] Fix and add further cypress tests for Usage reporting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |42772 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Caught by bug 42772. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42772 [Bug 42772] Upgrade Cypress to 15.16.0 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200133 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200133&action=edit Bug 42801: Fix race condition in ERM/UsageReports_spec.ts cy.get("#report_builder").contains("Submit").click(); cy.intercept("GET", "/api/v1/erm/eUsage/monthly_report/*").as( "reportRequest" ); cy.wait("@reportRequest"); We should intercept before the click. Test plan: yarn cypress run --spec t/cypress/integration/ERM/UsageReports_spec.ts Run it several times and confirm that it always passes The failure was: <testcase name="Custom reports Should show the Display by year filter when filter is required" time="0.000" classname="Should show the Display by year filter when filter is required"> <failure message="Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. https://on.cypress.io/wait" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 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=42801 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200133|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 200787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200787&action=edit Bug 42801: Fix race condition in ERM/UsageReports_spec.ts cy.get("#report_builder").contains("Submit").click(); cy.intercept("GET", "/api/v1/erm/eUsage/monthly_report/*").as( "reportRequest" ); cy.wait("@reportRequest"); We should intercept before the click. Test plan: yarn cypress run --spec t/cypress/integration/ERM/UsageReports_spec.ts Run it several times and confirm that it always passes The failure was: <testcase name="Custom reports Should show the Display by year filter when filter is required" time="0.000" classname="Should show the Display by year filter when filter is required"> <failure message="Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. https://on.cypress.io/wait" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. 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=42801 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. With just the patch on this bug, tests passed: for i in {1..10}; do yarn cypress run --spec t/cypress/integration/ERM/UsageReports_spec.ts; done 2. I couldn't get the test to fail with just bug 42772 (and dependencies) applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk 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=42801 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200787|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201647&action=edit Bug 42801: Fix race condition in ERM/UsageReports_spec.ts cy.get("#report_builder").contains("Submit").click(); cy.intercept("GET", "/api/v1/erm/eUsage/monthly_report/*").as( "reportRequest" ); cy.wait("@reportRequest"); We should intercept before the click. Test plan: yarn cypress run --spec t/cypress/integration/ERM/UsageReports_spec.ts Run it several times and confirm that it always passes The failure was: <testcase name="Custom reports Should show the Display by year filter when filter is required" time="0.000" classname="Should show the Display by year filter when filter is required"> <failure message="Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. https://on.cypress.io/wait" type="CypressError"><![CDATA[CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `reportRequest`. No request ever occurred. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org