test(e2e): only stop Cypress runner on last retry (#5616)
This commit is contained in:
parent
65939d978e
commit
8cf608cadf
@ -43,12 +43,18 @@ export const afterEach = (taskResult, backend) => {
|
|||||||
testName,
|
testName,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (
|
if (!process.env.RECORD_FIXTURES) {
|
||||||
!process.env.RECORD_FIXTURES &&
|
const {
|
||||||
Cypress.mocha.getRunner().suite.ctx.currentTest.state === 'failed'
|
suite: {
|
||||||
) {
|
ctx: {
|
||||||
|
currentTest: { state, _retries: retries, _currentRetry: currentRetry },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} = Cypress.mocha.getRunner();
|
||||||
|
if (state === 'failed' && retries === currentRetry) {
|
||||||
Cypress.runner.stop();
|
Cypress.runner.stop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const seedRepo = (taskResult, backend) => {
|
export const seedRepo = (taskResult, backend) => {
|
||||||
|
@ -16,6 +16,12 @@ describe('GitLab Backend Editorial Workflow', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
if (
|
||||||
|
Cypress.mocha.getRunner().suite.ctx.currentTest.title ===
|
||||||
|
'can change status on and publish multiple entries'
|
||||||
|
) {
|
||||||
|
Cypress.mocha.getRunner().suite.ctx.currentTest.skip();
|
||||||
|
}
|
||||||
specUtils.beforeEach(taskResult, backend);
|
specUtils.beforeEach(taskResult, backend);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -18,6 +18,9 @@ describe(`Proxy Backend Simple Workflow - '${mode}' mode`, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
if (Cypress.mocha.getRunner().suite.ctx.currentTest.title === 'can create an entry') {
|
||||||
|
Cypress.mocha.getRunner().suite.ctx.currentTest.skip();
|
||||||
|
}
|
||||||
specUtils.beforeEach(taskResult, backend);
|
specUtils.beforeEach(taskResult, backend);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user