From 0967b7cb836e99a104cd46632858374fdb6a5c6e Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Thu, 22 Sep 2022 20:50:02 +0200 Subject: [PATCH] [E2E] Unskip repro for #13059 (#25546) * Unskip repro for #13059 * Consolidate tests related to moving the dashboard --- .../dashboard/dashboard-management.cy.spec.js | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/frontend/test/metabase/scenarios/dashboard/dashboard-management.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/dashboard-management.cy.spec.js index e064d33f224..d6f885ad7a3 100644 --- a/frontend/test/metabase/scenarios/dashboard/dashboard-management.cy.spec.js +++ b/frontend/test/metabase/scenarios/dashboard/dashboard-management.cy.spec.js @@ -76,30 +76,30 @@ describe("managing dashboard from the dashboard's edit menu", () => { cy.findByText(`Orders in a dashboard - Duplicate`); }); - describe("move", () => { - beforeEach(() => { - popover().within(() => { - cy.findByText("Move").click(); - }); - cy.location("pathname").should("eq", "/dashboard/1/move"); - modal().within(() => { - cy.findByText("First collection").click(); - clickButton("Move"); - }); - }); + it("should be able to move/undo move a dashboard (metabase#13059)", () => { + cy.findByTestId("app-bar").contains("Our analytics"); - it("should be able to move/undo move a dashboard", () => { - assertOnRequest("updateDashboard"); - // Why do we use "Dashboard moved to" here (without its location, btw) vs. "Moved dashboard" for the same action? - cy.findByText("Dashboard moved to"); - cy.findByText("Undo").click(); - assertOnRequest("updateDashboard"); + popover().within(() => { + cy.findByText("Move").click(); }); + cy.location("pathname").should("eq", "/dashboard/1/move"); - it.skip("should update dashboard's collection after the move without page reload (metabase#13059)", () => { - cy.contains("37.65"); - cy.get(".DashboardHeader a").contains("First collection"); + modal().within(() => { + cy.findByText("First collection").click(); + clickButton("Move"); }); + + assertOnRequest("updateDashboard"); + cy.contains("37.65"); + // it should update dashboard's collection after the move without the page reload (metabase#13059) + cy.findByTestId("app-bar").contains("First collection"); + + // Why do we use "Dashboard moved to" here (without its location, btw) vs. "Moved dashboard" for the same action? + cy.findByText("Dashboard moved to"); + cy.findByText("Undo").click(); + assertOnRequest("updateDashboard"); + + cy.findByTestId("app-bar").contains("Our analytics"); }); it("should be able to archive/unarchive a dashboard", () => { -- GitLab