From 2c3e568803bddf6ea788ca3b7f7bcc16a09a7305 Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:06:32 +0200 Subject: [PATCH] [E2E] Do not run `@quarantine` tagged tests on PRs (#23749) --- .github/workflows/e2e-tests.yml | 5 +- .../admin/tools/erroring-questions.cy.spec.js | 118 +++++++++--------- 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b39357d86fa..0d392dc512a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -147,7 +147,10 @@ jobs: - name: Run EE Cypress tests on ${{ matrix.folder }} if: matrix.edition == 'ee' - run: yarn run test-cypress-run --folder ${{ matrix.folder }} + run: | + yarn run test-cypress-run \ + --env grepTags="-@quarantine" \ + --folder ${{ matrix.folder }} env: TERM: xterm diff --git a/frontend/test/metabase/scenarios/admin/tools/erroring-questions.cy.spec.js b/frontend/test/metabase/scenarios/admin/tools/erroring-questions.cy.spec.js index 76615a5d26e..b37443427a9 100644 --- a/frontend/test/metabase/scenarios/admin/tools/erroring-questions.cy.spec.js +++ b/frontend/test/metabase/scenarios/admin/tools/erroring-questions.cy.spec.js @@ -20,86 +20,92 @@ const brokenQuestionDetails = { display: "scalar", }; -describeEE("admin > tools > erroring questions ", () => { - beforeEach(() => { - restore(); - cy.signInAsAdmin(); +// Quarantine the whole spec because it is most likely causing the H2 timeouts and the chained failures! +// NOTE: it will be quarantined on PRs, but will still run on `master`! +describeEE( + "admin > tools > erroring questions ", + { tags: "@quarantine" }, + () => { + beforeEach(() => { + restore(); + cy.signInAsAdmin(); - cy.intercept("POST", "/api/dataset").as("dataset"); - }); + cy.intercept("POST", "/api/dataset").as("dataset"); + }); - describe("without broken questions", () => { - it.skip('should render the "Tools" tab and navigate to the "Erroring Questions" by clicking on it', () => { - // The sidebar has been taken out, because it looks awkward when there's only one elem on it: put it back in when there's more than one - cy.visit("/admin"); + describe("without broken questions", () => { + it.skip('should render the "Tools" tab and navigate to the "Erroring Questions" by clicking on it', () => { + // The sidebar has been taken out, because it looks awkward when there's only one elem on it: put it back in when there's more than one + cy.visit("/admin"); - cy.get("nav").contains("Tools").click(); + cy.get("nav").contains("Tools").click(); - cy.location("pathname").should("eq", TOOLS_ERRORS_URL); - cy.findByRole("link", { name: "Erroring Questions" }) - .should("have.attr", "href") - .and("eq", TOOLS_ERRORS_URL); - }); + cy.location("pathname").should("eq", TOOLS_ERRORS_URL); + cy.findByRole("link", { name: "Erroring Questions" }) + .should("have.attr", "href") + .and("eq", TOOLS_ERRORS_URL); + }); - it("should disable search input fields (metabase#18050)", () => { - cy.visit(TOOLS_ERRORS_URL); + it("should disable search input fields (metabase#18050)", () => { + cy.visit(TOOLS_ERRORS_URL); - cy.findByText("No results"); - cy.button("Rerun Selected").should("be.disabled"); - cy.findByPlaceholderText("Error contents").should("be.disabled"); - cy.findByPlaceholderText("DB name").should("be.disabled"); - cy.findByPlaceholderText("Collection name").should("be.disabled"); + cy.findByText("No results"); + cy.button("Rerun Selected").should("be.disabled"); + cy.findByPlaceholderText("Error contents").should("be.disabled"); + cy.findByPlaceholderText("DB name").should("be.disabled"); + cy.findByPlaceholderText("Collection name").should("be.disabled"); + }); }); - }); - describe("with the existing broken questions", () => { - beforeEach(() => { - cy.createNativeQuestion(brokenQuestionDetails, { - loadMetadata: true, - }); + describe("with the existing broken questions", () => { + beforeEach(() => { + cy.createNativeQuestion(brokenQuestionDetails, { + loadMetadata: true, + }); - cy.visit(TOOLS_ERRORS_URL); - }); + cy.visit(TOOLS_ERRORS_URL); + }); - it("should render correctly", () => { - cy.wait("@dataset"); + it("should render correctly", () => { + cy.wait("@dataset"); - selectQuestion(brokenQuestionDetails.name); + selectQuestion(brokenQuestionDetails.name); - cy.button("Rerun Selected").should("not.be.disabled").click(); + cy.button("Rerun Selected").should("not.be.disabled").click(); - cy.wait("@dataset"); + cy.wait("@dataset"); - // The question is still there because we didn't fix it - cy.findByText(brokenQuestionDetails.name); - cy.button("Rerun Selected").should("be.disabled"); + // The question is still there because we didn't fix it + cy.findByText(brokenQuestionDetails.name); + cy.button("Rerun Selected").should("be.disabled"); - cy.findByPlaceholderText("Error contents").should("not.be.disabled"); - cy.findByPlaceholderText("DB name").should("not.be.disabled"); - cy.findByPlaceholderText("Collection name") - .should("not.be.disabled") - .type("foo"); + cy.findByPlaceholderText("Error contents").should("not.be.disabled"); + cy.findByPlaceholderText("DB name").should("not.be.disabled"); + cy.findByPlaceholderText("Collection name") + .should("not.be.disabled") + .type("foo"); - cy.wait("@dataset"); + cy.wait("@dataset"); - cy.findByText("No results"); - }); + cy.findByText("No results"); + }); - it("should remove fixed question on a rerun", () => { - fixQuestion(brokenQuestionDetails.name); + it("should remove fixed question on a rerun", () => { + fixQuestion(brokenQuestionDetails.name); - cy.visit(TOOLS_ERRORS_URL); + cy.visit(TOOLS_ERRORS_URL); - selectQuestion(brokenQuestionDetails.name); + selectQuestion(brokenQuestionDetails.name); - cy.button("Rerun Selected").should("not.be.disabled").click(); + cy.button("Rerun Selected").should("not.be.disabled").click(); - cy.wait("@dataset"); + cy.wait("@dataset"); - cy.findByText("No results"); + cy.findByText("No results"); + }); }); - }); -}); + }, +); function fixQuestion(name) { cy.visit("/collection/root"); -- GitLab