Skip to content

Commit e213486

Browse files
committed
updates
1 parent 4be318a commit e213486

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

packages/driver/src/cypress/runner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,9 @@ const overrideRunnerHook = (Cypress, _runner, getTestById, getTest, setTest, get
557557
testAfterRun(test, Cypress)
558558
await testAfterRunAsync(test, Cypress)
559559

560+
// if the user has stopped the run, we need to abort,
561+
// this needs to happen after the test:after:run events have fired
562+
// to ensure protocol can properly handle the abort
560563
if (_runner.stopped) {
561564
// abort the run
562565
_runner.abort()

system-tests/__snapshots__/cypress-stop.spec.ts.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exports['e2e Cypress.stop() / stops execution when called in before'] = `
1+
exports['Cypress.stop() / stops execution when called in before'] = `
22
33
====================================================================================================
44
@@ -52,7 +52,7 @@ exports['e2e Cypress.stop() / stops execution when called in before'] = `
5252
5353
`
5454

55-
exports['e2e Cypress.stop() / stops execution when called in beforeEach'] = `
55+
exports['Cypress.stop() / stops execution when called in beforeEach'] = `
5656
5757
====================================================================================================
5858
@@ -106,7 +106,7 @@ exports['e2e Cypress.stop() / stops execution when called in beforeEach'] = `
106106
107107
`
108108

109-
exports['e2e Cypress.stop() / stops execution when called in test'] = `
109+
exports['Cypress.stop() / stops execution when called in test'] = `
110110
111111
====================================================================================================
112112
@@ -161,7 +161,7 @@ exports['e2e Cypress.stop() / stops execution when called in test'] = `
161161
162162
`
163163

164-
exports['e2e Cypress.stop() / stops execution when called in afterEach'] = `
164+
exports['Cypress.stop() / stops execution when called in afterEach'] = `
165165
166166
====================================================================================================
167167
@@ -215,7 +215,7 @@ exports['e2e Cypress.stop() / stops execution when called in afterEach'] = `
215215
216216
`
217217

218-
exports['e2e Cypress.stop() / stops execution when called in after'] = `
218+
exports['Cypress.stop() / stops execution when called in after'] = `
219219
220220
====================================================================================================
221221

system-tests/projects/cypres-stop/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

system-tests/test/cypress-stop.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import systemTests from '../lib/system-tests'
22

3-
describe('e2e Cypress.stop()', () => {
3+
describe('Cypress.stop()', () => {
44
const getRunnableEventCounts = (stderr: string) => {
55
const beforeRunCount = (stderr.match(/test:before:run(?!:async)/g) || []).length
66
const beforeRunAsyncCount = (stderr.match(/test:before:run:async/g) || []).length
@@ -34,7 +34,7 @@ describe('e2e Cypress.stop()', () => {
3434
systemTests.setup()
3535

3636
systemTests.it('stops execution when called in before', {
37-
project: 'cypres-stop',
37+
project: 'cypress-stop',
3838
spec: 'before.cy.js',
3939
snapshot: true,
4040
expectedExitCode: 0,
@@ -67,7 +67,7 @@ describe('e2e Cypress.stop()', () => {
6767
})
6868

6969
systemTests.it('stops execution when called in beforeEach', {
70-
project: 'cypres-stop',
70+
project: 'cypress-stop',
7171
spec: 'beforeEach.cy.js',
7272
snapshot: true,
7373
expectedExitCode: 0,
@@ -100,7 +100,7 @@ describe('e2e Cypress.stop()', () => {
100100
})
101101

102102
systemTests.it('stops execution when called in test', {
103-
project: 'cypres-stop',
103+
project: 'cypress-stop',
104104
spec: 'test.cy.js',
105105
snapshot: true,
106106
expectedExitCode: 0,
@@ -133,7 +133,7 @@ describe('e2e Cypress.stop()', () => {
133133
})
134134

135135
systemTests.it('stops execution when called in afterEach', {
136-
project: 'cypres-stop',
136+
project: 'cypress-stop',
137137
spec: 'afterEach.cy.js',
138138
snapshot: true,
139139
expectedExitCode: 0,
@@ -166,7 +166,7 @@ describe('e2e Cypress.stop()', () => {
166166
})
167167

168168
systemTests.it('stops execution when called in after', {
169-
project: 'cypres-stop',
169+
project: 'cypress-stop',
170170
spec: 'after.cy.js',
171171
snapshot: true,
172172
expectedExitCode: 0,

0 commit comments

Comments
 (0)