Skip to content

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

GDGT-3271 Assert toast isn't left paused after clicking a link inside it (#83256)

Will Fry8bfda4788505
diff --git a/e2e/test/scenarios/dashboard/x-rays.cy.spec.js b/e2e/test/scenarios/dashboard/x-rays.cy.spec.js
index 63db488c4f3..2f396bf2c63 100644
--- a/e2e/test/scenarios/dashboard/x-rays.cy.spec.js
+++ b/e2e/test/scenarios/dashboard/x-rays.cy.spec.js
@@ -178,12 +178,18 @@ describe("scenarios > x-rays", { tags: "@slow" }, () => {
.should("contain", "Your dashboard was saved")
.and("contain", "See it");
- cy.findByTestId("automatic-dashboard-header").within(() => {
- cy.findByRole("link", { name: "See it" }).should("be.visible").click();
- });
+ cy.findByTestId("automatic-dashboard-header")
+ .findByRole("link", { name: "See it" })
+ .should("be.visible");
+
+ H.undoToast().findByRole("link", { name: "See it" }).realClick();
cy.url().should("contain", "a-look-at-orders");
+ cy.log("toast should not stay paused after clicking a link inside it");
+ cy.get("body").realMouseMove(0, 0);
+ H.undoToast().should("not.have.attr", "data-paused");
+
cy.findAllByTestId("dashcard").contains("18,760");
// eslint-disable-next-line metabase/no-unscoped-text-selectors -- deprecated usage
cy.findByText("How these transactions are distributed");