Skip to content
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

Fix & reenable RichTextEditor storyshots #9393

Open
mnholtz opened this issue Nov 1, 2024 · 0 comments
Open

Fix & reenable RichTextEditor storyshots #9393

mnholtz opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working testing

Comments

@mnholtz
Copy link
Collaborator

mnholtz commented Nov 1, 2024

When adding #9336, storyshots was failing for the RichTextEditor story with the following stack trace:

  ● Storyshots › Components/RichTextEditor › With Initial Content

    TypeError: Cannot read properties of null (reading 'append')

      at PureEditorContent.init (node_modules/@tiptap/react/src/EditorContent.tsx:133:15)
      at PureEditorContent.componentDidMount (node_modules/@tiptap/react/src/EditorContent.tsx:116:10)
      at commitLifeCycles (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11782:24)
      at commitLayoutEffects (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14443:7)
      at HTMLUnknownElement.callCallback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11391:14)
      at Object.invokeGuardedCallbackDev (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11440:16)
      at invokeGuardedCallback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:11499:31)
      at commitRootImpl (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14172:9)
      at unstable_runWithPriority (node_modules/scheduler/cjs/scheduler.development.js:468:12)
      at runWithPriority (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2486:10)
      at commitRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:14011:3)
      at performSyncWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13440:3)
      at node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2537:26
      at unstable_runWithPriority (node_modules/scheduler/cjs/scheduler.development.js:468:12)
      at runWithPriority (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2486:10)
      at flushSyncCallbackQueueImpl (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2532:9)
      at flushSyncCallbackQueue (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2519:3)
      at scheduleUpdateOnFiber (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13004:9)
      at updateContainer (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:16454:3)
      at create (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:17149:3)
      at getRenderedTree (node_modules/@storybook/addon-storyshots/dist/frameworks/react/renderTree.js:12:18)
      at node_modules/@storybook/addon-storyshots/dist/test-bodies.js:9:24
      at Object.<anonymous> (node_modules/@storybook/addon-storyshots/dist/api/snapshotsTestsTemplate.js:20:29)

After some digging we decided to disable storyshot tests to address as a follow-up.

Possible threads to pull:

  • Storyshots uses jsdom, which we already had to stub for TipTap for jest unit tests
@mnholtz mnholtz added bug Something isn't working testing labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing
Projects
None yet
Development

No branches or pull requests

1 participant