-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][Tabs] Scrollable variant fails test when clicking the tab (error reading 'offsetHeight') #41388
Comments
Same here on Next.js with ppr activated (https://nextjs.org/docs/app/api-reference/next-config-js/partial-prerendering). |
Looks like a bug. |
Same happens for me but without tests, just when trying to navigate to a specific view. EDIT: What fixed it for me is using react and react-dom version 18.2.0 instead of 0.0.0-experimental-fb10a2c66-20240228 |
will be this fixed? can not update anymore nextjs , this is a simple check if the reference is undefined ..... |
This fails for me using the latest React 19 RC and React Compiler. |
Also started getting this issue when rendering const setMeasurements = () => {
if (nodeRef.current && scrollbarHeight.current) {
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
}
}; In case anyone else is blocked by this try https://www.npmjs.com/package/patch-package until this gets fixed |
Feel free to create a PR with a reproduction and a test. |
@ZeeshanTamboli I created a PR #42512 and linked it to this issue |
Demonstrating that the latest mui version still has the issue described in mui/material-ui#41388. ### Test Results ``` ➜ mui-test-fixture-41388 git:(test-fixture-latest) ✗ pnpm run test > [email protected] test /Users/nicholefrey/Workspace/mui-test-fixture-41388 > jest console.error Error: Uncaught [TypeError: Cannot read properties of null (reading 'offsetHeight')] at reportException (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24) at innerInvokeEventListeners (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9) at invokeEventListeners (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3) at HTMLUnknownElementImpl._dispatch (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9) at HTMLUnknownElementImpl.dispatchEvent (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17) at HTMLUnknownElement.dispatchEvent (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34) at Object.invokeGuardedCallbackDev (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12687:16) at invokeGuardedCallback (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12748:31) at reportUncaughtErrorInDEV (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12775:5) at captureCommitPhaseError (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16366:5) at commitPassiveMountEffects_complete (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14423:9) at commitPassiveMountEffects_begin (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { detail: TypeError: Cannot read properties of null (reading 'offsetHeight') at setMeasurements (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:40:47) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:58:5 at commitHookEffectListMount (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13038:26) at commitPassiveMountOnFiber (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14461:11) at commitPassiveMountEffects_complete (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14421:9) at commitPassiveMountEffects_begin (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7), type: 'unhandled exception' } at VirtualConsole.<anonymous> (node_modules/.pnpm/[email protected]/node_modules/jest-environment-jsdom/build/index.js:63:23) at reportException (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:70:28) at innerInvokeEventListeners (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9) at invokeEventListeners (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3) at HTMLUnknownElementImpl._dispatch (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9) at HTMLUnknownElementImpl.dispatchEvent (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17) at HTMLUnknownElement.dispatchEvent (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34) at Object.invokeGuardedCallbackDev (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12687:16) at invokeGuardedCallback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12748:31) at reportUncaughtErrorInDEV (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12775:5) at captureCommitPhaseError (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16366:5) at commitPassiveMountEffects_complete (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14423:9) at commitPassiveMountEffects_begin (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) console.error Error: Uncaught [TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.] at reportException (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24) at innerInvokeEventListeners (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9) at invokeEventListeners (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3) at HTMLUnknownElementImpl._dispatch (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9) at HTMLUnknownElementImpl.dispatchEvent (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17) at HTMLUnknownElement.dispatchEvent (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34) at Object.invokeGuardedCallbackDev (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12687:16) at invokeGuardedCallback (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12748:31) at reportUncaughtErrorInDEV (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12775:5) at captureCommitPhaseError (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16366:5) at commitPassiveMountEffects_complete (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14423:9) at commitPassiveMountEffects_begin (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { detail: TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'. at Object.exports.convert (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/Node.js:25:9) at MutationObserver.observe (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js:126:23) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/Tabs.js:542:24 at commitHookEffectListMount (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13038:26) at commitPassiveMountOnFiber (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14461:11) at commitPassiveMountEffects_complete (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14421:9) at commitPassiveMountEffects_begin (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7), type: 'unhandled exception' } at VirtualConsole.<anonymous> (node_modules/.pnpm/[email protected]/node_modules/jest-environment-jsdom/build/index.js:63:23) at reportException (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:70:28) at innerInvokeEventListeners (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9) at invokeEventListeners (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3) at HTMLUnknownElementImpl._dispatch (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9) at HTMLUnknownElementImpl.dispatchEvent (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17) at HTMLUnknownElement.dispatchEvent (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34) at Object.invokeGuardedCallbackDev (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12687:16) at invokeGuardedCallback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12748:31) at reportUncaughtErrorInDEV (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12775:5) at captureCommitPhaseError (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16366:5) at commitPassiveMountEffects_complete (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14423:9) at commitPassiveMountEffects_begin (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) console.error The above error occurred in the <ScrollbarSize> component: at ScrollbarSize (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:34:7) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Tabs (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/Tabs.js:215:44) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Container (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/Container/createContainer.js:110:19) at DynamicScrollableTabs (/Users/nicholefrey/Workspace/mui-test-fixture-41388/app/components/DynamicScrollableTabs.tsx:11:35) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Container (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/Container/createContainer.js:110:19) at main at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at Home at RtlProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/RtlProvider/index.js:19:7) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected][email protected]/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:51:5) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/styles/ThemeProvider.js:21:14) at AppRouterCacheProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected]_@[email protected]_jirg5sb6fuv6a2okjalkv3ce7e/node_modules/@mui/material-nextjs/node/v13-appRouter/appRouterV13.js:24:5) at ThemeContainer (/Users/nicholefrey/Workspace/mui-test-fixture-41388/app/ThemeContainer.tsx:11:58) at TestWrapper (/Users/nicholefrey/Workspace/mui-test-fixture-41388/utils/test-utils.tsx:11:52) Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. at logCapturedError (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8678:23) at update.callback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8711:5) at callCallback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5175:12) at commitUpdateQueue (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5196:9) at commitLayoutEffectOnFiber (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13271:13) at commitLayoutMountEffects_complete (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14369:9) at commitLayoutEffects_begin (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14355:7) at commitLayoutEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14340:3) at commitRootImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16101:5) at commitRoot (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15972:5) at performSyncWorkOnRoot (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15493:3) at flushSyncCallbacks (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2597:22) at flushPassiveEffectsImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16300:3) at flushPassiveEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) console.error The above error occurred in the <ForwardRef(Tabs)> component: at Tabs (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/Tabs.js:215:44) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Container (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/Container/createContainer.js:110:19) at DynamicScrollableTabs (/Users/nicholefrey/Workspace/mui-test-fixture-41388/app/components/DynamicScrollableTabs.tsx:11:35) at div at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Container (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/Container/createContainer.js:110:19) at main at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@emotion[email protected]_@[email protected][email protected]/node_modules/@emotion/react/dist/emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/createBox.js:31:41) at Home at RtlProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/RtlProvider/index.js:19:7) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected][email protected]/node_modules/@mui/private-theming/node/ThemeProvider/ThemeProvider.js:39:5) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+styled@_ayxiereyurbklw6aphsp47qvvu/node_modules/@mui/system/ThemeProvider/ThemeProvider.js:51:5) at ThemeProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/styles/ThemeProvider.js:21:14) at AppRouterCacheProvider (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected]_@[email protected]_jirg5sb6fuv6a2okjalkv3ce7e/node_modules/@mui/material-nextjs/node/v13-appRouter/appRouterV13.js:24:5) at ThemeContainer (/Users/nicholefrey/Workspace/mui-test-fixture-41388/app/ThemeContainer.tsx:11:58) at TestWrapper (/Users/nicholefrey/Workspace/mui-test-fixture-41388/utils/test-utils.tsx:11:52) Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. at logCapturedError (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8678:23) at update.callback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8711:5) at callCallback (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5175:12) at commitUpdateQueue (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5196:9) at commitLayoutEffectOnFiber (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13271:13) at commitLayoutMountEffects_complete (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14369:9) at commitLayoutEffects_begin (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14355:7) at commitLayoutEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14340:3) at commitRootImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16101:5) at commitRoot (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15972:5) at performSyncWorkOnRoot (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15493:3) at flushSyncCallbacks (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2597:22) at flushPassiveEffectsImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16300:3) at flushPassiveEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) console.error Error: Uncaught [TypeError: Cannot read properties of null (reading 'offsetHeight')] at reportException (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:525:9) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { detail: TypeError: Cannot read properties of null (reading 'offsetHeight') at setMeasurements (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:40:47) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:58:5 at commitHookEffectListMount (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13038:26) at commitPassiveMountOnFiber (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14461:11) at commitPassiveMountEffects_complete (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14421:9) at commitPassiveMountEffects_begin (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at /Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (/Users/nicholefrey/Workspace/mui-test-fixture-41388/node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7), type: 'unhandled exception' } at VirtualConsole.<anonymous> (node_modules/.pnpm/[email protected]/node_modules/jest-environment-jsdom/build/index.js:63:23) at reportException (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:70:28) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:525:9) FAIL app/page.test.tsx The Page ✓ has expected snapshot (64 ms) ✕ works as expected (558 ms) ● The Page › works as expected TypeError: Cannot read properties of null (reading 'offsetHeight') at setMeasurements (node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:40:47) at node_modules/.pnpm/@mui[email protected]_@[email protected]_@[email protected][email protected]__@emotion+style_ddscnvx52uo2ovufgi3btuvqoe/node_modules/@mui/material/node/Tabs/ScrollbarSize.js:58:5 at commitHookEffectListMount (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13038:26) at commitPassiveMountOnFiber (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14461:11) at commitPassiveMountEffects_complete (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14421:9) at commitPassiveMountEffects_begin (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14408:7) at commitPassiveMountEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14396:3) at flushPassiveEffectsImpl (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16287:3) at flushPassiveEffects (node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16236:14) at node_modules/.pnpm/[email protected][email protected]/node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16051:9 at workLoop (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:266:34) at flushWork (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:239:14) at performWorkUntilDeadline (node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.development.js:533:21) at Timeout.task [as _onTimeout] (node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js:520:19) ----------------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------------------|---------|----------|---------|---------|------------------- All files | 89.1 | 85.71 | 80 | 89.1 | app | 80 | 66.66 | 66.66 | 80 | ThemeContainer.tsx | 100 | 100 | 100 | 100 | layout.tsx | 0 | 0 | 0 | 0 | 1-17 page.tsx | 100 | 100 | 100 | 100 | theme.tsx | 100 | 100 | 100 | 100 | app/components | 100 | 100 | 100 | 100 | DynamicScrollableTabs.tsx | 100 | 100 | 100 | 100 | ----------------------------|---------|----------|---------|---------|------------------- Test Suites: 1 failed, 1 total Tests: 1 failed, 1 passed, 2 total Snapshots: 1 passed, 1 total Time: 3.032 s Ran all test suites. ELIFECYCLE Test failed. See above for more details. ```
From the reproduction https://github.com/nicholeuf/mui-test-fixture-41388, it seems to me that it's only that the snapshot test env isn't setup correctly. Doing this change fixes the issue: diff --git a/utils/test-utils.tsx b/utils/test-utils.tsx
index f27a491..51c302a 100644
--- a/utils/test-utils.tsx
+++ b/utils/test-utils.tsx
@@ -17,8 +17,18 @@ const customRender = (
options?: Omit<RenderOptions, 'wrapper'>
) => render(ui, { wrapper: TestWrapper, ...options });
-const customSnapshotRender = (children: ReactElement) =>
- renderer.create(<TestWrapper>{children}</TestWrapper>);
+
+const customSnapshotRender = (children: ReactElement) => {
+ let root;
+ renderer.act(() => {
+ root = renderer.create(<TestWrapper>{children}</TestWrapper>, {
+ createNodeMock: (node) => {
+ return document.createElement(node.type as keyof HTMLElementTagNameMap);
+ },
+ });
+ });
+ return root;
+}
export * from '@testing-library/react';
export { customRender as render, customSnapshotRender as renderSnapshot }; See https://github.com/mui/material-ui/pull/16523/files#diff-d0f975a526b07952a6902336247e87b2de9a2d1ecd6c411c7492ac06009c8c73 for historical context. |
A reproduction of the issue: https://github.com/oliviertassinari/material-ui-issue-41388 issue with React 19.0.0-rc.0 and Next.js v15.0.0-rc.0. Looking closer, it's an issue with the ref. I have linked to #42381. #42512 is definitely the wrong fix. Here is what happens:
To fix this, we can:
-return <div style={styles} ref={nodeRef} {...other} />;
+return <div style={styles} {...other} ref={nodeRef} />; but this feels like a hack
+ if (ref) {
newProps.ref = ref;
+ } cc @Andarist |
Issue created emotion-js/emotion#3204. |
Ok, the issue was solved in Emotion (not released yet): emotion-js/emotion#3204 But styled-components has the same problem 🙈: styled-components/styled-components#4331 (which we need to support for the sc engine adapter) I think we can make the change in Material UI too, and call it a day. It will take some time for the developers to get the fix from Emotion, I'm not even sure Styled-components is maintained anymore, anyway. -return <div style={styles} ref={nodeRef} {...other} />;
+return <div style={styles} {...other} ref={nodeRef} />; To be noted that it only impacts this component because it doesn't use |
Any update on this, please? |
@oliviertassinari looks like emotion fixed this in version |
Nest.js 15 has officially been released as of today but this is still broken with 6.1.5 - any update? |
This appears to be broken in NextJS 15 even if you choose the "stay on React 18" option. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @nicholeuf How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Update Jun 7, 2024: There was a comment on the PR questioning whether the original live example isn't depending on #36485. Therefore, a new live example was created and linked below, which is connected to https://github.com/nicholeuf/mui-test-fixture-41388.
Original link to live example: codesandbox.io
This only seems to happen under test. See the test scenario in the link above.
Current behavior
The test fails with the following error:
It fails at:
material-ui/packages/mui-material/src/Tabs/ScrollbarSize.js
Lines 25 to 27 in 2ef685d
Expected behavior
The test passes.
Context
I would like to test my application with a similar code setup.
Your environment
npx @mui/envinfo
From live example:
From original project where error was discovered:
Search keywords: tabs scrollable test
The text was updated successfully, but these errors were encountered: