Skip to content
Snippets Groups Projects
Unverified Commit 9c3e2152 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

#15612 Repro: Wrong tooltip labels and values for multiple series charts in dashboard (#15638)

parent 441d9d1a
No related branches found
No related tags found
No related merge requests found
......@@ -674,6 +674,65 @@ describe("scenarios > dashboard > dashboard drill", () => {
cy.findByText("37.65");
cy.findByText("No relationships found.");
});
it("should display correct tooltip value for multiple series charts on dashboard (metabase#15612)", () => {
cy.createNativeQuestion({
name: "15612_1",
native: { query: "select 1 as axis, 5 as value" },
display: "bar",
visualization_settings: {
"graph.dimensions": ["AXIS"],
"graph.metrics": ["VALUE"],
},
}).then(({ body: { id: QUESTION1_ID } }) => {
cy.createNativeQuestion({
name: "15612_2",
native: { query: "select 1 as axis, 10 as value" },
display: "bar",
visualization_settings: {
"graph.dimensions": ["AXIS"],
"graph.metrics": ["VALUE"],
},
}).then(({ body: { id: QUESTION2_ID } }) => {
cy.createDashboard("15612D").then(({ body: { id: DASHBOARD_ID } }) => {
// Add the first question to the dashboard
cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
cardId: QUESTION1_ID,
}).then(({ body: { id: DASH_CARD1_ID } }) => {
cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
cards: [
{
id: DASH_CARD1_ID,
card_id: QUESTION1_ID,
row: 0,
col: 0,
sizeX: 12,
sizeY: 8,
series: [
{
id: QUESTION2_ID,
},
],
visualization_settings: {},
parameter_mappings: [],
},
],
});
});
cy.intercept("POST", `/api/card/${QUESTION2_ID}/query`).as(
"secondCardQuery",
);
cy.visit(`/dashboard/${DASHBOARD_ID}`);
cy.wait("@secondCardQuery");
cy.get(".bar")
.last()
.trigger("mousemove");
popover().contains("10");
});
});
});
});
});
function createDashboardWithQuestion(
......
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