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

Fix typing flake in models query editor test (#20086)

parent 562b424a
No related branches found
No related tags found
No related merge requests found
......@@ -154,35 +154,33 @@ describe("scenarios > models query editor", () => {
name: "Erroring Model",
dataset: true,
native: {
query: "S",
// Let's use API to type the most of the query, but stil make it invalid
query: "SELECT ",
},
},
{ visitQuestion: true },
);
openDetailsSidebar();
cy.findByText("Edit query definition").click();
cy.findByText("Customize metadata").click();
cy.findByText(/Syntax error in SQL/);
cy.findByText("Metadata").click();
cy.findByText(/Syntax error in SQL/);
cy.findByText("Query").click();
cy.findByText(/Syntax error in SQL/);
// Using `text-input` here, which is the textarea HTML element instead of the `ace_content` (div)
cy.get(".ace_text-input").type("1");
cy.get(".ace_content").type("{backspace}SELECT * FROM ORDERS");
runNativeQuery();
cy.get(".TableInteractive").within(() => {
cy.findByText("TAX");
cy.findByText("TOTAL");
});
cy.get(".cellData").contains(1);
cy.findByText(/Syntax error in SQL/).should("not.exist");
cy.button("Save changes").click();
cy.wait("@updateCard");
cy.get(".TableInteractive").within(() => {
cy.findByText("TAX");
cy.findByText("TOTAL");
});
cy.get(".cellData").contains(1);
cy.findByText(/Syntax error in SQL/).should("not.exist");
});
});
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