Builder: added unit test for resume in initial state

This commit is contained in:
gianantoniopini
2021-01-23 14:05:37 +01:00
parent 74335a1771
commit c01be98cfc
2 changed files with 19 additions and 0 deletions

View File

@ -125,6 +125,7 @@ describe('Builder', () => {
/The resume you were looking for does not exist anymore/i,
),
).toBeInTheDocument();
fireEvent.click(notification);
await waitFor(() =>
expect(
@ -238,4 +239,21 @@ describe('Builder', () => {
await fnWaitForDatabaseUpdateToHaveCompleted();
});
});
describe('with resume in initial state', () => {
beforeEach(async () => {
await setup(DatabaseConstants.initialStateResumeId, false, false);
});
it('displays load demo data notification', async () => {
const notification = await screen.findByRole('alert');
expect(
getByText(
notification,
/Not sure where to begin\? Try loading demo data/i,
),
).toBeInTheDocument();
fireEvent.click(notification);
});
});
});

View File

@ -168,6 +168,7 @@ describe('Dashboard', () => {
new RegExp(`${resumeToDelete.name} was deleted successfully`, 'i'),
),
).toBeInTheDocument();
fireEvent.click(notification);
await waitForDatabaseRemoveToHaveCompleted();
});