KaotoIO / kaoto

The UI of the Kaoto project
https://kaoto.io
Apache License 2.0
37 stars 29 forks source link

Unexpected logs for `BaseCatalog.test.tsx` #1626

Closed lordrip closed 1 week ago

lordrip commented 1 week ago

Please describe the task that needs to be done

When running yarn workspace @kaoto/kaoto run test, there are unexpected logs for

src/components/Catalog/BaseCatalog.test.tsx (7.403 s)

Logs

 PASS  src/components/Catalog/BaseCatalog.test.tsx (7.403 s)
  ● Console

    console.error
      Warning: An update to Popper inside a test was not wrapped in act(...).

      When testing, code that causes React state updates should be wrapped into act(...):

      act(() => {
        /* fire events that update state */
      });
      /* assert on the output */

      This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
          at Popper (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/helpers/Popper/Popper.tsx:180:3)
          at PaginationOptionsMenu (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/Pagination/PaginationOptionsMenu.tsx:66:3)
          at div
          at Pagination (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/Pagination/Pagination.tsx:189:3)
          at BaseCatalog (/home/rmartinez/repos/kaoto/packages/ui/src/components/Catalog/BaseCatalog.tsx:17:32)