Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Delete e2e Save modal test (#64350)

Fraserb12bc41d58c9
diff --git a/e2e/test/scenarios/question/saved.cy.spec.js b/e2e/test/scenarios/question/saved.cy.spec.js
index 91eb394c058..9e786f71355 100644
--- a/e2e/test/scenarios/question/saved.cy.spec.js
+++ b/e2e/test/scenarios/question/saved.cy.spec.js
@@ -17,78 +17,6 @@ describe("scenarios > question > saved", () => {
cy.intercept("POST", "api/card").as("cardCreate");
});
- it(
- "should should correctly display 'Save' modal (metabase#13817)",
- { tags: "@skip" },
- () => {
- H.openOrdersTable();
- H.openNotebook();
-
- H.summarize({ mode: "notebook" });
- H.popover().findByText("Count of rows").click();
- H.addSummaryGroupingField({ field: "Total" });
-
- // Test save modal and nested entity picker can be closed via consecutive escape key presses
- H.queryBuilderHeader().button("Save").click();
- cy.findByTestId("save-question-modal").within(() => {
- cy.findByTestId("dashboard-and-collection-picker-button").click();
- // wait for focus to be removed from clicked element to avoid test flakes
- // cypress executes faster than ui updates causing the focus position to lag behind on save modal
- cy.findByTestId("dashboard-and-collection-picker-button").should(
- "not.be.focused",
- );
- });
- H.entityPickerModal().should("exist");
- cy.realPress("{esc}");
- H.entityPickerModal().should("not.exist");
- cy.findByTestId("save-question-modal").should("exist");
- cy.findByTestId("dashboard-and-collection-picker-button").should(
- "be.focused",
- );
- cy.realPress("{esc}");
- cy.findByTestId("save-question-modal").should("not.exist");
-
- // Save the question
- H.queryBuilderHeader().button("Save").click();
- cy.findByTestId("save-question-modal").within((modal) => {
- cy.findByText("Save").click();
- });
- cy.wait("@cardCreate");
- cy.button("Not now").click();
-
- // Add a filter in order to be able to save question again
- // eslint-disable-next-line no-unsafe-element-filtering
- cy.findAllByTestId("action-buttons").last().findByText("Filter").click();
-
- H.popover().findByText("Total: Auto binned").click();
- H.selectFilterOperator("Greater than");
-
- H.popover().within(() => {
- cy.findByPlaceholderText("Enter a number").type("60");
- cy.button("Add filter").click();
- });
-
- H.queryBuilderHeader().button("Save").click();
-
- cy.findByTestId("save-question-modal").within((modal) => {
- cy.findByText("Save question").should("be.visible");
- cy.findByTestId("save-question-button").should("be.enabled");
-
- cy.findByText("Save as new question").click();
- cy.findByLabelText("Name")
- .click()
- .type("{selectall}{backspace}", { delay: 50 })
- .blur();
- cy.findByLabelText("Name").should("be.empty");
- cy.findByLabelText("Description").should("be.empty");
- cy.findByTestId("save-question-button").should("be.disabled");
-
- cy.findByText(/^Replace original question,/).click();
- cy.findByTestId("save-question-button").should("be.enabled");
- });
- },
- );
-
it("view and filter saved question", () => {
H.visitQuestion(ORDERS_QUESTION_ID);
cy.findAllByText("Orders"); // question and table name appears