Skip to content

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

Deflake notifications unsubscribe test on modal entrance transition (#78580)

github-automation-metabaseb9292b6b6c5c
diff --git a/e2e/test/scenarios/onboarding/notifications.cy.spec.js b/e2e/test/scenarios/onboarding/notifications.cy.spec.js
index 0029fa88822..919d942d74d 100644
--- a/e2e/test/scenarios/onboarding/notifications.cy.spec.js
+++ b/e2e/test/scenarios/onboarding/notifications.cy.spec.js
@@ -155,8 +155,14 @@ describe("scenarios > account > notifications", () => {
clickUnsubscribe();
+ // Wait for the confirm modal's entrance transition to settle before
+ // clicking. A bare findByText resolves the instant the title mounts, while
+ // the modal is still animating in and its title transiently overlaps the
+ // Unsubscribe button — clicking then fails "covered by another element".
+ // Anchoring on the title being visible defers the click until the modal
+ // has finished opening.
H.modal().within(() => {
- cy.findByText("Confirm you want to unsubscribe");
+ cy.findByText("Confirm you want to unsubscribe").should("be.visible");
cy.findByText("Unsubscribe").click();
});