Skip to content

Commit

Permalink
chore: add guided error for removal of videoUploadOnPasses config opt…
Browse files Browse the repository at this point in the history
…ion (#27158)

* chore: add guided error for removal of videoUploadOnPasses config option

* chore: properly order breaking keys and update snapshot
  • Loading branch information
AtofStryker committed Jun 30, 2023
1 parent b0c63ff commit d3200df
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/config/__snapshots__/index.spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports['config/src/index .getBreakingKeys returns list of breaking config keys
'integrationFolder',
'pluginsFile',
'testFiles',
'videoUploadOnPasses',
]

exports['config/src/index .getDefaultValues returns list of public config keys 1'] = {
Expand Down
8 changes: 7 additions & 1 deletion packages/config/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const BREAKING_OPTION_ERROR_KEY: Readonly<AllCypressErrorNames[]> = [
'EXPERIMENTAL_SHADOW_DOM_REMOVED',
'FIREFOX_GC_INTERVAL_REMOVED',
'PLUGINS_FILE_CONFIG_OPTION_REMOVED',
'VIDEO_UPLOAD_ON_PASSES_REMOVED',
'RENAMED_CONFIG_OPTION',
'TEST_FILES_RENAMED',
] as const
Expand Down Expand Up @@ -633,11 +634,16 @@ export const breakingOptions: Readonly<BreakingOption[]> = [
name: 'pluginsFile',
errorKey: 'PLUGINS_FILE_CONFIG_OPTION_REMOVED',
isWarning: false,
}, {
},
{
name: 'testFiles',
errorKey: 'TEST_FILES_RENAMED',
newName: 'specPattern',
isWarning: false,
}, {
name: 'videoUploadOnPasses',
errorKey: 'VIDEO_UPLOAD_ON_PASSES_REMOVED',
isWarning: true,
},
] as const

Expand Down
9 changes: 9 additions & 0 deletions packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,15 @@ export const AllCypressErrors = {
https://on.cypress.io/migration-guide`
},

VIDEO_UPLOAD_ON_PASSES_REMOVED: (_errShape: BreakingErrResult) => {
return errTemplate`\
The ${fmt.highlight(`videoUploadOnPasses`)} configuration option was removed in ${fmt.cypressVersion(`13.0.0`)}.
You can safely remove this option from your config.
https://on.cypress.io/migration-guide`
},

CONFIG_FILE_INVALID_ROOT_CONFIG: (errShape: BreakingErrResult) => {
const code = errPartial`
{
Expand Down
5 changes: 5 additions & 0 deletions packages/errors/test/unit/visualSnapshotErrors_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,11 @@ describe('visual error templates', () => {
default: [{ name: 'pluginsFile', configFile: '/path/to/cypress.config.js.ts' }],
}
},
VIDEO_UPLOAD_ON_PASSES_REMOVED: () => {
return {
default: [{ name: 'videoUploadOnPasses', configFile: '/path/to/cypress.config.js.ts' }],
}
},
CONFIG_FILE_INVALID_ROOT_CONFIG: () => {
return {
default: [{ name: 'specPattern', configFile: '/path/to/cypress.config.js.ts' }],
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/schemas/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ enum ErrorTypeEnum {
VIDEO_CAPTURE_FAILED
VIDEO_COMPRESSION_FAILED
VIDEO_RECORDING_FAILED
VIDEO_UPLOAD_ON_PASSES_REMOVED
}

"""Base error"""
Expand Down

5 comments on commit d3200df

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on d3200df Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.0.0/linux-arm64/release/13.0.0-d3200dfa9171866a94f6f4d69ffc3ad467553cea/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on d3200df Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.0.0/linux-x64/release/13.0.0-d3200dfa9171866a94f6f4d69ffc3ad467553cea/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on d3200df Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.0.0/darwin-x64/release/13.0.0-d3200dfa9171866a94f6f4d69ffc3ad467553cea/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on d3200df Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.0.0/win32-x64/release/13.0.0-d3200dfa9171866a94f6f4d69ffc3ad467553cea/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on d3200df Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.0.0/darwin-arm64/release/13.0.0-d3200dfa9171866a94f6f4d69ffc3ad467553cea/cypress.tgz

Please sign in to comment.