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 document revision-history toast assertion (#76164)

Nick Fitzpatricka56c304e9eaf
diff --git a/e2e/test/scenarios/documents/documents.cy.spec.ts b/e2e/test/scenarios/documents/documents.cy.spec.ts
index afc0ce2aecd..43fa402eb12 100644
--- a/e2e/test/scenarios/documents/documents.cy.spec.ts
+++ b/e2e/test/scenarios/documents/documents.cy.spec.ts
@@ -1854,6 +1854,8 @@ describe("documents", () => {
cy.findByTestId("toast-undo")
.should("be.visible")
.and("contain.text", "Document saved");
+ // dismiss after asserting so toasts don't stack into later lookups
+ H.undoToast().icon("close").click({ force: true });
cy.log("Make another change");
H.documentContent().click();
@@ -1862,6 +1864,7 @@ describe("documents", () => {
cy.contains('[data-testid="toast-undo"]', "Document saved").should(
"be.visible",
);
+ H.undoToast().icon("close").click({ force: true });
cy.log("Open revision history");
cy.findByLabelText("More options").click();