Skip to content

Commit 7d23c06

Browse files
committed
Merge branch '10.0-release' into tgriesser/chore/e2e-data-clean
* 10.0-release: feat: improve vite DX (#18937) feat: Use plugins on config files (#18798) BREAKING CHANGE: trigger major bump BREAKING CHANGE: trigger major bump fix: fix cypress/package.json crasher fix(breaking): change circle.yml to release binary fix: build-prod-ui deps before build-prod packages feat: implement spec list tree (#18901) chore: adding 10.0-release to the circle.yml build script (#18926) feat(app): remove __vite__ route and default to unified runner (#18909) fix: app layout + specs list review (#18862) feat(app): show previous versions (#18838) feat: scaffold integration files in app (#18763) feat: add footer to the settings (#18867) fix: Exit when both --e2e and --component flags are passed in (#18855)
2 parents 8bdbd1a + 2eb0ff5 commit 7d23c06

File tree

348 files changed

+4323
-3147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+4323
-3147
lines changed

circle.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ macBuildFilters: &macBuildFilters
88
branches:
99
only:
1010
- develop
11+
- 10.0-release
1112
- tgriesser/chore/fix-release
1213

1314
defaults: &defaults
@@ -42,6 +43,7 @@ onlyMainBranches: &onlyMainBranches
4243
branches:
4344
only:
4445
- develop
46+
- 10.0-release
4547
- tgriesser/chore/fix-release
4648
requires:
4749
- create-build-artifacts
@@ -1030,6 +1032,8 @@ jobs:
10301032
runner-integration-tests-chrome,
10311033
runner-ct-integration-tests-chrome,
10321034
reporter-integration-tests,
1035+
run-app-integration-tests-chrome,
1036+
run-launchpad-integration-tests-chrome
10331037
- run: yarn percy build:finalize
10341038

10351039
cli-visual-tests:
@@ -1618,7 +1622,7 @@ jobs:
16181622
- run:
16191623
name: Check current branch to persist artifacts
16201624
command: |
1621-
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "tgriesser/chore/fix-release" ]]; then
1625+
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "10.0-release" ]]; then
16221626
echo "Not uploading artifacts or posting install comment for this branch."
16231627
circleci-agent step halt
16241628
fi
@@ -1912,7 +1916,21 @@ jobs:
19121916
CYPRESS_INTERNAL_FORCE_SCAFFOLD: "1"
19131917
command: |
19141918
rm -rf cypress.json
1915-
echo 'export default {}' > cypress.config.ts
1919+
echo "export default {
1920+
e2e: {
1921+
setupNodeEvents (on, config) {
1922+
on('task', {
1923+
log (x) {
1924+
console.log(x)
1925+
1926+
return null
1927+
},
1928+
})
1929+
1930+
return config
1931+
},
1932+
},
1933+
}" > cypress.config.ts
19161934
- run:
19171935
name: Run project tests 🗳
19181936
working_directory: <<parameters.wd>>
@@ -2310,6 +2328,7 @@ linux-workflow: &linux-workflow
23102328
branches:
23112329
only:
23122330
- develop
2331+
- 10.0-release
23132332
- tgriesser/chore/fix-release
23142333
requires:
23152334
- build
@@ -2322,6 +2341,7 @@ linux-workflow: &linux-workflow
23222341
branches:
23232342
only:
23242343
- develop
2344+
- 10.0-release
23252345
- tgriesser/chore/fix-release
23262346
requires:
23272347
- build
@@ -2372,6 +2392,7 @@ linux-workflow: &linux-workflow
23722392
branches:
23732393
only:
23742394
- develop
2395+
- 10.0-release
23752396
- tgriesser/chore/fix-release
23762397
requires:
23772398
- create-build-artifacts
@@ -2380,6 +2401,7 @@ linux-workflow: &linux-workflow
23802401
branches:
23812402
only:
23822403
- develop
2404+
- 10.0-release
23832405
- tgriesser/chore/fix-release
23842406
requires:
23852407
- create-build-artifacts
@@ -2389,6 +2411,7 @@ linux-workflow: &linux-workflow
23892411
branches:
23902412
only:
23912413
- develop
2414+
- 10.0-release
23922415
- tgriesser/chore/fix-release
23932416
requires:
23942417
- create-build-artifacts
@@ -2414,6 +2437,7 @@ linux-workflow: &linux-workflow
24142437
branches:
24152438
only:
24162439
- develop
2440+
- 10.0-release
24172441
- tgriesser/chore/fix-release
24182442
requires:
24192443
- create-build-artifacts
@@ -2486,6 +2510,7 @@ mac-workflow: &mac-workflow
24862510
branches:
24872511
only:
24882512
- develop
2513+
- 10.0-release
24892514
- tgriesser/chore/fix-release
24902515
requires:
24912516
- darwin-create-build-artifacts
@@ -2498,6 +2523,7 @@ mac-workflow: &mac-workflow
24982523
branches:
24992524
only:
25002525
- develop
2526+
- 10.0-release
25012527
- tgriesser/chore/fix-release
25022528
requires:
25032529
- darwin-create-build-artifacts

