From 674749c621da4bfffaca8797dfd9d27fb9fe5e0a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Jun 2026 11:29:59 +0200 Subject: [PATCH] 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: Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- t/cypress/integration/ERM/UsageReports_spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/cypress/integration/ERM/UsageReports_spec.ts b/t/cypress/integration/ERM/UsageReports_spec.ts index fb237a0fb1..e422f2ff17 100644 --- a/t/cypress/integration/ERM/UsageReports_spec.ts +++ b/t/cypress/integration/ERM/UsageReports_spec.ts @@ -314,10 +314,10 @@ describe("Custom reports", () => { cy.get("#report_type .vs__search").type("PR" + "{enter}", { force: true, }); - cy.get("#report_builder").contains("Submit").click(); cy.intercept("GET", "/api/v1/erm/eUsage/monthly_report/*").as( "reportRequest" ); + cy.get("#report_builder").contains("Submit").click(); cy.wait("@reportRequest"); cy.get(".yearly_filter label").contains("Display by year");