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

#12439 Repro: Clicking on legend in native question breaks the UI (#18294)

parent a98eb1d8
Branches
Tags
No related merge requests found
import { restore, visitQuestionAdhoc, sidebar } from "__support__/e2e/cypress";
const nativeQuery = `SELECT "PRODUCTS__via__PRODUCT_ID"."CATEGORY" AS "CATEGORY", parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') AS "CREATED_AT", count(*) AS "count"
FROM "PUBLIC"."ORDERS"
LEFT JOIN "PUBLIC"."PRODUCTS" "PRODUCTS__via__PRODUCT_ID" ON "PUBLIC"."ORDERS"."PRODUCT_ID" = "PRODUCTS__via__PRODUCT_ID"."ID"
GROUP BY "PRODUCTS__via__PRODUCT_ID"."CATEGORY", parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM')
ORDER BY "PRODUCTS__via__PRODUCT_ID"."CATEGORY" ASC, parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') ASC
`;
const questionDetails = {
dataset_query: {
database: 1,
native: {
query: nativeQuery,
},
type: "native",
},
display: "line",
};
describe.skip("issue 12439", () => {
beforeEach(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
restore();
cy.signInAsAdmin();
visitQuestionAdhoc(questionDetails);
cy.wait("@dataset");
});
it("should allow clicking on a legend in a native question without breaking the UI (metabase#12439)", () => {
cy.get(".Visualization").within(() => {
cy.findByText("Gizmo").click();
// Make sure the legends and the graph are still there
cy.findByText("Gizmo").should("be.visible");
cy.findByText("Doohickey").should("be.visible");
cy.get("circle");
});
// Make sure buttons are clickable
cy.findByTestId("viz-settings-button").click();
sidebar().contains("Line options");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment