From 5f9c154d3b0550fe9cbf837238c6b1bdd06d9b34 Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Wed, 13 Mar 2024 15:56:15 +0800 Subject: [PATCH 1/3] Update karma config --- test/karma.conf.js | 12 ++++-------- test/karma.conf.profile.js | 14 +++++--------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/test/karma.conf.js b/test/karma.conf.js index 60778dbb4d..962c760cd1 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -188,26 +188,22 @@ module.exports = function setKarmaConfig(config) { os: 'OS X', os_version: 'Catalina', browser: 'chrome', - // We support Chrome 90.x - // However, >=88 fails on seemingly all focus-related tests. - // TODO: Investigate why. - browser_version: '87.0', + // We support Chrome 109.x per .browserslistrc + browser_version: '109.0', }, safari: { base: 'BrowserStack', os: 'OS X', os_version: 'Catalina', browser: 'safari', - // We support 12.5 on iOS. - // However, 12.x is very flaky on desktop (mobile is always flaky). - browser_version: '13.0', + browser_version: '15.6', }, edge: { base: 'BrowserStack', os: 'Windows', os_version: '10', browser: 'edge', - browser_version: '91.0', + browser_version: '120.0', }, }, }; diff --git a/test/karma.conf.profile.js b/test/karma.conf.profile.js index 6527c3babf..1bfaa5aec5 100644 --- a/test/karma.conf.profile.js +++ b/test/karma.conf.profile.js @@ -144,10 +144,8 @@ module.exports = function setKarmaConfig(config) { os: 'OS X', os_version: 'Catalina', browser: 'chrome', - // We support Chrome 90.x - // However, >=88 fails on seemingly all focus-related tests. - // TODO: Investigate why. - browser_version: '87.0', + // We support Chrome 109.x per .browserslistrc + browser_version: '109.0', }, // No accurate performance timings (integer precision instead of double). firefox: { @@ -155,7 +153,7 @@ module.exports = function setKarmaConfig(config) { os: 'Windows', os_version: '10', browser: 'firefox', - browser_version: '78.0', + browser_version: '15.0', }, // No accurate performance timings (integer precision instead of double). safari: { @@ -163,16 +161,14 @@ module.exports = function setKarmaConfig(config) { os: 'OS X', os_version: 'Catalina', browser: 'safari', - // We support 12.5 on iOS. - // However, 12.x is very flaky on desktop (mobile is always flaky). - browser_version: '13.0', + browser_version: '15.6', }, edge: { base: 'BrowserStack', os: 'Windows', os_version: '10', browser: 'edge', - browser_version: '91.0', + browser_version: '120.0', }, }, }; From 437c413f8a4214adbe2ec5a29054171d9f31ec61 Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Wed, 13 Mar 2024 18:29:31 +0800 Subject: [PATCH 2/3] Update MacOS version --- test/karma.conf.js | 4 ++-- test/karma.conf.profile.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/karma.conf.js b/test/karma.conf.js index 962c760cd1..67aa3a0735 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -186,7 +186,7 @@ module.exports = function setKarmaConfig(config) { chrome: { base: 'BrowserStack', os: 'OS X', - os_version: 'Catalina', + os_version: 'Monterey', browser: 'chrome', // We support Chrome 109.x per .browserslistrc browser_version: '109.0', @@ -194,7 +194,7 @@ module.exports = function setKarmaConfig(config) { safari: { base: 'BrowserStack', os: 'OS X', - os_version: 'Catalina', + os_version: 'Monterey', browser: 'safari', browser_version: '15.6', }, diff --git a/test/karma.conf.profile.js b/test/karma.conf.profile.js index 1bfaa5aec5..5bf1104dc9 100644 --- a/test/karma.conf.profile.js +++ b/test/karma.conf.profile.js @@ -159,7 +159,7 @@ module.exports = function setKarmaConfig(config) { safari: { base: 'BrowserStack', os: 'OS X', - os_version: 'Catalina', + os_version: 'Monterey', browser: 'safari', browser_version: '15.6', }, From 8f1e6162b89398ef075cad17f76b1c66b810ca94 Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Wed, 13 Mar 2024 19:03:16 +0800 Subject: [PATCH 3/3] Update readme --- test/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/README.md b/test/README.md index 36f904edc1..801262ea02 100644 --- a/test/README.md +++ b/test/README.md @@ -43,7 +43,7 @@ In addition to the core matchers from `chai` we also use matchers from [`chai-do Deciding where to put a test is (like naming things) a hard problem: -- When in doubt, put the new test case directly in the unit test file for that component e.g. `packages/mui-material/src/Button/Button.test.js`. +- When in doubt, put the new test case directly in the unit test file for that component e.g. `packages/mui-base/src/Button/Button.test.tsx`. - If your test requires multiple components from the library create a new integration test. - If you find yourself using a lot of `data-testid` attributes or you're accessing a lot of styles consider adding a component (that doesn't require any interaction) @@ -173,7 +173,7 @@ For example, you've opened a PR with the number 64209 and now after everything i ```bash curl --request POST \ - --url https://circleci.com/api/v2/project/gh/mui/material-ui/pipeline \ + --url https://circleci.com/api/v2/project/gh/mui/base-ui/pipeline \ --header 'content-type: application/json' \ --header 'Circle-Token: $CIRCLE_TOKEN' \ --data-raw '{"branch":"pull/64209/head","parameters":{"browserstack-force":true}}' @@ -229,7 +229,7 @@ The following command triggers the `profile` workflow for the pull request #2428 ```bash curl --request POST \ - --url https://circleci.com/api/v2/project/gh/mui/material-ui/pipeline \ + --url https://circleci.com/api/v2/project/gh/mui/base-ui/pipeline \ --header 'content-type: application/json' \ --header 'Circle-Token: $CIRCLE_TOKEN' \ --data-raw '{"branch":"pull/24289/head","parameters":{"workflow":"profile"}}' @@ -238,10 +238,10 @@ curl --request POST \ To analyze this profile run you can use https://mui-dashboard.netlify.app/test-profile/:job-number. To find out the job number you can start with the response of the previous CircleCI API request which includes the created pipeline id. -You then have to search in the [CircleCI UI](https://app.circleci.com/pipelines/github/mui/material-ui) for the job number of `test_profile` that is part of the started pipeline. +You then have to search in the [CircleCI UI](https://app.circleci.com/pipelines/github/mui/base-ui) for the job number of `test_profile` that is part of the started pipeline. The job number can be extracted from the URL of a particular CircleCI job. -For example, in https://app.circleci.com/pipelines/github/mui/material-ui/32796/workflows/23f946de-328e-49b7-9c94-bfe0a0248a12/jobs/211258 `jobs/211258` points to the job number which is in this case `211258` which means you want to visit https://mui-dashboard.netlify.app/test-profile/211258 to analyze the profile. +For example, in https://app.circleci.com/pipelines/github/mui/base-ui/32796/workflows/23f946de-328e-49b7-9c94-bfe0a0248a12/jobs/211258 `jobs/211258` points to the job number which is in this case `211258` which means you want to visit https://mui-dashboard.netlify.app/test-profile/211258 to analyze the profile. ### Testing multiple versions of React @@ -262,7 +262,7 @@ PR #24289 for `react@next` ```bash curl --request POST \ - --url https://circleci.com/api/v2/project/gh/mui/material-ui/pipeline \ + --url https://circleci.com/api/v2/project/gh/mui/base-ui/pipeline \ --header 'content-type: application/json' \ --header 'Circle-Token: $CIRCLE_TOKEN' \ --data-raw '{"branch":"pull/24289/head","parameters":{"react-version":"next"}}'