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

Fix flaky reproduction for #15891 (#33154)

parent 6585f0c1
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@ import {
enterCustomColumnDetails,
restore,
openProductsTable,
popover,
} from "e2e/support/helpers";
describe("scenarios > question > custom column > help text", () => {
......@@ -34,24 +33,26 @@ describe("scenarios > question > custom column > help text", () => {
});
it("should not appear when formula field is not in focus (metabase#15891)", () => {
enterCustomColumnDetails({ formula: "rou{enter}1.5" });
enterCustomColumnDetails({ formula: "rou{enter}1.5){leftArrow}" });
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("round([Temperature])");
cy.findByTestId("expression-helper-popover").findByText(
"round([Temperature])",
);
// Click outside of formula field instead of blur
popover().first().click();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("round([Temperature])").should("not.exist");
cy.log("Blur event should remove the expression helper popover");
cy.get("@formula").blur();
cy.findByTestId("expression-helper-popover").should("not.exist");
// Should also work with escape key
cy.get("@formula").focus();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("round([Temperature])");
cy.findByTestId("expression-helper-popover").findByText(
"round([Temperature])",
);
cy.log(
"Pressing `escape` key should also remove the expression helper popover",
);
cy.get("@formula").type("{esc}");
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("round([Temperature])").should("not.exist");
cy.findByTestId("expression-helper-popover").should("not.exist");
});
it("should not disappear when clicked on (metabase#17548)", () => {
......
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