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

UIIN-2888: React 19: refactor away from react-dom/test-utils #2688

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5] (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
Loading