Skip to content

Commit 9580dc2

Browse files
breaking: default video configuration option to false (#27008)
* chore: update darwin v8 snapshot * BREAKING CHANGE: set video to false by default (system tests need updating). * Update cli/CHANGELOG.md Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * chore: update type comments * chore: update protocol snapshot * run ci * run ci * set video to true for chrome browser crash test * chore: put in workaround for failing system test spec to be fixed in 27062 * chore: allow retries on actionability tests to be at least one retry as the CI tests run faster without video on * chore: fix flaky navigation test where done is called multiple times almsot always, but sometimes throws an error --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
1 parent 5f93282 commit 9580dc2

File tree

125 files changed

+271
-1533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+271
-1533
lines changed

.circleci/workflows.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,6 @@ jobs:
20702070
CYPRESS_PROJECT_ID=$TEST_KITCHENSINK_PROJECT_ID \
20712071
CYPRESS_RECORD_KEY=$TEST_KITCHENSINK_RECORD_KEY \
20722072
CYPRESS_INTERNAL_ENV=staging \
2073-
CYPRESS_video=false \
20742073
yarn cypress:run --project /tmp/cypress-example-kitchensink --record
20752074
- store-npm-logs
20762075

cli/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ _Released 08/1/2023 (PENDING)_
66
**Breaking Changes:**
77

88
- The [`cy.readFile()`](/api/commands/readfile) command is now retry-able as a [query command](https://on.cypress.io/retry-ability). This should not affect any tests using it; the functionality is unchanged. However, it can no longer be overwritten using [`Cypress.Commands.overwrite()`](/api/cypress-api/custom-commands#Overwrite-Existing-Commands). Addressed in [#25595](https://github.com/cypress-io/cypress/pull/25595).
9+
- The [`video`](https://docs.cypress.io/guides/references/configuration#Videos) configuration option now defaults to `false`. Addresses [#26157](https://github.com/cypress-io/cypress/issues/26157).
910

1011
- The deprecated configuration option, `nodeVersion` has been removed. Addresses [#27016](https://github.com/cypress-io/cypress/issues/27016).
1112

cli/types/cypress.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3007,8 +3007,8 @@ declare namespace Cypress {
30073007
*/
30083008
videoCompression: number | boolean
30093009
/**
3010-
* Whether Cypress will record a video of the test run when running headlessly.
3011-
* @default true
3010+
* Whether Cypress will record a video of the test run when executing in run mode.
3011+
* @default false
30123012
*/
30133013
video: boolean
30143014
/**

npm/grep/cypress.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ module.exports = defineConfig({
1111
specPattern: '**/spec.js',
1212
},
1313
fixturesFolder: false,
14-
video: false,
1514
})

npm/react/cypress.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
'viewportWidth': 400,
33
'viewportHeight': 400,
4-
'video': false,
54
'projectId': 'z9dxah',
65
'env': {
76
'reactDevtools': true,

npm/vue/cypress.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineConfig } from 'cypress'
33
export default defineConfig({
44
'viewportWidth': 500,
55
'viewportHeight': 500,
6-
'video': false,
76
'responseTimeout': 2500,
87
'projectId': '134ej7',
98
'experimentalFetchPolyfill': true,

npm/webpack-preprocessor/test/e2e/helpers.js

-3
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ exports.runTest = async (options = {}) => {
9191
spec: opts.spec,
9292
browser: opts.browser,
9393
exit: opts.exit,
94-
config: {
95-
video: false,
96-
},
9794
dev: true,
9895
})
9996
.finally(() => {

packages/app/cypress/fixtures/debug-Failing/gql-CloudViewerAndProject_RequiredData.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
"field": "userAgent"
295295
},
296296
{
297-
"value": true,
297+
"value": false,
298298
"from": "default",
299299
"field": "video"
300300
},

packages/app/cypress/fixtures/debug-Failing/gql-HeaderBar_HeaderBarQuery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
"field": "userAgent"
271271
},
272272
{
273-
"value": true,
273+
"value": false,
274274
"from": "default",
275275
"field": "video"
276276
},

packages/app/cypress/fixtures/debug-Failing/gql-SpecsPageContainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@
655655
"field": "userAgent"
656656
},
657657
{
658-
"value": true,
658+
"value": false,
659659
"from": "default",
660660
"field": "video"
661661
},

packages/app/cypress/fixtures/debug-Passing/gql-CloudViewerAndProject_RequiredData.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
"field": "userAgent"
295295
},
296296
{
297-
"value": true,
297+
"value": false,
298298
"from": "default",
299299
"field": "video"
300300
},

packages/app/cypress/fixtures/debug-Passing/gql-HeaderBar_HeaderBarQuery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
"field": "userAgent"
271271
},
272272
{
273-
"value": true,
273+
"value": false,
274274
"from": "default",
275275
"field": "video"
276276
},

