Skip to content
Snippets Groups Projects
Unverified Commit 8de2a873 authored by Uladzimir Havenchyk's avatar Uladzimir Havenchyk Committed by GitHub
Browse files

Fix e2e test to verify that the filter is applied to twice summarized question (#38091)

parent e254ecdb
Branches
Tags
No related merge requests found
......@@ -740,38 +740,48 @@ describe("scenarios > question > filter", () => {
cy.findByText("Tax").should("not.exist");
});
it.skip("should work on twice summarized questions and preserve both summaries (metabase#15620)", () => {
it("should work on twice summarized questions and preserve both summaries (metabase#15620)", () => {
visitQuestionAdhoc({
dataset_query: {
database: SAMPLE_DB_ID,
type: "query",
query: {
"source-query": {
"source-table": 1,
"source-table": PRODUCTS_ID,
aggregation: [["count"]],
breakout: [["field", 7, { "temporal-unit": "month" }]],
breakout: [
["field", PRODUCTS.CREATED_AT, { "temporal-unit": "month" }],
],
},
aggregation: [
["avg", ["field", "count", { "base-type": "type/Integer" }]],
],
},
type: "query",
},
});
cy.get(".ScalarValue").contains("5");
cy.get(".ScalarValue").contains("5.41");
filter();
filterField("Category").within(() => {
cy.findByText("Gizmo").click();
});
cy.findByTestId("apply-filters").click();
filterField("Category").findByText("Gizmo").click();
cy.findByTestId("apply-filters").click();
cy.findByLabelText("notebook icon").click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Category is Gizmo").should("exist"); // filter
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Created At: Month").should("exist"); // summary 1
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("Average of Count").should("exist"); // summary 2
// filter
getNotebookStep("filter").should("contain", "Category is Gizmo");
// summarize 1
getNotebookStep("summarize", { stage: 0, index: 0 }).should(
"contain",
"Created At: Month",
);
// summarize 2
getNotebookStep("summarize", { stage: 1, index: 0 }).should(
"contain",
"Average of Count",
);
});
it("user shouldn't need to scroll to add filter (metabase#14307)", () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment