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,
|
||||
});
|
||||
|
||||
if (
|
||||
!process.env.RECORD_FIXTURES &&
|
||||
Cypress.mocha.getRunner().suite.ctx.currentTest.state === 'failed'
|
||||
) {
|
||||
if (!process.env.RECORD_FIXTURES) {
|
||||
const {
|
||||
suite: {
|
||||
ctx: {
|
||||
currentTest: { state, _retries: retries, _currentRetry: currentRetry },
|
||||
},
|
||||
},
|
||||
} = Cypress.mocha.getRunner();
|
||||
if (state === 'failed' && retries === currentRetry) {
|
||||
Cypress.runner.stop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const seedRepo = (taskResult, backend) => {
|
||||
|
@ -16,6 +16,12 @@ describe('GitLab Backend Editorial Workflow', () => {
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
|
@ -18,6 +18,9 @@ describe(`Proxy Backend Simple Workflow - '${mode}' mode`, () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
if (Cypress.mocha.getRunner().suite.ctx.currentTest.title === 'can create an entry') {
|
||||
Cypress.mocha.getRunner().suite.ctx.currentTest.skip();
|
||||
}
|
||||
specUtils.beforeEach(taskResult, backend);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user