Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: clean up experimentalSkipDomainInjection removal #30826

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/config/__snapshots__/index.spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1
'experimentalMemoryManagement': false,
'experimentalModifyObstructiveThirdPartyCode': false,
'injectDocumentDomain': false,
'experimentalSkipDomainInjection': null,
'experimentalOriginDependencies': false,
'experimentalSourceRewriting': false,
'experimentalSingleTabRunMode': false,
Expand Down Expand Up @@ -133,7 +132,6 @@ exports['config/src/index .getDefaultValues returns list of public config keys f
'experimentalMemoryManagement': false,
'experimentalModifyObstructiveThirdPartyCode': false,
'injectDocumentDomain': false,
'experimentalSkipDomainInjection': null,
'experimentalOriginDependencies': false,
'experimentalSourceRewriting': false,
'experimentalSingleTabRunMode': false,
Expand Down Expand Up @@ -221,7 +219,6 @@ exports['config/src/index .getPublicConfigKeys returns list of public config key
'experimentalMemoryManagement',
'experimentalModifyObstructiveThirdPartyCode',
'injectDocumentDomain',
'experimentalSkipDomainInjection',
'experimentalOriginDependencies',
'experimentalSourceRewriting',
'experimentalSingleTabRunMode',
Expand Down
27 changes: 4 additions & 23 deletions packages/config/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@ const driverConfigOptions: Array<DriverConfigOption> = [
defaultValue: false,
validation: validate.isBoolean,
requireRestartOnChange: 'server',
},
{
name: 'experimentalSkipDomainInjection',
defaultValue: null,
validation: validate.isNullOrArrayOfStrings,
isExperimental: true,
requireRestartOnChange: 'server',
}, {
name: 'experimentalOriginDependencies',
defaultValue: false,
Expand Down Expand Up @@ -665,6 +658,10 @@ export const breakingOptions: Readonly<BreakingOption[]> = [
name: 'experimentalShadowDomSupport',
errorKey: 'EXPERIMENTAL_SHADOW_DOM_REMOVED',
isWarning: true,
}, {
name: 'experimentalSkipDomainInjection',
errorKey: 'EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED',
isWarning: false,
}, {
name: 'firefoxGcInterval',
errorKey: 'FIREFOX_GC_INTERVAL_REMOVED',
Expand Down Expand Up @@ -737,12 +734,6 @@ export const breakingRootOptions: Array<BreakingOption> = [
isWarning: false,
testingTypes: ['e2e'],
},
{
name: 'experimentalSkipDomainInjection',
errorKey: 'EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY',
isWarning: false,
testingTypes: ['e2e'],
},
{
name: 'experimentalOriginDependencies',
errorKey: 'EXPERIMENTAL_ORIGIN_DEPENDENCIES_E2E_ONLY',
Expand Down Expand Up @@ -774,11 +765,6 @@ export const testingTypeBreakingOptions: { e2e: Array<BreakingOption>, component
errorKey: 'JIT_COMPONENT_TESTING',
isWarning: false,
},
{
name: 'experimentalSkipDomainInjection',
errorKey: 'EXPERIMENTAL_SKIP_DOMAIN_INJECTION',
isWarning: false,
},
{
name: 'injectDocumentDomain',
errorKey: 'INJECT_DOCUMENT_DOMAIN_DEPRECATION',
Expand Down Expand Up @@ -811,11 +797,6 @@ export const testingTypeBreakingOptions: { e2e: Array<BreakingOption>, component
errorKey: 'EXPERIMENTAL_ORIGIN_DEPENDENCIES_E2E_ONLY',
isWarning: false,
},
{
name: 'experimentalSkipDomainInjection',
errorKey: 'EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY',
isWarning: false,
},
{
name: 'injectDocumentDomain',
errorKey: 'INJECT_DOCUMENT_DOMAIN_E2E_ONLY',
Expand Down
2 changes: 0 additions & 2 deletions packages/config/test/project/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,6 @@ describe('config/src/project/utils', () => {
excludeSpecPattern: { value: '*.hot-update.js', from: 'default' },
execTimeout: { value: 60000, from: 'default' },
experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' },
experimentalSkipDomainInjection: { value: null, from: 'default' },
experimentalCspAllowList: { value: false, from: 'default' },
experimentalInteractiveRunEvents: { value: false, from: 'default' },
experimentalMemoryManagement: { value: false, from: 'default' },
Expand Down Expand Up @@ -1191,7 +1190,6 @@ describe('config/src/project/utils', () => {
excludeSpecPattern: { value: '*.hot-update.js', from: 'default' },
execTimeout: { value: 60000, from: 'default' },
experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' },
experimentalSkipDomainInjection: { value: null, from: 'default' },
experimentalCspAllowList: { value: false, from: 'default' },
experimentalInteractiveRunEvents: { value: false, from: 'default' },
experimentalMemoryManagement: { value: false, from: 'default' },
Expand Down

This file was deleted.

9 changes: 1 addition & 8 deletions packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1350,20 +1350,13 @@ export const AllCypressErrors = {
return errTemplate`\
The ${fmt.highlight(`justInTimeCompile`)} configuration is only supported for Component Testing.`
},
EXPERIMENTAL_SKIP_DOMAIN_INJECTION: () => {
EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED: () => {
return errTemplate`\
The ${fmt.highlight(`experimentalSkipDomainInjection`)} experiment is over. ${fmt.highlight('document.domain')} injection is now off by default.

Read the migration guide for Cypress v14.0.0: https://on.cypress.com/migration-guide
`
},
EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY: () => {
return errTemplate`\
The ${fmt.highlight(`experimentalSkipDomainInjection`)} experiment is over, and this configuration option is no longer honored.

Read the migration guide for Cypress v14.0.0: https://on.cypress.com/migration-guide
`
},
// TODO: link to docs on injectDocumentDomain
INJECT_DOCUMENT_DOMAIN_DEPRECATION: () => {
return errTemplate`\
Expand Down
8 changes: 1 addition & 7 deletions packages/errors/test/unit/visualSnapshotErrors_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1400,12 +1400,6 @@ describe('visual error templates', () => {
}
},

EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY: () => {
return {
default: [],
}
},

PROXY_ENCOUNTERED_INVALID_HEADER_NAME: () => {
const err = makeErr()

Expand All @@ -1422,7 +1416,7 @@ describe('visual error templates', () => {
}
},

EXPERIMENTAL_SKIP_DOMAIN_INJECTION: () => {
EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED: () => {
return {
default: [],
}
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend-shared/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,6 @@
"experimentalMemoryManagement": {
"name": "Memory Management",
"description": "Enables support for improved memory management within Chromium-based browsers."
},
"experimentalSkipDomainInjection": {
"name": "Skip Domain Injection",
"description": "Disables setting `document.domain` to the application's super domain on injection."
}
},
"device": {
Expand Down
3 changes: 1 addition & 2 deletions packages/graphql/schemas/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1196,10 +1196,9 @@ enum ErrorTypeEnum {
EXPERIMENTAL_SESSION_SUPPORT_REMOVED
EXPERIMENTAL_SHADOW_DOM_REMOVED
EXPERIMENTAL_SINGLE_TAB_RUN_MODE
EXPERIMENTAL_SKIP_DOMAIN_INJECTION
EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED
EXPERIMENTAL_STUDIO_E2E_ONLY
EXPERIMENTAL_STUDIO_REMOVED
EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY
EXTENSION_NOT_LOADED
FIREFOX_CDP_FAILED_TO_CONNECT
FIREFOX_COULD_NOT_CONNECT
Expand Down
2 changes: 0 additions & 2 deletions packages/server/lib/experiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ interface StringValues {
const _summaries: StringValues = {
experimentalInteractiveRunEvents: 'Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.',
experimentalModifyObstructiveThirdPartyCode: 'Applies `modifyObstructiveCode` to third party `.html` and `.js`, removes subresource integrity, and modifies the user agent in Electron.',
experimentalSkipDomainInjection: 'Disables setting document.domain to the document\'s super domain on injection.',
experimentalSourceRewriting: 'Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.',
experimentalSingleTabRunMode: 'Runs all component specs in a single tab, trading spec isolation for faster run mode execution.',
experimentalStudio: 'Generate and save commands directly to your test suite by interacting with your app as an end user would.',
Expand All @@ -76,7 +75,6 @@ const _summaries: StringValues = {
const _names: StringValues = {
experimentalInteractiveRunEvents: 'Interactive Mode Run Events',
experimentalModifyObstructiveThirdPartyCode: 'Modify Obstructive Third Party Code',
experimentalSkipDomainInjection: 'Use Default document.domain',
experimentalSingleTabRunMode: 'Single Tab Run Mode',
experimentalSourceRewriting: 'Improved Source Rewriting',
experimentalStudio: 'Studio',
Expand Down
1 change: 0 additions & 1 deletion system-tests/__snapshots__/results_spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ exports['module api and after:run results'] = `
"experimentalMemoryManagement": false,
"experimentalModifyObstructiveThirdPartyCode": false,
"injectDocumentDomain": false,
"experimentalSkipDomainInjection": null,
"experimentalOriginDependencies": false,
"experimentalSourceRewriting": false,
"experimentalSingleTabRunMode": false,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe('e2e experimentalSkipDomainInjection=true', () => {
browser: '!webkit', // TODO(webkit): fix+unskip (needs multidomain support)
// keep the port the same to prevent issues with the snapshot
port: PORT,
spec: 'experimental_skip_domain_injection.cy.ts',
snapshot: true,
expectedExitCode: 1,
config: {
Expand Down
Loading