From d41053c1fcaf604876efb29cc6069946cf0c1c1f Mon Sep 17 00:00:00 2001 From: Mariia_Aloshyna Date: Tue, 29 Oct 2024 19:22:46 +0200 Subject: [PATCH] Revert adding mock for stripesReactHotkeys --- CHANGELOG.md | 1 - .../DetailsKeyShortcutsWrapper.test.js | 1 - .../EditKeyShortcutsWrapper/EditKeyShortcutsWrapper.test.js | 1 - test/jest/__mock__/index.js | 1 - test/jest/__mock__/stripesReactHotkeys.mock.js | 4 ---- 5 files changed, 8 deletions(-) delete mode 100644 test/jest/__mock__/stripesReactHotkeys.mock.js diff --git a/CHANGELOG.md b/CHANGELOG.md index edd25118f..c3f1a3024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ * Exclude bulk edit job execution entries from data import log. (UIDATIMP-1665) * Add "converter-storage.profileSnapshots.get" to "ui-data-import.manage" subPermissions. (UIDATIMP-1672) * Bump "@folio/stripes-acq-components" version to v6.0.0. (UIDATIMP-1673) -* Mock '@folio/stripes-react-hotkeys' for unit tests ### Bugs fixed: * Remove `selected` column from associated profiles list. (UIDATIMP-1607) diff --git a/src/components/DetailsKeyShortcutsWrapper/DetailsKeyShortcutsWrapper.test.js b/src/components/DetailsKeyShortcutsWrapper/DetailsKeyShortcutsWrapper.test.js index bec231dd7..8b75caa3e 100644 --- a/src/components/DetailsKeyShortcutsWrapper/DetailsKeyShortcutsWrapper.test.js +++ b/src/components/DetailsKeyShortcutsWrapper/DetailsKeyShortcutsWrapper.test.js @@ -27,7 +27,6 @@ const history = createMemoryHistory(); history.push = jest.fn(); jest.mock('@folio/stripes/smart-components', () => ({ ...jest.requireActual('@folio/stripes/smart-components') }), { virtual: true }); -jest.unmock('@folio/stripes-react-hotkeys'); const recordIdProp = faker.random.uuid; diff --git a/src/components/EditKeyShortcutsWrapper/EditKeyShortcutsWrapper.test.js b/src/components/EditKeyShortcutsWrapper/EditKeyShortcutsWrapper.test.js index f0f57ddb9..0f4deaa25 100644 --- a/src/components/EditKeyShortcutsWrapper/EditKeyShortcutsWrapper.test.js +++ b/src/components/EditKeyShortcutsWrapper/EditKeyShortcutsWrapper.test.js @@ -20,7 +20,6 @@ const { const mockOnSubmitProp = jest.fn(() => Promise.resolve('test value')); jest.mock('@folio/stripes/smart-components', () => ({ ...jest.requireActual('@folio/stripes/smart-components') }), { virtual: true }); -jest.unmock('@folio/stripes-react-hotkeys'); const renderEditKeyShortcutsWrapper = ({ onSubmit }) => { const childElement = Child element; diff --git a/test/jest/__mock__/index.js b/test/jest/__mock__/index.js index be02b5a2f..31bb6308c 100644 --- a/test/jest/__mock__/index.js +++ b/test/jest/__mock__/index.js @@ -5,6 +5,5 @@ import './reactVirtializedAutoSizer.mock'; import './stripesConfig.mock'; import './stripesIcon.mock'; import './stripesCore.mock'; -import './stripesReactHotkeys.mock'; import './stripesSmartComponents.mock'; import './resizeObserver.mock'; diff --git a/test/jest/__mock__/stripesReactHotkeys.mock.js b/test/jest/__mock__/stripesReactHotkeys.mock.js deleted file mode 100644 index a8e53ea34..000000000 --- a/test/jest/__mock__/stripesReactHotkeys.mock.js +++ /dev/null @@ -1,4 +0,0 @@ -jest.mock('@folio/stripes-react-hotkeys', () => ({ - ...jest.requireActual('@folio/stripes-react-hotkeys'), - HotKeys: ({ children }) =>
{children}
, -}));