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

Repro #33330: Cumulative count breaks in certain situations (#44671)

parent 689f8d7e
Branches
Tags
No related merge requests found
......@@ -1861,3 +1861,52 @@ describe("issue 42355", () => {
.should("be.visible");
});
});
describe("cumulative count - issue 33330", () => {
const questionDetails = {
name: "33330",
query: {
"source-table": ORDERS_ID,
aggregation: [["cum-count"]],
breakout: [["field", ORDERS.CREATED_AT, { "temporal-unit": "month" }]],
},
};
beforeEach(() => {
restore();
cy.signInAsAdmin();
createQuestion(questionDetails, { visitQuestion: true });
cy.findAllByTestId("header-cell")
.should("contain", "Created At: Month")
.and("contain", "Cumulative count");
cy.findAllByTestId("cell-data").should("contain", "June 2022");
});
it("should still work after turning a question into model (metabase#33330-1)", () => {
turnIntoModel();
cy.findAllByTestId("header-cell")
.should("contain", "Created At: Month")
.and("contain", "Cumulative count");
cy.findAllByTestId("cell-data").should("contain", "June 2022");
});
it("should still work after applying a post-aggregation filter (metabase#33330-2)", () => {
filter();
cy.findByRole("dialog").within(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
cy.findByTestId("filter-column-Created At").findByText("Today").click();
cy.button("Apply filters").click();
cy.wait("@dataset");
});
cy.findByTestId("filter-pill").should("have.text", "Created At is today");
cy.findAllByTestId("header-cell")
.should("contain", "Created At: Month")
.and("contain", "Cumulative count");
cy.findAllByTestId("cell-data")
.should("have.length", "4")
.and("not.be.empty");
cy.findByTestId("question-row-count").should("have.text", "Showing 1 row");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment