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:
- 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
......
......@@ -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");
......
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