Skip to content

Commit 2f48aac

Browse files
committed
Merge branch '10.0-release' into tgriesser/feat/improve-vite-dx
* 10.0-release: 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)
2 parents 76b9af2 + bb8251b commit 2f48aac

File tree

290 files changed

+3348
-2883
lines changed

Some content is hidden

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

290 files changed

+3348
-2883
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/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
}

npm/design-system/cypress/plugins/index.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

npm/react/cypress.config.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-check
2+
13
module.exports = {
24
'viewportWidth': 400,
35
'viewportHeight': 400,
@@ -12,4 +14,70 @@ module.exports = {
1214
'**/__image_snapshots__/*',
1315
],
1416
'experimentalFetchPolyfill': true,
17+
'component': {
18+
setupNodeEvents (on, config) {
19+
const { startDevServer } = require('@cypress/webpack-dev-server')
20+
const path = require('path')
21+
const babelConfig = require('./babel.config.js')
22+
23+
const webpackConfig = {
24+
resolve: {
25+
extensions: ['.js', '.ts', '.jsx', '.tsx'],
26+
},
27+
mode: 'development',
28+
devtool: false,
29+
output: {
30+
publicPath: '/',
31+
chunkFilename: '[name].bundle.js',
32+
},
33+
module: {
34+
rules: [
35+
{
36+
test: /\.(js|jsx|mjs|ts|tsx)$/,
37+
loader: 'babel-loader',
38+
options: { ...babelConfig, cacheDirectory: path.resolve(__dirname, '..', '..', '.babel-cache') },
39+
},
40+
{
41+
test: /\.modules\.css$/i,
42+
exclude: [/node_modules/],
43+
use: [
44+
'style-loader',
45+
{
46+
loader: 'css-loader',
47+
options: {
48+
modules: true,
49+
},
50+
},
51+
],
52+
},
53+
{
54+
test: /\.css$/,
55+
exclude: [/node_modules/, /\.modules\.css$/i],
56+
use: ['style-loader', 'css-loader'],
57+
},
58+
{
59+
// some of our examples import SVG
60+
test: /\.svg$/,
61+
loader: 'svg-url-loader',
62+
},
63+
{
64+
// some of our examples import SVG
65+
test: /\.svg$/,
66+
loader: 'svg-url-loader',
67+
},
68+
{
69+
test: /\.(png|jpg)$/,
70+
use: ['file-loader'],
71+
},
72+
],
73+
},
74+
}
75+
76+
on('dev-server:start', (options) => {
77+
return startDevServer({ options, webpackConfig, disableLazyCompilation: false })
78+
})
79+
80+
return config
81+
},
82+
},
1583
}

npm/react/cypress/plugins/index.js

Lines changed: 0 additions & 73 deletions
This file was deleted.

npm/react/examples/a11y/cypress.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,17 @@ module.exports = {
44
'testFiles': '**/*spec.js',
55
'viewportWidth': 500,
66
'viewportHeight': 500,
7+
'component': {
8+
setupNodeEvents (on, config) {
9+
// load file devServer that comes with this plugin
10+
// https://github.com/bahmutov/cypress-react-unit-test#install
11+
const devServer = require('@cypress/react/plugins/react-scripts')
12+
13+
devServer(on, config)
14+
15+
// IMPORTANT to return the config object
16+
// with the any changed environment variables
17+
return config
18+
},
19+
},
720
}

npm/react/examples/a11y/cypress/plugins/index.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)