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

:cherries: [E2E] Fix 18630 repro flake (#31548) (#31554)

parent b5107521
No related merge requests found
import { restore } from "e2e/support/helpers"; import { restore } from "e2e/support/helpers";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database"; import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
const { ORDERS, ORDERS_ID, PEOPLE, PEOPLE_ID } = SAMPLE_DATABASE; const { ORDERS, ORDERS_ID, PEOPLE, PEOPLE_ID } = SAMPLE_DATABASE;
describe("issue 18630", () => { describe("issue 18630", () => {
beforeEach(() => { beforeEach(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
restore(); restore();
cy.signInAsAdmin(); cy.signInAsAdmin();
}); });
...@@ -48,17 +46,21 @@ describe("issue 18630", () => { ...@@ -48,17 +46,21 @@ describe("issue 18630", () => {
alias: "People", alias: "People",
}, },
], ],
limit: 3,
};
const questionDetails = {
name: "18630",
query: QUERY_WITH_FIELD_CLAUSE,
}; };
it("should normally open queries with field literals in joins (metabase#18630)", () => { it("should normally open queries with field literals in joins (metabase#18630)", () => {
cy.createQuestion( cy.createQuestion(questionDetails, { visitQuestion: true });
{ query: QUERY_WITH_FIELD_CLAUSE },
{ visitQuestion: true },
);
// The query runs and we assert the page is not blank, // The query runs and we assert the page is not blank,
// rather than an infinite loop and stack overflow. // which was caused by an infinite loop and a stack overflow.
// 'test question' is the name of the question. cy.findByDisplayValue(questionDetails.name);
cy.findByText("test question"); cy.get(".cellData").contains("29494 Anderson Drive");
cy.findByText("Showing 3 rows");
}); });
}); });
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