Skip to content
Snippets Groups Projects
Unverified Commit e0e0abfe authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Add an E2E test (#35844)

parent 79f54d69
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import {
visitEmbeddedPage,
filterWidget,
visitIframe,
getDashboardCard,
} from "e2e/support/helpers";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
......@@ -222,6 +223,32 @@ describe("scenarios > embedding > dashboard parameters", () => {
cy.contains(".ScalarValue", "2");
});
});
it("should render error message when `params` is not an object (metabase#14474)", () => {
cy.get("@dashboardId").then(dashboardId => {
cy.request("PUT", `/api/dashboard/${dashboardId}`, {
embedding_params: {
id: "enabled",
name: "enabled",
source: "enabled",
user_id: "enabled",
},
enable_embedding: true,
});
const invalidParamsValue = [];
const payload = {
resource: { dashboard: dashboardId },
params: invalidParamsValue,
};
visitEmbeddedPage(payload);
getDashboardCard()
.findByText("There was a problem displaying this chart.")
.should("be.visible");
});
});
});
describe("scenarios > embedding > dashboard parameters with defaults", () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment