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

[E2E] Do not run `@quarantine` tagged tests on PRs (#23749)

parent 641b8d85
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,10 @@ jobs: ...@@ -147,7 +147,10 @@ jobs:
- name: Run EE Cypress tests on ${{ matrix.folder }} - name: Run EE Cypress tests on ${{ matrix.folder }}
if: matrix.edition == 'ee' 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: env:
TERM: xterm TERM: xterm
......
...@@ -20,86 +20,92 @@ const brokenQuestionDetails = { ...@@ -20,86 +20,92 @@ const brokenQuestionDetails = {
display: "scalar", display: "scalar",
}; };
describeEE("admin > tools > erroring questions ", () => { // Quarantine the whole spec because it is most likely causing the H2 timeouts and the chained failures!
beforeEach(() => { // NOTE: it will be quarantined on PRs, but will still run on `master`!
restore(); describeEE(
cy.signInAsAdmin(); "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", () => { describe("without broken questions", () => {
it.skip('should render the "Tools" tab and navigate to the "Erroring Questions" by clicking on it', () => { 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 // 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.visit("/admin");
cy.get("nav").contains("Tools").click(); cy.get("nav").contains("Tools").click();
cy.location("pathname").should("eq", TOOLS_ERRORS_URL); cy.location("pathname").should("eq", TOOLS_ERRORS_URL);
cy.findByRole("link", { name: "Erroring Questions" }) cy.findByRole("link", { name: "Erroring Questions" })
.should("have.attr", "href") .should("have.attr", "href")
.and("eq", TOOLS_ERRORS_URL); .and("eq", TOOLS_ERRORS_URL);
}); });
it("should disable search input fields (metabase#18050)", () => { it("should disable search input fields (metabase#18050)", () => {
cy.visit(TOOLS_ERRORS_URL); cy.visit(TOOLS_ERRORS_URL);
cy.findByText("No results"); cy.findByText("No results");
cy.button("Rerun Selected").should("be.disabled"); cy.button("Rerun Selected").should("be.disabled");
cy.findByPlaceholderText("Error contents").should("be.disabled"); cy.findByPlaceholderText("Error contents").should("be.disabled");
cy.findByPlaceholderText("DB name").should("be.disabled"); cy.findByPlaceholderText("DB name").should("be.disabled");
cy.findByPlaceholderText("Collection name").should("be.disabled"); cy.findByPlaceholderText("Collection name").should("be.disabled");
});
}); });
});
describe("with the existing broken questions", () => { describe("with the existing broken questions", () => {
beforeEach(() => { beforeEach(() => {
cy.createNativeQuestion(brokenQuestionDetails, { cy.createNativeQuestion(brokenQuestionDetails, {
loadMetadata: true, loadMetadata: true,
}); });
cy.visit(TOOLS_ERRORS_URL); cy.visit(TOOLS_ERRORS_URL);
}); });
it("should render correctly", () => { it("should render correctly", () => {
cy.wait("@dataset"); 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 // The question is still there because we didn't fix it
cy.findByText(brokenQuestionDetails.name); cy.findByText(brokenQuestionDetails.name);
cy.button("Rerun Selected").should("be.disabled"); cy.button("Rerun Selected").should("be.disabled");
cy.findByPlaceholderText("Error contents").should("not.be.disabled"); cy.findByPlaceholderText("Error contents").should("not.be.disabled");
cy.findByPlaceholderText("DB name").should("not.be.disabled"); cy.findByPlaceholderText("DB name").should("not.be.disabled");
cy.findByPlaceholderText("Collection name") cy.findByPlaceholderText("Collection name")
.should("not.be.disabled") .should("not.be.disabled")
.type("foo"); .type("foo");
cy.wait("@dataset"); cy.wait("@dataset");
cy.findByText("No results"); cy.findByText("No results");
}); });
it("should remove fixed question on a rerun", () => { it("should remove fixed question on a rerun", () => {
fixQuestion(brokenQuestionDetails.name); 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) { function fixQuestion(name) {
cy.visit("/collection/root"); cy.visit("/collection/root");
......
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