Skip to content

Commit

Permalink
[PRMP-295] - replace log out text in nav bar with sign out (#414)
Browse files Browse the repository at this point in the history
* [PRMP-295] - replace log out text in nav bar with sign out

* [PRMP-295] replace all logging in and logging out with signing in and signing out
  • Loading branch information
abid-nhs authored Aug 23, 2024
1 parent e23c2e8 commit adb9dde
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions app/src/components/layout/navLinks/NavLinks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('NavLinks', () => {
const isLoggedIn = true;
renderNav(isLoggedIn);

expect(screen.getByRole('link', { name: 'Log out' })).toBeInTheDocument();
expect(screen.getByRole('link', { name: 'Sign out' })).toBeInTheDocument();
});

it('renders a navlink for app searcg when user logged in', () => {
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('NavLinks', () => {
const isLoggedIn = false;
renderNav(isLoggedIn);

expect(screen.queryByRole('link', { name: 'Log out' })).not.toBeInTheDocument();
expect(screen.queryByRole('link', { name: 'Sign out' })).not.toBeInTheDocument();
});
});

Expand Down Expand Up @@ -104,7 +104,7 @@ describe('NavLinks', () => {
const isLoggedIn = true;
renderNav(isLoggedIn);

const logoutLink = screen.getByRole('link', { name: 'Log out' });
const logoutLink = screen.getByRole('link', { name: 'Sign out' });
expect(logoutLink).toBeInTheDocument();

act(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/layout/navLinks/NavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const NavLinks = () => {

const appLinks = [
{ href: routes.SEARCH_PATIENT, label: 'Search for a patient', id: 'search-btn' },
{ href: routes.LOGOUT, label: 'Log out', id: 'logout-btn' },
{ href: routes.LOGOUT, label: 'Sign out', id: 'logout-btn' },
];

return session.isLoggedIn ? (
Expand Down
8 changes: 4 additions & 4 deletions app/src/pages/authCallbackPage/AuthCallbackPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('AuthCallbackPage', () => {
renderCallbackPage();
});
expect(screen.getByRole('status')).toBeInTheDocument();
expect(screen.getByText('Logging in...')).toBeInTheDocument();
expect(screen.getByText('Signing in...')).toBeInTheDocument();

await waitFor(() => {
expect(mockedUseNavigate).toHaveBeenCalledWith(routes.HOME);
Expand All @@ -68,7 +68,7 @@ describe('AuthCallbackPage', () => {
renderCallbackPage();

expect(screen.getByRole('status')).toBeInTheDocument();
expect(screen.getByText('Logging in...')).toBeInTheDocument();
expect(screen.getByText('Signing in...')).toBeInTheDocument();

await waitFor(() => {
expect(mockedUseNavigate).toHaveBeenCalledWith(routes.HOME);
Expand All @@ -87,7 +87,7 @@ describe('AuthCallbackPage', () => {
renderCallbackPage();

expect(screen.getByRole('status')).toBeInTheDocument();
expect(screen.getByText('Logging in...')).toBeInTheDocument();
expect(screen.getByText('Signing in...')).toBeInTheDocument();

await waitFor(() => {
expect(mockedUseNavigate).toHaveBeenCalledWith(routes.AUTH_ERROR);
Expand All @@ -105,7 +105,7 @@ describe('AuthCallbackPage', () => {
renderCallbackPage();

expect(screen.getByRole('status')).toBeInTheDocument();
expect(screen.getByText('Logging in...')).toBeInTheDocument();
expect(screen.getByText('Signing in...')).toBeInTheDocument();

await waitFor(() => {
expect(mockedUseNavigate).toHaveBeenCalledWith(routes.UNAUTHORISED_LOGIN);
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/authCallbackPage/AuthCallbackPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const AuthCallbackPage = (props: Props) => {
void handleCallback({ baseUrl, code, state });
}, [baseUrl, setSession, navigate, mockLocal, setConfig]);

return <Spinner status="Logging in..." />;
return <Spinner status="Signing in..." />;
};

export default AuthCallbackPage;
2 changes: 1 addition & 1 deletion app/src/pages/authErrorPage/AuthErrorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AuthErrorPage = () => {
</Link>
</>
) : (
<Spinner status="Logging in..." />
<Spinner status="Signing in..." />
);
};
export default AuthErrorPage;
2 changes: 1 addition & 1 deletion app/src/pages/logoutPage/LogoutPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('logoutPage', () => {

it('returns a loading state until logout redirect', () => {
renderLogoutPage();
const status = 'Logging out...';
const status = 'Signing out...';
expect(screen.getByText(status)).toBeInTheDocument();
});

Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/logoutPage/LogoutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const LogoutPage = () => {
handleCallback(args);
}, [baseUrl, setSession, navigate, baseHeaders]);

return <Spinner status="Logging out..." />;
return <Spinner status="Signing out..." />;
};

export default LogoutPage;
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SessionExpiredErrorPage = () => {
</ButtonLink>
</>
) : (
<Spinner status="Logging in..." />
<Spinner status="Signing in..." />
);
};
export default SessionExpiredErrorPage;
2 changes: 1 addition & 1 deletion app/src/pages/startPage/StartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function StartPage(props: Props) {
process.env.REACT_APP_ENVIRONMENT === 'test') && <TestPanel />}
</>
) : (
<Spinner status="Logging in..." />
<Spinner status="Signing in..." />
);
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/unauthorisedPage/UnauthorisedPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UnauthorisedPage = () => {
<p>
The page you were looking for could not be accessed. If you have the permissions,{' '}
<Link to="" onClick={handleLogin}>
logging in
signing in
</Link>{' '}
may fix this.
</p>
Expand All @@ -38,7 +38,7 @@ const UnauthorisedPage = () => {
</Link>
</>
) : (
<Spinner status="Logging in..." />
<Spinner status="Signing in..." />
);
};
export default UnauthorisedPage;

0 comments on commit adb9dde

Please sign in to comment.