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

Repro #23851 - Drill-through on a timestamp column binned as XofY fails unless...

Repro #23851 - Drill-through on a timestamp column binned as XofY fails unless sematic type is defined (#39510)

* Add repro for #23851

* Use arrow function

* Improve assertions

* Improve assertion
parent 4d943dac
Branches
Tags
No related merge requests found
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
import { getNotebookStep, popover, 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": "day-of-week",
},
];
describe("issue 23851", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.intercept("POST", "/api/dataset").as("dataset");
});
it("can drill through question with temporal extraction breakout without semantic type defined for the column (metabase#23851)", () => {
cy.request("PUT", `/api/field/${ORDERS.CREATED_AT}`, {
semantic_type: null,
});
cy.createQuestion(
{
query: {
"source-table": ORDERS_ID,
aggregation: [["count"]],
breakout: [CREATED_AT_BREAKOUT],
},
display: "bar",
},
{ visitQuestion: true },
);
cy.get(".bar").should("have.length", 7);
cy.get(".bar").eq(5).click();
popover().findByText("See these Orders").click();
cy.wait("@dataset");
cy.findByTestId("filter-pill").should(
"have.text",
"Created At: Day of week is equal to 6",
);
cy.get(".cellData").should("contain", "109.22");
cy.icon("notebook").click();
getNotebookStep("filter")
.findByText("Created At: Day of week is equal to 6")
.should("exist");
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment