Skip to content

Commit 4d6347c

Browse files
feat: Remove Studio as experimental - Turn Studio Beta on for all users of Cypress (no need for config flag) (#32571)
* clean up experimental studio config * clean up studio test * clean tests and add a test for new warning * add snapshot tests * revert unneeded changes * revert unneeded changes * only initialize studio lifecycle manager when testing type is e2e * update changelog * fix changelog * add missing line break * fix tests * remove duplicate pending changelog entries * Update packages/errors/src/errors.ts * Replace HTML error snapshot with ansi snapshot * fix changelog * update system tests results snapshot --------- Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
1 parent 739289a commit 4d6347c

File tree

21 files changed

+55
-128
lines changed

21 files changed

+55
-128
lines changed

cli/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
22
## 15.4.0
33

4-
_Released 10/07/2025 (PENDING)_
4+
_Released 10/7/2025 (PENDING)_
55

66
**Features:**
77

8+
- Cypress Studio is now available by default. You no longer have to set the `experimentalStudio` flag. Addresses [#30997](https://github.com/cypress-io/cypress/issues/30997). Addressed in [#32571](https://github.com/cypress-io/cypress/pull/32571).
89
- Added the `--posix-exit-codes` flag for the `run` command. When this flag is passed, Cypress will exit with 1 if any tests fail, rather than the number of failed tests. Addresses [#32605](https://github.com/cypress-io/cypress/issues/32605) and [#24695](https://github.com/cypress-io/cypress/issues/24695). Addressed in [#32609](https://github.com/cypress-io/cypress/pull/32609).
910

1011
**Bugfixes:**

guides/studio-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To run against locally developed Studio:
1717
- Run `yarn cypress:open`
1818
- Log In to the Cloud via the App
1919
- Ensure the project has been setup in the `Cypress (staging)` if in staging environment or `Cypress Internal Org` if in production environment and has a `projectId` that represents that. If developing against locally running `cypress-services`, ensure that the project has the feature `studio-ai` enabled for it.
20-
- Open a project that has `experimentalStudio: true` set in the `e2e` config of the `cypress.config.js|ts` file.
20+
- Open a project with `e2e` tests.
2121
- Click to 'Add Commands to Test' after hovering over a test command.
2222

2323
Note: When using the `CYPRESS_LOCAL_STUDIO_PATH` environment variable or when running the Cypress app via the locally cloned repository, we bypass our error reporting and instead log errors to the browser or node console.

packages/app/cypress.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default defineConfig({
3131
},
3232
'e2e': {
3333
experimentalRunAllSpecs: true,
34-
experimentalStudio: true,
3534
experimentalOriginDependencies: true,
3635
baseUrl: 'http://localhost:5555',
3736
supportFile: 'cypress/e2e/support/e2eSupport.ts',

packages/app/cypress/e2e/studio/studio.cy.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ describe('Cypress Studio', () => {
2929
})
3030
}
3131

32-
it('does not show the studio button if experimentalStudio is not enabled', () => {
33-
loadProjectAndRunSpec({ cliArgs: ['--config', 'experimentalStudio=false'] })
34-
35-
cy.findByTestId('studio-button').should('not.exist')
36-
})
37-
38-
it('shows the studio button if experimentalStudio is enabled', () => {
39-
loadProjectAndRunSpec({ cliArgs: ['--config', 'experimentalStudio=true'] })
40-
41-
cy.findByTestId('studio-button').should('be.visible')
42-
})
43-
4432
it('does not display the launch studio button when test is pending', () => {
4533
loadProjectAndRunSpec({ specName: 'skipped.cy.js' })
4634

@@ -1042,7 +1030,7 @@ it('new-test', function() {
10421030
cy.percySnapshot()
10431031
})
10441032

1045-
it('hides selector playground and studio controls when experimentalStudio is enabled', () => {
1033+
it('hides selector playground and studio controls', () => {
10461034
launchStudio()
10471035

10481036
cy.findByTestId('studio-panel').should('be.visible')
@@ -1235,18 +1223,6 @@ describe('studio functionality', () => {
12351223
cy.scaffoldProject('run-all-specs')
12361224
cy.openProject('run-all-specs')
12371225

1238-
// Enable experimental studio by modifying the config
1239-
cy.withCtx(async (ctx) => {
1240-
const configPath = 'cypress.config.js'
1241-
const configContent = await ctx.actions.file.readFileInProject(configPath)
1242-
const updatedConfig = configContent.replace(
1243-
'experimentalRunAllSpecs: true,',
1244-
'experimentalRunAllSpecs: true,\n experimentalStudio: true,',
1245-
)
1246-
1247-
await ctx.actions.file.writeFileInProject(configPath, updatedConfig)
1248-
})
1249-
12501226
cy.startAppServer('e2e')
12511227
cy.visitApp()
12521228
cy.specsPageIsVisible()

packages/app/src/runner/SpecRunnerOpenMode.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,13 @@ const studioBetaAvailable = computed(() => {
313313
})
314314
315315
const shouldShowStudioButton = computed(() => {
316-
// Find the experimentalStudio config field
317-
const experimentalStudioConfig = props.gql.currentProject?.config?.find((item) => item.field === 'experimentalStudio')
318-
const experimentalStudioEnabled = experimentalStudioConfig?.value === true
319-
320316
// Check if we're running all specs by looking at the route query
321317
const isRunningAllSpecs = route.query.file === '__all'
322318
323319
// Studio can only be enabled for e2e testing
324320
const isE2ETesting = props.gql.currentProject?.currentTestingType === 'e2e'
325321
326-
return !!cloudStudioRequested.value && !studioStore.isOpen && experimentalStudioEnabled && !isRunningAllSpecs && isE2ETesting
322+
return !!cloudStudioRequested.value && !studioStore.isOpen && !isRunningAllSpecs && isE2ETesting
327323
})
328324
329325
const shouldShowStudioPanel = computed(() => {

packages/app/src/runner/reporter.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getMobxRunnerStore, MobxRunnerStore, useSpecStore } from '../store'
22
import { getReporterElement } from './utils'
33
import { getEventManager } from '.'
4-
import { getRunnerConfigFromWindow } from './get-runner-config-from-window'
54
import type { EventManager } from './event-manager'
65
import { useRunnerUiStore } from '../store/runner-ui-store'
76

@@ -43,8 +42,6 @@ function renderReporter (
4342
const runnerUiStore = useRunnerUiStore()
4443
const specsStore = useSpecStore()
4544

46-
const config = getRunnerConfigFromWindow()
47-
4845
const reporter = window.UnifiedRunner.React.createElement(window.UnifiedRunner.Reporter, {
4946
runMode: 'single' as const,
5047
runner: eventManager.reporterBus,
@@ -53,7 +50,7 @@ function renderReporter (
5350
error: null,
5451
resetStatsOnSpecChange: true,
5552
// Studio can only be enabled for e2e testing
56-
studioEnabled: window.__CYPRESS_TESTING_TYPE__ === 'e2e' && config.experimentalStudio,
53+
studioEnabled: window.__CYPRESS_TESTING_TYPE__ === 'e2e',
5754
runnerStore: store,
5855
testFilter: specsStore.testFilter,
5956
})

packages/config/src/options.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const BREAKING_OPTION_ERROR_KEY: Readonly<AllCypressErrorNames[]> = [
1616
'EXPERIMENTAL_SINGLE_TAB_RUN_MODE',
1717
'VIDEO_UPLOAD_ON_PASSES_REMOVED',
1818
'RENAMED_CONFIG_OPTION',
19+
'EXPERIMENTAL_STUDIO_REMOVED',
1920
] as const
2021

2122
type ValidationOptions = {
@@ -240,12 +241,6 @@ const driverConfigOptions: Array<DriverConfigOption> = [
240241
validation: validate.isBoolean,
241242
isExperimental: true,
242243
requireRestartOnChange: 'server',
243-
}, {
244-
name: 'experimentalStudio',
245-
defaultValue: false,
246-
validation: validate.isBoolean,
247-
isExperimental: true,
248-
requireRestartOnChange: 'server',
249244
}, {
250245
name: 'experimentalWebKitSupport',
251246
defaultValue: false,
@@ -620,6 +615,11 @@ export const breakingOptions: Readonly<BreakingOption[]> = [
620615
errorKey: 'VIDEO_UPLOAD_ON_PASSES_REMOVED',
621616
isWarning: true,
622617
},
618+
{
619+
name: 'experimentalStudio',
620+
errorKey: 'EXPERIMENTAL_STUDIO_REMOVED',
621+
isWarning: true,
622+
},
623623
] as const
624624

625625
export const breakingRootOptions: Array<BreakingOption> = [
@@ -707,11 +707,6 @@ export const testingTypeBreakingOptions: { e2e: Array<BreakingOption>, component
707707
errorKey: 'CONFIG_FILE_INVALID_TESTING_TYPE_CONFIG_COMPONENT',
708708
isWarning: false,
709709
},
710-
{
711-
name: 'experimentalStudio',
712-
errorKey: 'EXPERIMENTAL_STUDIO_E2E_ONLY',
713-
isWarning: false,
714-
},
715710
{
716711
name: 'testIsolation',
717712
errorKey: 'CONFIG_FILE_INVALID_TESTING_TYPE_CONFIG_COMPONENT',

packages/config/test/__snapshots__/index.spec.ts.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`config/src/index > .getBreakingKeys > returns list of breaking config k
66
"experimentalSessionAndOrigin",
77
"experimentalSkipDomainInjection",
88
"videoUploadOnPasses",
9+
"experimentalStudio",
910
]
1011
`;
1112

@@ -44,7 +45,6 @@ exports[`config/src/index > .getDefaultValues > returns list of public config ke
4445
"experimentalRunAllSpecs": false,
4546
"experimentalSingleTabRunMode": false,
4647
"experimentalSourceRewriting": false,
47-
"experimentalStudio": false,
4848
"experimentalWebKitSupport": false,
4949
"fileServerFolder": "",
5050
"fixturesFolder": "cypress/fixtures",
@@ -139,7 +139,6 @@ exports[`config/src/index > .getDefaultValues > returns list of public config ke
139139
"experimentalRunAllSpecs": false,
140140
"experimentalSingleTabRunMode": false,
141141
"experimentalSourceRewriting": false,
142-
"experimentalStudio": false,
143142
"experimentalWebKitSupport": false,
144143
"fileServerFolder": "",
145144
"fixturesFolder": "cypress/fixtures",
@@ -223,7 +222,6 @@ exports[`config/src/index > .getPublicConfigKeys > returns list of public config
223222
"experimentalOriginDependencies",
224223
"experimentalSourceRewriting",
225224
"experimentalSingleTabRunMode",
226-
"experimentalStudio",
227225
"experimentalWebKitSupport",
228226
"fileServerFolder",
229227
"fixturesFolder",

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,20 @@ describe('config/src/project/utils', () => {
994994
})
995995
})
996996

997+
it('warns if experimentalStudio is passed', async function () {
998+
await defaults('experimentalStudio', true, {
999+
experimentalStudio: true,
1000+
})
1001+
1002+
expect(errors.warning).toBeCalledWith('EXPERIMENTAL_STUDIO_REMOVED', {
1003+
configFile: 'cypress.config.js',
1004+
name: 'experimentalStudio',
1005+
newName: undefined,
1006+
testingType: undefined,
1007+
value: undefined,
1008+
})
1009+
})
1010+
9971011
describe('.resolved', () => {
9981012
it('sets reporter and port to cli', async () => {
9991013
const obj = {
@@ -1031,7 +1045,6 @@ describe('config/src/project/utils', () => {
10311045
experimentalOriginDependencies: { value: false, from: 'default' },
10321046
experimentalRunAllSpecs: { value: false, from: 'default' },
10331047
experimentalSingleTabRunMode: { value: false, from: 'default' },
1034-
experimentalStudio: { value: false, from: 'default' },
10351048
experimentalSourceRewriting: { value: false, from: 'default' },
10361049
experimentalWebKitSupport: { value: false, from: 'default' },
10371050
fileServerFolder: { value: '', from: 'default' },
@@ -1147,7 +1160,6 @@ describe('config/src/project/utils', () => {
11471160
experimentalOriginDependencies: { value: false, from: 'default' },
11481161
experimentalRunAllSpecs: { value: false, from: 'default' },
11491162
experimentalSingleTabRunMode: { value: false, from: 'default' },
1150-
experimentalStudio: { value: false, from: 'default' },
11511163
experimentalSourceRewriting: { value: false, from: 'default' },
11521164
experimentalWebKitSupport: { value: false, from: 'default' },
11531165
fileServerFolder: { value: '', from: 'default' },

packages/data-context/schemas/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ enum ErrorTypeEnum {
11821182
EXPERIMENTAL_SESSION_AND_ORIGIN_REMOVED
11831183
EXPERIMENTAL_SINGLE_TAB_RUN_MODE
11841184
EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED
1185-
EXPERIMENTAL_STUDIO_E2E_ONLY
1185+
EXPERIMENTAL_STUDIO_REMOVED
11861186
EXTENSION_NOT_LOADED
11871187
FIREFOX_COULD_NOT_CONNECT
11881188
FIXTURE_NOT_FOUND

0 commit comments

Comments
 (0)