Skip to content

Commit

Permalink
refactor: updated unit tests mocks to set snapshot issues
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahwaheed committed Jun 21, 2022
1 parent 09969db commit 8f28fab
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ exports[`EditMoal Component snapshots gradeOverrideHistoryError is and empty and
body={
<div>
<ModalHeaders />
<UNDEFINED
<Alert
dismissible={false}
show={true}
variant="danger"
>
Weve been trying to contact you regarding...
</UNDEFINED>
</Alert>
<OverrideTable />
<div>
<FormattedMessage
Expand Down Expand Up @@ -67,13 +67,13 @@ exports[`EditMoal Component snapshots gradeOverrideHistoryError is empty and ope
body={
<div>
<ModalHeaders />
<UNDEFINED
<Alert
dismissible={false}
show={false}
variant="danger"
>
</UNDEFINED>
</Alert>
<OverrideTable />
<div>
<FormattedMessage
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/EditModal/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jest.mock('./ModalHeaders', () => 'ModalHeaders');
jest.mock('@edx/paragon', () => ({
Button: () => 'Button',
Modal: () => 'Modal',
StatusAlert: () => 'StatusAlert',
Alert: () => 'Alert',
}));
jest.mock('data/actions', () => ({
__esModule: true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/StatusAlerts.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from './StatusAlerts';

jest.mock('@edx/paragon', () => ({
StatusAlert: 'StatusAlert',
Alert: 'Alert',
}));
jest.mock('data/selectors', () => ({
__esModule: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`StatusAlerts snapshots basic snapshot 1`] = `
<React.Fragment>
<UNDEFINED
<Alert
onClose={[MockFunction handleCloseSuccessBanner]}
show={true}
variant="success"
Expand All @@ -12,13 +12,13 @@ exports[`StatusAlerts snapshots basic snapshot 1`] = `
description="An alert text for successfully editing a grade"
id="gradebook.GradesView.editSuccessAlert"
/>
</UNDEFINED>
<UNDEFINED
</Alert>
<Alert
dismissible={false}
show={false}
variant="danger"
>
the quiCk brown does somEthing or other
</UNDEFINED>
</Alert>
</React.Fragment>
`;

0 comments on commit 8f28fab

Please sign in to comment.