https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42801

--- Comment #3 from David Nind <[email protected]> ---
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 <[email protected]>

-- 
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/

Reply via email to