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: component suspended while responding to input #11107

Closed

Conversation

iskounen
Copy link
Contributor

I am opening this temporary PR to see what kinds of tests fail when I introduce a small change to the useSaveArtworkToArtworkLists hook that is used to give artwork grids save icons 💜.

While fixing failing tests for #11098 I noticed the following error in a variety of test suites, and I was surprised that most of them were not related to the act of saving an artwork.

A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.

      110 |     const view = renderWithWrappers(<TestRenderer />)
      111 |
    > 112 |     act(() => {
          |        ^
      113 |       console.log("FOO")
      114 |       const resolve = preloaded
      115 |         ? env.mock.queueOperationResolver

      at throwException (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:8929:35)
      at throwException (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15604:7)
      at handleError (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15710:7)
      at renderRootSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:15412:20)
      at callback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2594:22)
      at callback (node_modules/react/cjs/react.development.js:2667:24)
      at flushActQueue (node_modules/react/cjs/react.development.js:2521:11)
      at actImplementation (node_modules/@testing-library/react-native/src/act.ts:30:25)
      at renderWithRelay (src/app/utils/tests/setupTestWrapper.tsx:112:8)
      at Object.renderWithRelay (src/app/Components/ArtworkGrids/ArtworkGridItem.tests.tsx:68:7)

@iskounen iskounen self-assigned this Nov 15, 2024
@ArtsyOpenSource
Copy link
Contributor

Warnings
⚠️

An error occurred while validating your changelog, please make sure you provided a valid changelog.

Generated by 🚫 dangerJS against b3c60b7

@iskounen iskounen closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants