Skip to content

Commit

Permalink
fix: add test to ensure globalspinner is not in document after user a…
Browse files Browse the repository at this point in the history
…uthentication is complete
  • Loading branch information
Danielle254 committed Nov 19, 2024
1 parent b086538 commit b622859
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/(main)/login/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ describe('Login', () => {

expect(screen.getByTestId('global-spinner')).toBeInTheDocument();
});

it('should not display GlobalSpinner once authentication is complete', async () => {
mockUseAuthContext.isSignedIn = false;

render(<Login />);

expect(screen.queryByTestId('global-spinner')).not.toBeInTheDocument();
});

it('should render the login page if the user is not logged in', () => {
mockUseAuthContext.isSignedIn = false;
Expand Down

0 comments on commit b622859

Please sign in to comment.