Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

Builder: added unit test for resume in initial state

gianantoniopinic01be98cfcc6
diff --git a/src/pages/app/__tests__/builder.test.js b/src/pages/app/__tests__/builder.test.js
index dea1dfc4d..f6ad40f8a 100644
--- a/src/pages/app/__tests__/builder.test.js
+++ b/src/pages/app/__tests__/builder.test.js
@@ -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);
+ });
+ });
});
diff --git a/src/pages/app/__tests__/dashboard.test.js b/src/pages/app/__tests__/dashboard.test.js
index 9a6b25231..eede7d67a 100644
--- a/src/pages/app/__tests__/dashboard.test.js
+++ b/src/pages/app/__tests__/dashboard.test.js
@@ -168,6 +168,7 @@ describe('Dashboard', () => {
new RegExp(`${resumeToDelete.name} was deleted successfully`, 'i'),
),
).toBeInTheDocument();
+ fireEvent.click(notification);
await waitForDatabaseRemoveToHaveCompleted();
});