Skip to content

Commit

Permalink
UIIN-2888: React 19: refactor away from react-dom/test-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 committed Dec 2, 2024
1 parent a83e729 commit 0a2fcbe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Add permission for "Share local instance" option on Member tenants. Refs UIIN-3140.
* React v19: refactor away from default props for functional components. Refs UIIN-2890.
* User can edit Source consortium "Holdings sources" in member tenant but not in Consortia manager. Refs UIIN-3147.
* React 19: refactor away from react-dom/test-utils. Refs UIIN-2888.

## [12.0.4] (IN PROGRESS)

Expand Down
4 changes: 2 additions & 2 deletions src/Instance/InstanceEdit/InstanceField/InstanceField.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { screen } from '@folio/jest-config-stripes/testing-library/react';
import { act, screen } from '@folio/jest-config-stripes/testing-library/react';
import { noop, keyBy } from 'lodash';
import { BrowserRouter as Router } from 'react-router-dom';
import { act } from 'react-dom/test-utils';

import '../../../../test/jest/__mock__';

import { StripesContext } from '@folio/stripes/core';
Expand Down
2 changes: 1 addition & 1 deletion src/Instance/ItemsList/ItemsListContainer.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import { BrowserRouter as Router } from 'react-router-dom';
import { act } from 'react-dom/test-utils';
import { act } from '@folio/jest-config-stripes/testing-library/react';

import '../../../test/jest/__mock__';

Expand Down
3 changes: 1 addition & 2 deletions src/Instance/ItemsList/tests/ItemsList.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import { BrowserRouter as Router } from 'react-router-dom';
import { act } from 'react-dom/test-utils';
import { screen } from '@folio/jest-config-stripes/testing-library/react';
import { act, screen } from '@folio/jest-config-stripes/testing-library/react';

import '../../../../test/jest/__mock__';

Expand Down
3 changes: 1 addition & 2 deletions src/components/ViewSource/ViewSource.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
BrowserRouter as Router,
useHistory,
} from 'react-router-dom';
import { act } from 'react-dom/test-utils';

import {
act,
screen,
waitFor,
fireEvent,
Expand All @@ -27,7 +27,6 @@ jest.mock('react-router-dom', () => ({
push: jest.fn(),
}),
}));

jest.mock('../../common/hooks/useGoBack', () => jest.fn());
jest.mock('../../hooks', () => ({
...jest.requireActual('../../hooks'),
Expand Down

0 comments on commit 0a2fcbe

Please sign in to comment.