mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 10:41:56 +10:00
Builder: added unit test for resume in initial state
This commit is contained in:
@ -125,6 +125,7 @@ describe('Builder', () => {
|
|||||||
/The resume you were looking for does not exist anymore/i,
|
/The resume you were looking for does not exist anymore/i,
|
||||||
),
|
),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
|
fireEvent.click(notification);
|
||||||
|
|
||||||
await waitFor(() =>
|
await waitFor(() =>
|
||||||
expect(
|
expect(
|
||||||
@ -238,4 +239,21 @@ describe('Builder', () => {
|
|||||||
await fnWaitForDatabaseUpdateToHaveCompleted();
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -168,6 +168,7 @@ describe('Dashboard', () => {
|
|||||||
new RegExp(`${resumeToDelete.name} was deleted successfully`, 'i'),
|
new RegExp(`${resumeToDelete.name} was deleted successfully`, 'i'),
|
||||||
),
|
),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
|
fireEvent.click(notification);
|
||||||
|
|
||||||
await waitForDatabaseRemoveToHaveCompleted();
|
await waitForDatabaseRemoveToHaveCompleted();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user