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

Expand repro for #22715 with additional scenario (#22955)

parent 49f75271
No related branches found
No related tags found
No related merge requests found
......@@ -5,16 +5,14 @@ import {
filter,
} from "__support__/e2e/cypress";
describe.skip("issue 22715 ", () => {
describe.skip("filtering based on the remapped column name should result in a correct query (metabase#22715)", () => {
beforeEach(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
cy.intercept("PUT", "/api/card/*").as("updateModel");
restore();
cy.signInAsAdmin();
});
it("fitlering based on the remapped column name should result in a correct query (metabase#22715)", () => {
cy.createNativeQuestion({
native: {
query: `select 1 as "ID", current_timestamp::datetime as "ALIAS_CREATED_AT"`,
......@@ -28,6 +26,10 @@ describe.skip("issue 22715 ", () => {
// Let's go straight to the model metadata editor
cy.visit(`/model/${id}/metadata`);
// Without this Cypress fails to remap the column because an element becomes detached from the DOM
cy.findByText(
"Use the tab key to navigate through settings and columns.",
);
// The first column `ID` is automatically selected
mapColumnTo({ table: "Orders", column: "ID" });
......@@ -44,7 +46,22 @@ describe.skip("issue 22715 ", () => {
cy.visit(`/model/${id}`);
cy.wait("@dataset");
});
});
it("when done through the column header action (metabase#22715-1)", () => {
cy.findByText("Created At").click();
cy.findByText("Filter by this column").click();
cy.findByText("Today").click();
cy.wait("@dataset");
cy.findByText("Today").should("not.exist");
cy.get(".cellData")
.should("have.length", 4)
.and("contain", "Created At");
});
it("when done through the filter trigger (metabase#22715-2)", () => {
filter();
cy.findByTestId("sidebar-right").within(() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment