Skip to content

Commit

Permalink
UIQM-730 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanDenis committed Nov 15, 2024
1 parent 8628af1 commit cfbf896
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/QuickMarcEditor/QuickMarcEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const QuickMarcEditor = ({
const values = {
warnCount,
failCount,
breakingLine: <br style={{ margin: '2px 0' }} />,
breakingLine: <br />,
};
let messageId = null;

Expand Down
24 changes: 12 additions & 12 deletions src/QuickMarcEditor/QuickMarcEditor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,14 +820,14 @@ describe('Given QuickMarcEditor', () => {

it('should show a toast notification about validation error', async () => {
await waitFor(() => {
expect(mockShowCallout).toHaveBeenCalledWith({
expect(mockShowCallout).toHaveBeenCalledWith(expect.objectContaining({
messageId: 'ui-quick-marc.record.save.error.fail',
values: {
values: expect.objectContaining({
failCount: 1,
warnCount: 0,
},
}),
type: 'error',
});
}));
});
});
});
Expand All @@ -849,14 +849,14 @@ describe('Given QuickMarcEditor', () => {

it('should show a toast notification about validation warning', async () => {
await waitFor(() => {
expect(mockShowCallout).toHaveBeenCalledWith({
expect(mockShowCallout).toHaveBeenCalledWith(expect.objectContaining({
messageId: 'ui-quick-marc.record.save.error.warn',
values: {
values: expect.objectContaining({
failCount: 0,
warnCount: 1,
},
}),
type: 'warning',
});
}));
});
});
});
Expand All @@ -883,14 +883,14 @@ describe('Given QuickMarcEditor', () => {

it('should show a toast notification about validation warning and error', async () => {
await waitFor(() => {
expect(mockShowCallout).toHaveBeenCalledWith({
expect(mockShowCallout).toHaveBeenCalledWith(expect.objectContaining({
messageId: 'ui-quick-marc.record.save.error.failAndWarn',
values: {
values: expect.objectContaining({
failCount: 1,
warnCount: 1,
},
}),
type: 'error',
});
}));
});
});
});
Expand Down

0 comments on commit cfbf896

Please sign in to comment.