cli/__snapshots__/errors_spec.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,6 @@ Platform: test platform (Foo-OsVersion)
2626
Cypress Version: 1.2.3
2727
`
2828

29-
exports['errors individual has the following errors 1'] = [
30-
"CYPRESS_RUN_BINARY",
31-
"binaryNotExecutable",
32-
"childProcessKilled",
33-
"failedDownload",
34-
"failedUnzip",
35-
"incompatibleHeadlessFlags",
36-
"invalidCacheDirectory",
37-
"invalidCypressEnv",
38-
"invalidRunProjectPath",
39-
"invalidSmokeTestDisplayError",
40-
"invalidTestingType",
41-
"missingApp",
42-
"missingDependency",
43-
"missingXvfb",
44-
"nonZeroExitCodeXvfb",
45-
"notInstalledCI",
46-
"smokeTestFailure",
47-
"unexpected",
48-
"unknownError",
49-
"versionMismatch"
50-
]
51-
5229
exports['invalid display error'] = `
5330
Cypress verification failed.
5431
@@ -95,3 +72,28 @@ Consider opening a new issue.
9572
Platform: test platform (Foo-OsVersion)
9673
Cypress Version: 1.2.3
9774
`
75+
76+
exports['errors individual has the following errors 1'] = [
77+
"CYPRESS_RUN_BINARY",
78+
"binaryNotExecutable",
79+
"childProcessKilled",
80+
"failedDownload",
81+
"failedUnzip",
82+
"incompatibleHeadlessFlags",
83+
"incompatibleTestTypeFlags",
84+
"incompatibleTestingTypeAndFlag",
85+
"invalidCacheDirectory",
86+
"invalidCypressEnv",
87+
"invalidRunProjectPath",
88+
"invalidSmokeTestDisplayError",
89+
"invalidTestingType",
90+
"missingApp",
91+
"missingDependency",
92+
"missingXvfb",
93+
"nonZeroExitCodeXvfb",
94+
"notInstalledCI",
95+
"smokeTestFailure",
96+
"unexpected",
97+
"unknownError",
98+
"versionMismatch"
99+
]

cli/lib/errors.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const binaryNotExecutable = (executable) => {
7373
7474
Please check that you have the appropriate user permissions.
7575
76-
You can also try clearing the cache with 'cypress cache clear' and reinstalling.
76+
You can also try clearing the cache with 'cypress cache clear' and reinstalling.
7777
`,
7878
}
7979
}
@@ -213,6 +213,16 @@ const invalidTestingType = {
213213
solution: `Please provide a valid testingType. Valid test types are ${chalk.cyan('\'e2e\'')} and ${chalk.cyan('\'component\'')}.`,
214214
}
215215

216+
const incompatibleTestTypeFlags = {
217+
description: '`--e2e` and `--component` cannot both be passed.',
218+
solution: 'Either pass `--e2e` or `--component`, but not both.',
219+
}
220+
221+
const incompatibleTestingTypeAndFlag = {
222+
description: 'Set a `testingType` and also passed `--e2e` or `--component` flags.',
223+
solution: 'Either set `testingType` or pass a testing type flag, but not both.',
224+
}
225+
216226
/**
217227
* This error happens when CLI detects that the child Test Runner process
218228
* was killed with a signal, like SIGBUS
@@ -404,5 +414,7 @@ module.exports = {
404414
incompatibleHeadlessFlags,
405415
invalidRunProjectPath,
406416
invalidTestingType,
417+
incompatibleTestTypeFlags,
418+
incompatibleTestingTypeAndFlag,
407419
},
408420
}

cli/lib/exec/shared.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ const throwInvalidOptionError = (details) => {
2424
* @returns {string[]} The array of new exec arguments
2525
*/
2626
const processTestingType = (options) => {
27+
if (options.e2e && options.component) {
28+
return throwInvalidOptionError(errors.incompatibleTestTypeFlags)
29+
}
30+
31+
if (options.testingType && (options.component || options.e2e)) {
32+
return throwInvalidOptionError(errors.incompatibleTestTypeFlags)
33+
}
34+
2735
if (options.testingType === 'component' || options.component || options.ct) {
2836
return ['--testing-type', 'component']
2937
}

cli/lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ const getApplicationDataFolder = (...paths) => {
259259

260260
const ELECTRON_APP_DATA_PATH = path.join(OS_DATA_PATH, PRODUCT_NAME)
261261

262-
if (process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF === 'true') {
262+
if (process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF) {
263263
folder = `${folder}-e2e-test`
264264
}
265265

cli/test/lib/exec/run_spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ describe('exec run', function () {
104104
it('throws if testingType is invalid', () => {
105105
expect(() => run.processRunOptions({ testingType: 'randomTestingType' })).to.throw()
106106
})
107+
108+
it('throws if both e2e and component are set', () => {
109+
expect(() => run.processRunOptions({ e2e: true, component: true })).to.throw()
110+
})
111+
112+
it('throws if both testingType and component are set', () => {
113+
expect(() => run.processRunOptions({ testingType: 'component', component: true })).to.throw()
114+
})
107115
})
108116

109117
context('.start', function () {

cli/test/spec_helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const mockfs = require('mock-fs')
66
const Promise = require('bluebird')
77
const util = require('../lib/util')
88
const { MockChildProcess } = require('spawn-mock')
9+
910
const _kill = MockChildProcess.prototype.kill
1011

1112
const patchMockSpawn = () => {

cli/types/cypress.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,6 +2813,11 @@ declare namespace Cypress {
28132813
* An array of objects defining the certificates
28142814
*/
28152815
clientCertificates: ClientCertificate[]
2816+
2817+
/**
2818+
* Handle Cypress plugins
2819+
*/
2820+
setupNodeEvents: (on: PluginEvents, config: PluginConfigOptions) => Promise<PluginConfigOptions> | PluginConfigOptions
28162821
}
28172822

28182823
/**

npm/angular/cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ export default defineConfig({
99
'component': {
1010
'componentFolder': 'src/app',
1111
'testFiles': '**/*cy-spec.ts',
12+
'setupNodeEvents': require('./cypress/plugins'),
1213
},
1314
})

npm/design-system/cypress.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,13 @@ module.exports = {
1313
],
1414
componentFolder: 'src',
1515
fixturesFolder: false,
16+
component: {
17+
setupNodeEvents (on, config) {
18+
const { startDevServer } = require('@cypress/vite-dev-server')
19+
20+
on('dev-server:start', (options) => startDevServer({ options }))
21+
22+
return config
23+
},
24+
},
1625
}

0 commit comments

Comments
 (0)