diff --git a/src/components/Assessment/EditableAssessment/AssessmentActions.test.jsx b/src/components/Assessment/EditableAssessment/AssessmentActions.test.jsx index a66ca733..8fcdbb54 100644 --- a/src/components/Assessment/EditableAssessment/AssessmentActions.test.jsx +++ b/src/components/Assessment/EditableAssessment/AssessmentActions.test.jsx @@ -1,72 +1,141 @@ -import { shallow } from '@edx/react-unit-test-utils'; +import { render, screen, fireEvent } from '@testing-library/react'; +import '@testing-library/jest-dom'; -import { useExitWithoutSavingAction, useSubmitAssessmentAction } from 'hooks/actions'; +import { + useExitWithoutSavingAction, + useSubmitAssessmentAction, +} from 'hooks/actions'; import AssessmentActions from './AssessmentActions'; +/* eslint-disable react/prop-types */ + +jest.unmock('@openedx/paragon'); +jest.unmock('react'); +jest.unmock('@edx/frontend-platform/i18n'); + jest.mock('hooks/actions', () => ({ useExitWithoutSavingAction: jest.fn(), useSubmitAssessmentAction: jest.fn(), })); -jest.mock('components/ActionButton', () => 'ActionButton'); -jest.mock('components/ConfirmDialog', () => 'ConfirmDialog'); +jest.mock( + 'components/ActionButton', + () => ({ + children, variant, onClick, ...props + }) => ( + + ), +); + +jest.mock( + 'components/ConfirmDialog', + () => ({ title, onConfirm, ...props }) => ( +