Skip to content

Commit 05c47e3

Browse files
committed
chore: update types, integation tests, and add comments
1 parent 0360e43 commit 05c47e3

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

cli/types/cypress.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3173,6 +3173,11 @@ declare namespace Cypress {
31733173
* @default false
31743174
*/
31753175
injectDocumentDomain: boolean
3176+
/**
3177+
* Enables the "Run All Specs" UI feature, allowing the execution of multiple specs sequentially.
3178+
* @default false
3179+
*/
3180+
experimentalRunAllSpecs?: boolean
31763181
/**
31773182
* Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.
31783183
* @default false
@@ -3274,11 +3279,6 @@ declare namespace Cypress {
32743279
}
32753280

32763281
interface EndToEndConfigOptions extends Omit<CoreConfigOptions, 'indexHtmlFile'> {
3277-
/**
3278-
* Enables the "Run All Specs" UI feature, allowing the execution of multiple specs sequentially.
3279-
* @default false
3280-
*/
3281-
experimentalRunAllSpecs?: boolean
32823282
/**
32833283
* Enables support for `Cypress.require()` for including dependencies within the `cy.origin()` callback.
32843284
* @default false

npm/vite-dev-server/client/initCypressTests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ if (supportFile) {
4949

5050
const specPath = new URLSearchParams(document.location.search).get('specPath')
5151

52+
// if the specPath is __all, then experimentalRunAllSpecs is set to true.
5253
if (specPath === '__all' || CypressInstance.spec.relative === '__all') {
5354
const runAllSpecs = window.parent.__RUN_ALL_SPECS__ || []
5455
const allSpecs = window.parent.__RUN_MODE_SPECS__ || []

packages/data-context/src/sources/HtmlDataSource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export class HtmlDataSource {
120120
<body>
121121
<script>
122122
window.__RUN_MODE_SPECS__ = ${JSON.stringify(this.ctx.project.specs)}
123+
<!-- __RUN_ALL_SPECS__ is only set if experimentalRunAllSpecs is set to true -->
123124
window.__RUN_ALL_SPECS__ = ${JSON.stringify(this.ctx.project.runAllSpecs || [])}
124125
window.__CYPRESS_MODE__ = ${JSON.stringify(this.ctx.isRunMode && !process.env.CYPRESS_INTERNAL_SIMULATE_OPEN_MODE ? 'run' : 'open')};
125126
window.__CYPRESS_CONFIG__ = ${JSON.stringify(serveConfig)};

packages/server/test/integration/cypress_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,9 +1868,9 @@ describe('lib/cypress', () => {
18681868

18691869
// "pick" out the list of properties that cannot exist on the root level so we can re-add them on the "e2e" object
18701870
// TODO: refactor this part of the test, this is silly and a holdover from pre-split-config
1871-
const { experimentalRunAllSpecs, experimentalOriginDependencies, supportFile, specPattern, excludeSpecPattern, baseUrl, slowTestThreshold, testIsolation, ...rest } = json
1871+
const { experimentalOriginDependencies, supportFile, specPattern, excludeSpecPattern, baseUrl, slowTestThreshold, testIsolation, ...rest } = json
18721872

1873-
return settings.writeForTesting(this.todosPath, { ...rest, e2e: { experimentalRunAllSpecs, experimentalOriginDependencies, baseUrl, supportFile, specPattern, testIsolation, excludeSpecPattern } })
1873+
return settings.writeForTesting(this.todosPath, { ...rest, e2e: { experimentalOriginDependencies, baseUrl, supportFile, specPattern, testIsolation, excludeSpecPattern } })
18741874
}).then(async () => {
18751875
await clearCtx()
18761876

0 commit comments

Comments
 (0)