Skip to content

Commit

Permalink
Fix two more unit tests #1379
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Mar 14, 2024
1 parent 07b9472 commit 7d1f68d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/loginPage/loginPage.component.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Provider } from 'react-redux';
import { thunk } from 'redux-thunk';
import { AnyAction } from 'redux';
import { NotificationType } from '../state/scigateway.types';
import * as log from 'loglevel';
import log from 'loglevel';
import {
act,
render,
Expand Down Expand Up @@ -351,6 +351,7 @@ describe('Login page component', () => {

it('login page displays and logs an error if fetchMnemonics fails', async () => {
props.auth.provider.mnemonic = '';
log.error = vi.fn();
vi.mocked(axios.get).mockImplementation(() => Promise.reject());
const events: CustomEvent<AnyAction>[] = [];

Expand Down
2 changes: 1 addition & 1 deletion src/navigationDrawer/navigationDrawer.component.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe('Navigation drawer component', () => {

expect(screen.getByRole('img')).toHaveAttribute(
'src',
'stfc-logo-white-text.png'
'/src/images/stfc-logo-white-text.png'
);
});

Expand Down

0 comments on commit 7d1f68d

Please sign in to comment.