Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fix flaky tests (#64700)

Kamil Mielnikd825953952a3
diff --git a/e2e/support/helpers/e2e-bi-basics-helpers.js b/e2e/support/helpers/e2e-bi-basics-helpers.js
index 08d03a1d4c3..ca42a95b78a 100644
--- a/e2e/support/helpers/e2e-bi-basics-helpers.js
+++ b/e2e/support/helpers/e2e-bi-basics-helpers.js
@@ -64,7 +64,10 @@ function getIcon(actionType) {
export function assertQueryBuilderRowCount(count) {
const message =
count === 1 ? "Showing 1 row" : `Showing ${count.toLocaleString()} rows`;
- cy.findByTestId("question-row-count").should("contain.text", message);
+ cy.findByTestId("question-row-count", { timeout: 10000 }).should(
+ "contain.text",
+ message,
+ );
}
/**
diff --git a/e2e/test/scenarios/dashboard-filters/dashboard-filters-boolean.cy.spec.ts b/e2e/test/scenarios/dashboard-filters/dashboard-filters-boolean.cy.spec.ts
index c3a8571e72f..f4592a39f5d 100644
--- a/e2e/test/scenarios/dashboard-filters/dashboard-filters-boolean.cy.spec.ts
+++ b/e2e/test/scenarios/dashboard-filters/dashboard-filters-boolean.cy.spec.ts
@@ -164,6 +164,7 @@ describe(
H.filterWidget().click();
H.popover().button("Add filter").click();
H.getDashboardCard().findByText(QUESTION_NAME).click();
+ H.queryBuilderHeader().findByText(QUESTION_NAME).should("be.visible");
H.assertQueryBuilderRowCount(1);
H.filterWidget().findByText("true").should("be.visible");
});
@@ -250,6 +251,7 @@ describe(
H.filterWidget().click();
H.popover().button("Add filter").click();
H.getDashboardCard().findByText(QUESTION_NAME).click();
+ H.queryBuilderHeader().findByText(QUESTION_NAME).should("be.visible");
H.assertQueryBuilderRowCount(53);
H.filterWidget().findByText("true").should("be.visible");
});