diff --git a/src/generic/delete-modal/DeleteModal.jsx b/src/generic/delete-modal/DeleteModal.jsx index 25444db5b8..293fe1e8fa 100644 --- a/src/generic/delete-modal/DeleteModal.jsx +++ b/src/generic/delete-modal/DeleteModal.jsx @@ -1,4 +1,3 @@ -import { useState } from 'react'; import PropTypes from 'prop-types'; import { ActionRow, @@ -45,7 +44,7 @@ const DeleteModal = ({ }} labels={{ default: intl.formatMessage(messages.deleteButton), - pending: intl.formatMessage(messages.pendingDeleteButton) + pending: intl.formatMessage(messages.pendingDeleteButton), }} /> diff --git a/src/library-authoring/components/CollectionCard.test.tsx b/src/library-authoring/components/CollectionCard.test.tsx index 8918cdef15..33322a73b8 100644 --- a/src/library-authoring/components/CollectionCard.test.tsx +++ b/src/library-authoring/components/CollectionCard.test.tsx @@ -1,6 +1,8 @@ -import { initializeMocks, render, screen, waitFor, waitForElementToBeRemoved, within } from '../../testUtils'; import userEvent from '@testing-library/user-event'; import type MockAdapter from 'axios-mock-adapter'; +import { + initializeMocks, render, screen, waitFor, waitForElementToBeRemoved, within, +} from '../../testUtils'; import { type CollectionHit } from '../../search-manager'; import CollectionCard from './CollectionCard'; @@ -65,7 +67,7 @@ describe('', () => { // verify confirmation dialog and click on cancel button let dialog = await screen.findByRole('dialog', { name: 'Delete this collection?' }); expect(dialog).toBeInTheDocument(); - let cancelBtn = await screen.findByRole('button', { name: 'Cancel' }); + const cancelBtn = await screen.findByRole('button', { name: 'Cancel' }); userEvent.click(cancelBtn); expect(axiosMock.history.delete.length).toEqual(0); expect(cancelBtn).not.toBeInTheDocument(); @@ -79,9 +81,7 @@ describe('', () => { dialog = await screen.findByRole('dialog', { name: 'Delete this collection?' }); const confirmBtn = await within(dialog).findByRole('button', { name: 'Delete' }); userEvent.click(confirmBtn); - await waitForElementToBeRemoved(() => { - return screen.queryByRole('dialog', { name: 'Delete this collection?' }) - }); + await waitForElementToBeRemoved(() => screen.queryByRole('dialog', { name: 'Delete this collection?' })); await waitFor(() => { expect(axiosMock.history.delete.length).toEqual(1); @@ -115,9 +115,7 @@ describe('', () => { const dialog = await screen.findByRole('dialog', { name: 'Delete this collection?' }); const confirmBtn = await within(dialog).findByRole('button', { name: 'Delete' }); userEvent.click(confirmBtn); - await waitForElementToBeRemoved(() => { - return screen.queryByRole('dialog', { name: 'Delete this collection?' }) - }); + await waitForElementToBeRemoved(() => screen.queryByRole('dialog', { name: 'Delete this collection?' })); await waitFor(() => { expect(axiosMock.history.delete.length).toEqual(1);