From 03325351a4c3a7b1ef9adbb7ad49a5caa39559a9 Mon Sep 17 00:00:00 2001 From: Diego Andai Date: Wed, 8 Jan 2025 14:29:49 -0300 Subject: [PATCH 1/3] [core] Remove Suspense and clock mocking from regressions and e2e tests (#44935) --- test/e2e/TestViewer.js | 8 +++---- test/regressions/TestViewer.js | 43 +++++++++++++--------------------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/test/e2e/TestViewer.js b/test/e2e/TestViewer.js index 09c21fd4d7f755..7b9db57d1b49fe 100644 --- a/test/e2e/TestViewer.js +++ b/test/e2e/TestViewer.js @@ -13,11 +13,9 @@ function TestViewer(props) { }, []); return ( - }> -
- {children} -
-
+
+ {children} +
); } diff --git a/test/regressions/TestViewer.js b/test/regressions/TestViewer.js index f261809e3c69b0..5d945bac91f2c8 100644 --- a/test/regressions/TestViewer.js +++ b/test/regressions/TestViewer.js @@ -1,6 +1,5 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import { useFakeTimers } from 'sinon'; import Box from '@mui/material/Box'; import GlobalStyles from '@mui/material/GlobalStyles'; import JoyBox from '@mui/joy/Box'; @@ -29,13 +28,6 @@ function TestViewer(props) { document.fonts.addEventListener('loading', handleFontsEvent); document.fonts.addEventListener('loadingdone', handleFontsEvent); - // Use a "real timestamp" so that we see a useful date instead of "00:00" - // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- useFakeTimers is not a React hook - // eslint-disable-next-line react-hooks/rules-of-hooks -- not a React hook - const clock = useFakeTimers({ - now: new Date('Mon Aug 18 14:11:54 2014 -0500'), - toFake: ['Date'], - }); // In case the child triggered font fetching we're not ready yet. // The fonts event handler will mark the test as ready on `loadingdone` if (document.fonts.status === 'loaded') { @@ -45,7 +37,6 @@ function TestViewer(props) { return () => { document.fonts.removeEventListener('loading', handleFontsEvent); document.fonts.removeEventListener('loadingdone', handleFontsEvent); - clock.restore(); }; }, []); @@ -76,29 +67,27 @@ function TestViewer(props) { }, }} /> - }> - {window.location.pathname.startsWith('/docs-joy') ? ( - - - {children} - - - ) : ( - + {children} - - )} - + + + ) : ( + + {children} + + )} ); } From 272d50dbba3d00c9d80a625b4235bc79f639fa51 Mon Sep 17 00:00:00 2001 From: Jan Potoms <2109932+Janpot@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:19:09 +0100 Subject: [PATCH 2/3] [code-infra] Stabilize flaky pigment progressbar tests (#44969) --- .../src/pages/material-ui/react-progress.tsx | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/apps/pigment-css-vite-app/src/pages/material-ui/react-progress.tsx b/apps/pigment-css-vite-app/src/pages/material-ui/react-progress.tsx index badcc6a712d49c..b597deeddb8f6a 100644 --- a/apps/pigment-css-vite-app/src/pages/material-ui/react-progress.tsx +++ b/apps/pigment-css-vite-app/src/pages/material-ui/react-progress.tsx @@ -1,4 +1,7 @@ import * as React from 'react'; +import LinearProgress, { LinearProgressProps } from '@mui/material/LinearProgress'; +import Typography from '@mui/material/Typography'; +import Box from '@mui/material/Box'; import MaterialUILayout from '../../Layout'; import CircularColor from '../../../../../docs/data/material/components/progress/CircularColor.tsx'; import CircularDeterminate from '../../../../../docs/data/material/components/progress/CircularDeterminate.tsx'; @@ -9,9 +12,23 @@ import CircularWithValueLabel from '../../../../../docs/data/material/components import CustomizedProgressBars from '../../../../../docs/data/material/components/progress/CustomizedProgressBars.tsx'; import DelayingAppearance from '../../../../../docs/data/material/components/progress/DelayingAppearance.tsx'; import LinearColor from '../../../../../docs/data/material/components/progress/LinearColor.tsx'; -import LinearDeterminate from '../../../../../docs/data/material/components/progress/LinearDeterminate.tsx'; import LinearIndeterminate from '../../../../../docs/data/material/components/progress/LinearIndeterminate.tsx'; -import LinearWithValueLabel from '../../../../../docs/data/material/components/progress/LinearWithValueLabel.tsx'; + +function LinearProgressWithLabel(props: LinearProgressProps & { value: number }) { + return ( + + + + + + {`${Math.round(props.value)}%`} + + + ); +} export default function Progress() { return ( @@ -65,6 +82,14 @@ export default function Progress() { +
+

Linear Buffer

+
+ + + +
+

Linear Color

@@ -74,7 +99,9 @@ export default function Progress() {

Linear Determinate

- + + +
@@ -86,7 +113,9 @@ export default function Progress() {

Linear With Value Label

- + + +
From 04fc1fa49eb9caaf0000d5b9fcc95823ad7b75db Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Wed, 8 Jan 2025 23:56:09 +0100 Subject: [PATCH 3/3] [website] Fix 301 infogreffe removed their en version --- docs/src/components/careers/CareersFaq.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/components/careers/CareersFaq.tsx b/docs/src/components/careers/CareersFaq.tsx index 7662d4c7709763..70a178bad825c8 100644 --- a/docs/src/components/careers/CareersFaq.tsx +++ b/docs/src/components/careers/CareersFaq.tsx @@ -83,7 +83,7 @@ const faqData = [ For those that chose the "employee": - - people in France are hired as full-time employees under the French [legal entity](https://www.infogreffe.com/entreprise-societe/852357748-material-ui-750119B189960000.html). + - people in France are hired as full-time employees under the French [legal entity](https://www.infogreffe.fr/entreprise-societe/852357748-material-ui-750119B189960000.html). - people outside of France are hired through an Employer of Record (EOR), for example, Deel: https://www.deel.com/. `, },