Skip to content
Snippets Groups Projects
Unverified Commit a9260097 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Repro #30312 - Cannot filter directly from table column header when Question is Summarized (#39500)

* Add repro for #30312

* Use arrow function

* Improve assertions
parent ca9303da
Branches
Tags
No related merge requests found
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
import { popover, queryBuilderMain, restore } from "e2e/support/helpers";
const { ORDERS, ORDERS_ID } = SAMPLE_DATABASE;
const CREATED_AT_BREAKOUT = [
"field",
ORDERS.CREATED_AT,
{
"base-type": "type/DateTime",
"temporal-unit": "month",
},
];
describe("issue 30312", () => {
beforeEach(() => {
restore();
cy.signInAsNormalUser();
});
it("can use a drill filter on an aggregated column (metabase#30312)", () => {
cy.createQuestion(
{
query: {
"source-table": ORDERS_ID,
aggregation: [["count"]],
breakout: [CREATED_AT_BREAKOUT],
limit: 5, // optimization
},
display: "table",
},
{ visitQuestion: true },
);
cy.findAllByTestId("header-cell")
.eq(1)
.should("have.text", "Count")
.click();
popover().within(() => {
cy.findByText("Filter by this column").click();
cy.findByPlaceholderText("Enter a number").type("10");
cy.realPress("Tab");
cy.button("Add filter").should("be.enabled").click();
});
cy.findByTestId("filter-pill").should("have.text", "Count is equal to 10");
queryBuilderMain().findByText("No results!").should("be.visible");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment