Skip to content

Commit fada0be

Browse files
authored
chore: fix flake for experimentalStudio config error test (#23800)
1 parent 1190c3e commit fada0be

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

packages/launchpad/cypress/e2e/config-warning.cy.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,9 @@ describe('experimentalSingleTabRunMode', () => {
111111
})
112112

113113
describe('experimentalStudio', () => {
114-
// TODO: fix this flaky test. https://github.com/cypress-io/cypress/issues/23743
115-
it.skip('is not a valid config for component testing', { defaultCommandTimeout: THIRTY_SECONDS }, () => {
114+
it('is not a valid config for component testing', () => {
116115
cy.scaffoldProject('experimentalSingleTabRunMode')
117-
cy.openProject('experimentalSingleTabRunMode')
118-
cy.withCtx(async (ctx) => {
119-
await ctx.actions.file.writeFileInProject('cypress.config.js', `
120-
const { defineConfig } = require('cypress')
121-
122-
module.exports = defineConfig({
123-
component: {
124-
experimentalStudio: true,
125-
devServer () {
126-
// This test doesn't need to actually run any component tests
127-
// so we create a fake dev server to make it run faster and
128-
// avoid flake on CI.
129-
return {
130-
port: 1234,
131-
close: () => {},
132-
}
133-
},
134-
},
135-
})`)
136-
})
116+
cy.openProject('experimentalSingleTabRunMode', ['--config-file', 'cypress-invalid-studio-experiment.config.js'])
137117

138118
cy.visitLaunchpad()
139119
cy.get('[data-cy-testingtype="component"]').click()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const { defineConfig } = require('cypress')
2+
3+
module.exports = defineConfig({
4+
component: {
5+
// This property is invalid as `experimentalStudio` is only available for e2e
6+
experimentalStudio: true,
7+
devServer () {
8+
// This test doesn't need to actually run any component tests
9+
// so we create a fake dev server to make it run faster and
10+
// avoid flake on CI.
11+
return {
12+
port: 1234,
13+
close: () => {},
14+
}
15+
},
16+
},
17+
})

0 commit comments

Comments
 (0)