Skip to content

[internal] Use a single browser server in CI #18230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,31 @@ jobs:
- install_js:
playwright: true
react-version: << parameters.react-version >>

- when:
condition:
not:
equal: ['stable', << parameters.react-version >>]
steps:
- run:
environment:
TZ: UTC
PLAYWRIGHT_SERVER_WS: 'ws://127.0.0.1:9050/mui-browser'
name: Test Browser
command: pnpm test:unit:browser
command: |
node ./scripts/playwrightLaunchServer.mjs & pnpm test:unit:browser
- when:
condition:
equal: ['stable', << parameters.react-version >>]
steps:
- run:
name: Test Browser + Coverage
command: pnpm test:unit:browser --coverage
environment:
TZ: UTC
PLAYWRIGHT_SERVER_WS: 'ws://127.0.0.1:9050/mui-browser'
command: |
node ./scripts/playwrightLaunchServer.mjs & pnpm test:unit:browser --coverage

- run:
name: Check coverage generated
command: |
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.33.0",
"@vitejs/plugin-react": "^4.5.0",
"@vitest/browser": "^3.2.0",
"@vitest/coverage-v8": "^3.2.0",
"@vitejs/plugin-react": "^4.5.1",
"@vitest/browser": "^3.2.2",
"@vitest/coverage-v8": "^3.2.2",
Comment on lines +116 to +118
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also upgrade packages across the board as they released 20min ago 🤷

"@vvago/vale": "^3.11.2",
"autoprefixer": "^10.4.21",
"axe-core": "4.10.3",
Expand Down Expand Up @@ -195,7 +195,7 @@
"unist-util-visit": "^5.0.0",
"util": "^0.12.5",
"vite": "^6.3.5",
"vitest": "3.2.0",
"vitest": "3.2.2",
"vitest-fail-on-console": "^0.7.1",
"webpack": "^5.99.9",
"webpack-bundle-analyzer": "^4.10.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/x-charts-pro/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
Comment on lines 14 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid this warning
Screenshot 2025-06-05 at 12 11 07

Suggested change
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {
browser: 'chromium',
}),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these happen on the grid tests only, so I changed there

},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-charts/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-data-grid-premium/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
16 changes: 12 additions & 4 deletions packages/x-data-grid-pro/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
launch: {
// Required for tests which use scrollbars.
ignoreDefaultArgs: ['--hide-scrollbars'],
},
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {
launch: {
// Required for tests which use scrollbars.
ignoreDefaultArgs: ['--hide-scrollbars'],
},
}),
},
],
},
Expand Down
16 changes: 12 additions & 4 deletions packages/x-data-grid/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
launch: {
// Required for tests which use scrollbars.
ignoreDefaultArgs: ['--hide-scrollbars'],
},
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {
launch: {
// Required for tests which use scrollbars.
ignoreDefaultArgs: ['--hide-scrollbars'],
},
}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-date-pickers-pro/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-date-pickers/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-license/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-scheduler/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-telemetry/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-tree-view-pro/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/x-tree-view/vitest.config.browser.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export default mergeConfig(sharedConfig, {
instances: [
{
browser: 'chromium',
...(process.env.PLAYWRIGHT_SERVER_WS
? {
connect: {
wsEndpoint: process.env.PLAYWRIGHT_SERVER_WS,
},
}
: {}),
},
],
},
Expand Down
Loading