From a11d4dd70575c13c5b3b0365aa2ab3cff7316740 Mon Sep 17 00:00:00 2001 From: Alexander Polyankin <alexander.polyankin@metabase.com> Date: Thu, 27 Jun 2024 08:52:03 -0400 Subject: [PATCH] E2E repro for Adding filter of summarized field grouped by latitude and longitude on a map breaks breadcrumbs (#44787) --- .../reproductions-3.cy.spec.js | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js b/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js index d19fe982f12..7aad0150b9f 100644 --- a/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js +++ b/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js @@ -41,7 +41,7 @@ import { assertQueryBuilderRowCount, } from "e2e/support/helpers"; -const { ORDERS, ORDERS_ID, PEOPLE, PEOPLE_ID, PRODUCTS, PRODUCTS_ID } = +const { ORDERS, ORDERS_ID, PRODUCTS, PRODUCTS_ID, PEOPLE, PEOPLE_ID } = SAMPLE_DATABASE; describe("issue 32625, issue 31635", () => { @@ -309,6 +309,34 @@ describe("issue 38354", { tags: "@external" }, () => { }); }); +describe("issue 30056", () => { + const questionDetails = { + query: { + "source-query": { + "source-table": PEOPLE_ID, + aggregation: [["count"]], + breakout: [ + ["field", PEOPLE.LATITUDE, { "base-type": "type/Float" }], + ["field", PEOPLE.LONGITUDE, { "base-type": "type/Float" }], + ], + }, + filter: [">", ["field", "count", { "base-type": "type/Integer" }], 2], + }, + }; + + beforeEach(() => { + restore(); + cy.signInAsNormalUser(); + }); + + it("should show table breadcrumbs for questions with post-aggregation filters (metabase#30056)", () => { + createQuestion(questionDetails, { visitQuestion: true }); + // the name of the table is hidden after a few seconds with a CSS animation, + // so check for "exist" only + queryBuilderHeader().findByText("People").should("exist"); + }); +}); + describe("issue 39102", () => { const questionDetails = { name: "39102", -- GitLab