Skip to content

Commit

Permalink
Add repro for #18547
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjaglumac committed Oct 20, 2021
1 parent 852e36f commit 158b1b1
Showing 1 changed file with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
//Replaces HomepageApp.e2e.spec.js
import { restore, openProductsTable, popover } from "__support__/e2e/cypress";
import {
restore,
openProductsTable,
popover,
sidebar,
editDashboard,
saveDashboard,
} from "__support__/e2e/cypress";

describe("metabase > scenarios > home > activity-page", () => {
beforeEach(() => {
Expand Down Expand Up @@ -47,4 +54,33 @@ describe("metabase > scenarios > home > activity-page", () => {
cy.findAllByText("Robert").should("have.length", 2);
cy.findByText("Products, Filtered by Rating");
});

it.skip("should respect the (added to dashboard) card id in the link (metabase#18547)", () => {
cy.intercept("GET", `/api/dashboard/1`).as("dashboard");

cy.visit("/dashboard/1");
cy.wait("@dashboard");

editDashboard();

cy.icon("add")
.last()
.click();

sidebar().within(() => {
cy.get(".LoadingSpinner").should("not.exist");
cy.findByText("Orders").click();
});

saveDashboard();
cy.wait("@dashboard");

cy.visit("/activity");

cy.contains("You added a question to the dashboard - Orders in a dashboard")
.closest("li")
.findByRole("link", { name: "Orders" })
.should("have.attr", "href")
.and("include", "question/1");
});
});

0 comments on commit 158b1b1

Please sign in to comment.