packages/app/cypress/fixtures/debug-Passing/gql-SpecsPageContainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@
16561656
"field": "userAgent"
16571657
},
16581658
{
1659-
"value": true,
1659+
"value": false,
16601660
"from": "default",
16611661
"field": "video"
16621662
},

packages/config/__snapshots__/index.spec.ts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1
7474
'testIsolation': true,
7575
'trashAssetsBeforeRuns': true,
7676
'userAgent': null,
77-
'video': true,
77+
'video': false,
7878
'videoCompression': 32,
7979
'videosFolder': 'cypress/videos',
8080
'videoUploadOnPasses': true,
@@ -162,7 +162,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys f
162162
'testIsolation': true,
163163
'trashAssetsBeforeRuns': true,
164164
'userAgent': null,
165-
'video': true,
165+
'video': false,
166166
'videoCompression': 32,
167167
'videosFolder': 'cypress/videos',
168168
'videoUploadOnPasses': true,

packages/config/src/options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ const driverConfigOptions: Array<DriverConfigOption> = [
418418
requireRestartOnChange: 'browser',
419419
}, {
420420
name: 'video',
421-
defaultValue: true,
421+
defaultValue: false,
422422
validation: validate.isBoolean,
423423
}, {
424424
name: 'videoCompression',

packages/config/test/project/utils.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,8 @@ describe('config/src/project/utils', () => {
762762
return this.defaults('animationDistanceThreshold', 5)
763763
})
764764

765-
it('video=true', function () {
766-
return this.defaults('video', true)
765+
it('video=false', function () {
766+
return this.defaults('video', false)
767767
})
768768

769769
it('videoCompression=32', function () {
@@ -1076,7 +1076,7 @@ describe('config/src/project/utils', () => {
10761076
testIsolation: { value: true, from: 'default' },
10771077
trashAssetsBeforeRuns: { value: true, from: 'default' },
10781078
userAgent: { value: null, from: 'default' },
1079-
video: { value: true, from: 'default' },
1079+
video: { value: false, from: 'default' },
10801080
videoCompression: { value: 32, from: 'default' },
10811081
videosFolder: { value: 'cypress/videos', from: 'default' },
10821082
videoUploadOnPasses: { value: true, from: 'default' },
@@ -1194,7 +1194,7 @@ describe('config/src/project/utils', () => {
11941194
testIsolation: { value: true, from: 'default' },
11951195
trashAssetsBeforeRuns: { value: true, from: 'default' },
11961196
userAgent: { value: null, from: 'default' },
1197-
video: { value: true, from: 'default' },
1197+
video: { value: false, from: 'default' },
11981198
videoCompression: { value: 32, from: 'default' },
11991199
videosFolder: { value: 'cypress/videos', from: 'default' },
12001200
videoUploadOnPasses: { value: true, from: 'default' },

packages/data-context/src/sources/migration/legacyOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ const resolvedOptions: Array<ResolvedConfigOption> = [
241241
canUpdateDuringTestTime: false,
242242
}, {
243243
name: 'video',
244-
defaultValue: true,
244+
defaultValue: false,
245245
canUpdateDuringTestTime: false,
246246
}, {
247247
name: 'videoCompression',

packages/driver/cypress/e2e/commands/actions/click.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ describe('src/cy/commands/actions/click', () => {
16181618

16191619
it('waits until element stops animating', () => {
16201620
cy.get('button:first').then(($btn) => $btn.animate({ width: '30em' }, 100)).click().then(() => {
1621-
expect(retries).to.gt(1)
1621+
expect(retries).to.gte(1)
16221622
})
16231623
})
16241624

packages/driver/cypress/e2e/commands/actions/trigger.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ describe('src/cy/commands/actions/trigger', () => {
563563

564564
it('waits until element stops animating', () => {
565565
cy.get('button:first').then(($btn) => $btn.animate({ width: '30em' }, 100)).trigger('mouseover').then(() => {
566-
expect(retries).to.be.gt(1)
566+
expect(retries).to.be.gte(1)
567567
})
568568
})
569569

packages/driver/cypress/e2e/commands/actions/type.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ describe('src/cy/commands/actions/type - #type', () => {
325325

326326
it('waits until element stops animating', () => {
327327
cy.get('button:first').then(($btn) => $btn.animate({ width: '30em' }, 100)).type('foo').then(() => {
328-
expect(retries).to.be.gt(1)
328+
expect(retries).to.be.gte(1)
329329
})
330330
})
331331

packages/driver/cypress/e2e/commands/navigation.cy.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,14 @@ describe('src/cy/commands/navigation', () => {
764764
// https://github.com/cypress-io/cypress/issues/14445
765765
// FIXME: fix flaky test (webkit): https://github.com/cypress-io/cypress/issues/24600
766766
it('should eventually fail on assertion despite redirects', { browser: '!webkit' }, (done) => {
767+
let hasDoneBeenCalled = false
768+
767769
cy.on('fail', (err) => {
768770
expect(err.message).to.contain('The application redirected to')
769-
done()
771+
if (!hasDoneBeenCalled) {
772+
hasDoneBeenCalled = true
773+
done()
774+
}
770775
})
771776

772777
// One time, set the amount of times we want the page to perform it's redirect loop.

packages/frontend-shared/cypress/fixtures/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
"field": "userAgent"
229229
},
230230
{
231-
"value": true,
231+
"value": false,
232232
"from": "default",
233233
"field": "video"
234234
},

packages/server/lib/modes/run.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens
668668

669669
if (!shouldUploadVideo) {
670670
debug(`Spec run had no failures and config.videoUploadOnPasses=false. Skip compressing video. Video path: ${videoName}`)
671-
results.video = null
671+
results.videoCompression = false
672672
}
673673

674674
if (!quiet && !skippedSpec) {
@@ -734,7 +734,8 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens
734734
printResults.printVideoPath(videoName)
735735
}
736736

737-
if (videoCaptureFailed || videoCompressionFailed) {
737+
// if capture or compressing has failed, or the test passed and videoUploadOnPasses=false
738+
if (videoCaptureFailed || videoCompressionFailed || !shouldUploadVideo) {
738739
results.video = null
739740
}
740741

packages/server/test/integration/cypress_spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ describe('lib/cypress', () => {
10451045

10461046
expect(chromeBrowser._navigateUsingCRI).to.have.been.calledOnce
10471047
expect(chromeBrowser._setAutomation).to.have.been.calledOnce
1048-
expect(chromeBrowser._recordVideo).to.have.been.calledOnce
1048+
expect(chromeBrowser._recordVideo).not.to.have.been.called
10491049

10501050
expect(BrowserCriClient.create).to.have.been.calledOnce
10511051
expect(browserCriClient.attachToTargetUrl).to.have.been.calledOnce

system-tests/__snapshots__/async_timeouts_spec.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports['e2e async timeouts / failing1'] = `
4747
│ Pending: 0 │
4848
│ Skipped: 0 │
4949
│ Screenshots: 2 │
50-
│ Video: true
50+
│ Video: false
5151
│ Duration: X seconds │
5252
│ Spec Ran: async_timeouts.cy.js │
5353
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -61,11 +61,6 @@ exports['e2e async timeouts / failing1'] = `
6161
cypress command (failed).png
6262
6363
64-
(Video)
65-
66-
- Video output: /XXX/XXX/XXX/cypress/videos/async_timeouts.cy.js.mp4
67-
68-
6964
====================================================================================================
7065
7166
(Run Finished)

system-tests/__snapshots__/base_url_spec.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,12 @@ exports['e2e baseUrl / https / passes'] = `
3333
│ Pending: 0 │
3434
│ Skipped: 0 │
3535
│ Screenshots: 0 │
36-
│ Video: true
36+
│ Video: false
3737
│ Duration: X seconds │
3838
│ Spec Ran: base_url.cy.js │
3939
└────────────────────────────────────────────────────────────────────────────────────────────────┘
4040
4141
42-
(Video)
43-
44-
- Video output: /XXX/XXX/XXX/cypress/videos/base_url.cy.js.mp4
45-
46-
4742
====================================================================================================
4843
4944
(Run Finished)
@@ -93,17 +88,12 @@ exports['e2e baseUrl / http / passes'] = `
9388
│ Pending: 0 │
9489
│ Skipped: 0 │
9590
│ Screenshots: 0 │
96-
│ Video: true
91+
│ Video: false
9792
│ Duration: X seconds │
9893
│ Spec Ran: base_url.cy.js │
9994
└────────────────────────────────────────────────────────────────────────────────────────────────┘
10095
10196
102-
(Video)
103-
104-
- Video output: /XXX/XXX/XXX/cypress/videos/base_url.cy.js.mp4
105-
106-
10797
====================================================================================================
10898
10999
(Run Finished)

system-tests/__snapshots__/browser_crash_handling_spec.js

+4-24
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,12 @@ https://on.cypress.io/renderer-process-crashed
4040
│ Pending: 0 │
4141
│ Skipped: 0 │
4242
│ Screenshots: 0 │
43-
│ Video: true
43+
│ Video: false
4444
│ Duration: X seconds │
4545
│ Spec Ran: chrome_tab_crash.cy.js │
4646
└────────────────────────────────────────────────────────────────────────────────────────────────┘
4747
4848
49-
(Video)
50-
51-
- Video output: /XXX/XXX/XXX/cypress/videos/chrome_tab_crash.cy.js.mp4
52-
53-
5449
────────────────────────────────────────────────────────────────────────────────────────────────────
5550
5651
Running: simple.cy.js (2 of 2)
@@ -70,17 +65,12 @@ https://on.cypress.io/renderer-process-crashed
7065
│ Pending: 0 │
7166
│ Skipped: 0 │
7267
│ Screenshots: 0 │
73-
│ Video: true
68+
│ Video: false
7469
│ Duration: X seconds │
7570
│ Spec Ran: simple.cy.js │
7671
└────────────────────────────────────────────────────────────────────────────────────────────────┘
7772
7873
79-
(Video)
80-
81-
- Video output: /XXX/XXX/XXX/cypress/videos/simple.cy.js.mp4
82-
83-
8474
====================================================================================================
8575
8676
(Run Finished)
@@ -139,17 +129,12 @@ https://on.cypress.io/renderer-process-crashed
139129
│ Pending: 0 │
140130
│ Skipped: 0 │
141131
│ Screenshots: 0 │
142-
│ Video: true
132+
│ Video: false
143133
│ Duration: X seconds │
144134
│ Spec Ran: chrome_tab_crash.cy.js │
145135
└────────────────────────────────────────────────────────────────────────────────────────────────┘
146136
147137
148-
(Video)
149-
150-
- Video output: /XXX/XXX/XXX/cypress/videos/chrome_tab_crash.cy.js.mp4
151-
152-
153138
────────────────────────────────────────────────────────────────────────────────────────────────────
154139
155140
Running: simple.cy.js (2 of 2)
@@ -169,17 +154,12 @@ https://on.cypress.io/renderer-process-crashed
169154
│ Pending: 0 │
170155
│ Skipped: 0 │
171156
│ Screenshots: 0 │
172-
│ Video: true
157+
│ Video: false
173158
│ Duration: X seconds │
174159
│ Spec Ran: simple.cy.js │
175160
└────────────────────────────────────────────────────────────────────────────────────────────────┘
176161
177162
178-
(Video)
179-
180-
- Video output: /XXX/XXX/XXX/cypress/videos/simple.cy.js.mp4
181-
182-
183163
====================================================================================================
184164
185165
(Run Finished)

0 commit comments

Comments
 (0)