Skip to content

Commit

Permalink
#18547 Repro: Wrong id used in links for questions added to dashboard…
Browse files Browse the repository at this point in the history
… in the activity page (#18575) (#18576)

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nemanjaglumac committed Oct 20, 2021
1 parent 6028a74 commit 701afd8
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 701afd8

Please sign in to comment.