Skip to content

Commit ead8ed1

Browse files
committed
BREAKING CHANGE: set video to false by default (system tests need updating).
1 parent ea9c185 commit ead8ed1

File tree

120 files changed

+262
-1548
lines changed

Some content is hidden

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

120 files changed

+262
-1548
lines changed

.circleci/workflows.yml

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

cli/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
22
## 13.0.0
33

4-
_Released 03/1/2023 (PENDING)_
4+
_Released 8/1/2023 (PENDING)_
55

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 will now default to `false`. Addresses [#26157](https://github.com/cypress-io/cypress/issues/26157).
910

1011
## 12.14.1
1112

cli/types/cypress.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3013,7 +3013,7 @@ declare namespace Cypress {
30133013
videoCompression: number | boolean
30143014
/**
30153015
* Whether Cypress will record a video of the test run when running headlessly.
3016-
* @default true
3016+
* @default false
30173017
*/
30183018
video: boolean
30193019
/**

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
@@ -76,7 +76,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1
7676
'testIsolation': true,
7777
'trashAssetsBeforeRuns': true,
7878
'userAgent': null,
79-
'video': true,
79+
'video': false,
8080
'videoCompression': 32,
8181
'videosFolder': 'cypress/videos',
8282
'videoUploadOnPasses': true,
@@ -163,7 +163,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys f
163163
'testIsolation': true,
164164
'trashAssetsBeforeRuns': true,
165165
'userAgent': null,
166-
'video': true,
166+
'video': false,
167167
'videoCompression': 32,
168168
'videosFolder': 'cypress/videos',
169169
'videoUploadOnPasses': true,

packages/config/src/options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ const driverConfigOptions: Array<DriverConfigOption> = [
423423
requireRestartOnChange: 'browser',
424424
}, {
425425
name: 'video',
426-
defaultValue: true,
426+
defaultValue: false,
427427
validation: validate.isBoolean,
428428
}, {
429429
name: 'videoCompression',

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,8 @@ describe('config/src/project/utils', () => {
779779
return this.defaults('animationDistanceThreshold', 5)
780780
})
781781

782-
it('video=true', function () {
783-
return this.defaults('video', true)
782+
it('video=false', function () {
783+
return this.defaults('video', false)
784784
})
785785

786786
it('videoCompression=32', function () {
@@ -1094,7 +1094,7 @@ describe('config/src/project/utils', () => {
10941094
testIsolation: { value: true, from: 'default' },
10951095
trashAssetsBeforeRuns: { value: true, from: 'default' },
10961096
userAgent: { value: null, from: 'default' },
1097-
video: { value: true, from: 'default' },
1097+
video: { value: false, from: 'default' },
10981098
videoCompression: { value: 32, from: 'default' },
10991099
videosFolder: { value: 'cypress/videos', from: 'default' },
11001100
videoUploadOnPasses: { value: true, from: 'default' },
@@ -1213,7 +1213,7 @@ describe('config/src/project/utils', () => {
12131213
testIsolation: { value: true, from: 'default' },
12141214
trashAssetsBeforeRuns: { value: true, from: 'default' },
12151215
userAgent: { value: null, from: 'default' },
1216-
video: { value: true, from: 'default' },
1216+
video: { value: false, from: 'default' },
12171217
videoCompression: { value: 32, from: 'default' },
12181218
videosFolder: { value: 'cypress/videos', from: 'default' },
12191219
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/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
@@ -657,7 +657,7 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens
657657

658658
if (!shouldUploadVideo) {
659659
debug(`Spec run had no failures and config.videoUploadOnPasses=false. Skip compressing video. Video path: ${videoName}`)
660-
results.video = null
660+
results.videoCompression = false
661661
}
662662

663663
if (!quiet && !skippedSpec) {
@@ -723,7 +723,8 @@ async function waitForTestsToFinishRunning (options: { project: Project, screens
723723
printResults.printVideoPath(videoName)
724724
}
725725

726-
if (videoCaptureFailed || videoCompressionFailed) {
726+
// if capture or compressing has failed, or the test passed and videoUploadOnPasses=false
727+
if (videoCaptureFailed || videoCompressionFailed || !shouldUploadVideo) {
727728
results.video = null
728729
}
729730

packages/server/test/integration/cypress_spec.js

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

10431043
expect(chromeBrowser._navigateUsingCRI).to.have.been.calledOnce
10441044
expect(chromeBrowser._setAutomation).to.have.been.calledOnce
1045-
expect(chromeBrowser._recordVideo).to.have.been.calledOnce
1045+
expect(chromeBrowser._recordVideo).not.to.have.been.called
10461046

10471047
expect(BrowserCriClient.create).to.have.been.calledOnce
10481048
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)

0 commit comments

Comments
 (0)