Skip to content

Commit 891567a

Browse files
pr feedback
1 parent e1cdde4 commit 891567a

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

packages/driver/cypress.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,5 @@
88
"reporter": "cypress-multi-reporters",
99
"reporterOptions": {
1010
"configFile": "../../mocha-reporter-config.json"
11-
},
12-
"retries": {
13-
"runMode": 2,
14-
"openMode": 0
1511
}
1612
}

packages/driver/cypress/integration/commands/navigation_spec.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ const helpers = require('../../support/helpers')
55
const { _, Promise, $ } = Cypress
66

77
describe('src/cy/commands/navigation', () => {
8-
before(() => {
9-
expect(Cypress.config('retries')).to.deep.eq({
10-
runMode: 2,
11-
openMode: 0,
12-
})
13-
})
14-
158
context('#reload', () => {
169
before(() => {
1710
cy
@@ -183,7 +176,6 @@ describe('src/cy/commands/navigation', () => {
183176
})
184177

185178
it('throws passing 1 invalid argument', (done) => {
186-
expect(Cypress.config('retries')).to.deep.eq({ runMode: 2, openMode: 0 })
187179
cy.on('fail', (err) => {
188180
expect(err.message).to.eq('`cy.reload()` can only accept a boolean or `options` as its arguments.')
189181
expect(err.docsUrl).to.eq('https://on.cypress.io/reload')

packages/driver/cypress/support/defaults.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
const { $ } = Cypress
22

3-
before(() => {
4-
expect(Cypress.config('retries')).to.deep.eq({ runMode: 2, openMode: 0 })
5-
})
6-
73
beforeEach(() => {
84
const isActuallyInteractive = Cypress.config('isInteractive')
95

@@ -13,9 +9,15 @@ beforeEach(() => {
139
Cypress.config('isInteractive', true)
1410

1511
if (!isActuallyInteractive) {
16-
// necessary or else snapshots will not be taken
17-
// and we can't test them
18-
Cypress.config('numTestsKeptInMemory', 1)
12+
Cypress.config({
13+
// necessary or else snapshots will not be taken
14+
// and we can't test them
15+
'numTestsKeptInMemory': 1,
16+
// forcing interactive mode so force retries
17+
// when test started in 'runMode'
18+
// only want retries for 'runMode'
19+
'config': 2,
20+
})
1921
}
2022

2123
// remove all event listeners

0 commit comments

Comments
 (0)