Skip to content
Snippets Groups Projects
Unverified Commit a66da6e7 authored by Nick Fitzpatrick's avatar Nick Fitzpatrick Committed by GitHub
Browse files

Passing dashboard object to isEditing (#29458)

parent 48dcfc92
Branches
Tags
No related merge requests found
......@@ -535,6 +535,22 @@ describe("scenarios > dashboard", () => {
cy.findAllByText("18,760").should("have.length", 2);
});
it("should allow you to add questions using 'Add a saved question' button (metabase#29450)", () => {
cy.createDashboard({ name: "dash:29450" });
cy.visit("/collection/root");
// enter newly created dashboard
cy.findByText("dash:29450").click();
cy.findByText("Add a saved question").click();
sidebar().within(() => {
cy.findByText("Orders, Count").click();
});
saveDashboard();
});
it("should show collection breadcrumbs for a dashboard", () => {
visitDashboard(1);
appbar().within(() => cy.findByText("Our analytics").click());
......
......@@ -205,7 +205,8 @@ class Dashboard extends Component {
};
onAddQuestion = () => {
this.setEditing(true);
const { dashboard } = this.props;
this.setEditing(dashboard);
this.props.toggleSidebar(SIDEBAR_NAME.addQuestion);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment