diff --git a/frontend/test/metabase/scenarios/visualizations/table.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/table.cy.spec.js index c84687e37316013aa39ee23f1181e62c249ac263..91349282ab2dff1c8c48f2d88f0ba461cebd2d47 100644 --- a/frontend/test/metabase/scenarios/visualizations/table.cy.spec.js +++ b/frontend/test/metabase/scenarios/visualizations/table.cy.spec.js @@ -15,6 +15,7 @@ describe("scenarios > visualizations > table", () => { beforeEach(() => { restore(); cy.signInAsNormalUser(); + cy.intercept("POST", "/api/dataset").as("dataset"); }); it("should allow to display any column as link with extrapolated url and text", () => { @@ -22,6 +23,7 @@ describe("scenarios > visualizations > table", () => { dataset_query: testQuery, display: "table", }); + cy.wait("@dataset"); cy.findByText("City").click(); @@ -34,10 +36,15 @@ describe("scenarios > visualizations > table", () => { popover().within(() => { cy.findByText("Link").click(); }); + // There is a lag caused by update of the table visualization which breaks Cypress typing. + // Any field in the table will not be "actionable" (the whole table has an overlay with pointer-events set to none) so Cypress cannot click it. + // Adding this line makes sure the table finished updating, and solves the typing issue. + cy.findByText("Address").click(); cy.findByTestId("link_text").type("{{CITY}} {{ID}} fixed text", { parseSpecialCharSequences: false, }); + cy.findByTestId("link_url").type("http://metabase.com/people/{{ID}}", { parseSpecialCharSequences: false, });