Skip to content

Commit

Permalink
resolved conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 1, 2021
2 parents 254a0b1 + 271727f commit 8c06e53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ui/src/app/core/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Navbar from 'react-bootstrap/Navbar';
import Dropdown from 'react-bootstrap/Dropdown';

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTh, faSignOutAlt, faPlusCircle, faCube, faCubes, faUsersCog, faSpinner, faUserCircle, faCog, faLayerGroup, faFileArchive } from '@fortawesome/free-solid-svg-icons';

import { faTh, faSignOutAlt, faPlusCircle, faCube, faCubes, faUsersCog, faSpinner, faSpinner, faUserCircle, faCog } from '@fortawesome/free-solid-svg-icons';

import Translate from '../../i18n/components/translate';
import { useTranslator } from '../../i18n/hooks';
Expand Down
8 changes: 7 additions & 1 deletion ui/src/app/core/components/Header.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ jest.mock('../../i18n/hooks', () => ({
}));

const mockIsAdmin = jest.fn();
const mockCurrentUser = jest.fn();
const mockCurrentUserLoading = jest.fn();

jest.mock('../user/UserContext', () => ({
useIsAdmin: () => mockIsAdmin()
useIsAdmin: () => mockIsAdmin(),
useCurrentUser: () => mockCurrentUser(),
useCurrentUserLoading: () => mockCurrentUserLoading()
}));

describe('header for admins', () => {
beforeEach(() => {
mockIsAdmin.mockReturnValue(true);
mockCurrentUser.mockReturnValue({ username: 'foo', groupId: 'bar' });
mockCurrentUserLoading.mockReturnValue(false);
});

it('should display logo and navigation', () => {
Expand Down

0 comments on commit 8c06e53

Please sign in to comment.