From fb6540b2078d50ad3edc5428db184603155d5d16 Mon Sep 17 00:00:00 2001 From: guidari Date: Thu, 6 Jun 2024 15:25:17 -0300 Subject: [PATCH] fix: replace import react-dom/test-utils with react --- packages/react/src/components/ComboBox/ComboBox-test.js | 3 ++- packages/react/src/components/Tabs/Tabs-test.js | 3 ++- .../src/components/UIShell/__tests__/HeaderContainer-test.js | 3 ++- packages/react/src/internal/__tests__/useMatchMedia-test.js | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/ComboBox/ComboBox-test.js b/packages/react/src/components/ComboBox/ComboBox-test.js index e98ff05d2c09..3a532ec3c865 100644 --- a/packages/react/src/components/ComboBox/ComboBox-test.js +++ b/packages/react/src/components/ComboBox/ComboBox-test.js @@ -16,7 +16,8 @@ import { generateGenericItem, } from '../ListBox/test-helpers'; import ComboBox from '../ComboBox'; -import { act } from 'react-dom/test-utils'; +import { act } from 'react'; + import { Slug } from '../Slug'; const findInputNode = () => screen.getByRole('combobox'); diff --git a/packages/react/src/components/Tabs/Tabs-test.js b/packages/react/src/components/Tabs/Tabs-test.js index 32ee5f474509..af1de9c0c591 100644 --- a/packages/react/src/components/Tabs/Tabs-test.js +++ b/packages/react/src/components/Tabs/Tabs-test.js @@ -1,6 +1,7 @@ import React from 'react'; import { Tabs, Tab, TabPanel, TabPanels, TabList } from './Tabs'; -import { act } from 'react-dom/test-utils'; +import { act } from 'react'; + import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import * as hooks from '../../internal/useMatchMedia'; diff --git a/packages/react/src/components/UIShell/__tests__/HeaderContainer-test.js b/packages/react/src/components/UIShell/__tests__/HeaderContainer-test.js index 3b4d453abb2e..66154c9d0ed1 100644 --- a/packages/react/src/components/UIShell/__tests__/HeaderContainer-test.js +++ b/packages/react/src/components/UIShell/__tests__/HeaderContainer-test.js @@ -7,7 +7,8 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { act } from 'react-dom/test-utils'; +import { act } from 'react'; + import { HeaderContainer } from '../'; describe('HeaderContainer', () => { diff --git a/packages/react/src/internal/__tests__/useMatchMedia-test.js b/packages/react/src/internal/__tests__/useMatchMedia-test.js index a3d197a2f4c0..2d679182bcc6 100644 --- a/packages/react/src/internal/__tests__/useMatchMedia-test.js +++ b/packages/react/src/internal/__tests__/useMatchMedia-test.js @@ -7,7 +7,8 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { act } from 'react-dom/test-utils'; +import { act } from 'react'; + import { useMatchMedia } from '../useMatchMedia'; describe('useMatchMedia', () => {