Skip to content

Commit

Permalink
Cleanup sourcetable
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw-zakrzewski committed May 1, 2024
1 parent 8c8355f commit 6b4ab01
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 511 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('<App />', () => {
});

render(<App />, { initialState: initialLoggedInState });
expect(axios.get).toHaveBeenCalledTimes(6);
expect(axios.get).toHaveBeenCalledTimes(5);
expect(axios.get).toHaveBeenCalledWith('/auth/profile');
expect(axios.get).toHaveBeenCalledWith('/version');
expect(axios.get).toHaveBeenCalledWith('/env');
Expand Down Expand Up @@ -184,7 +184,10 @@ describe('<App />', () => {
return Promise.resolve(axiosResponse);
}
});
render(<App />, { initialRoute: '/cases' });
render(<App />, {
initialState: initialLoggedInState,
initialRoute: '/cases',
});

fireEvent.click(await screen.findByTestId('profile-menu'));

Expand Down
34 changes: 16 additions & 18 deletions verification/curator-service/ui/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,22 @@ const Sidebar = ({ drawerOpen }: SidebarProps): JSX.Element => {
<MenuItem>New bulk upload</MenuItem>
</Link>
{hasAnyRole(user, [Role.Curator]) && (
<>
<Link
to="/sources/automated"
onClick={closeCreateNewPopup}
className={classes.link}
>
<MenuItem>New automated source</MenuItem>
</Link>
<Link
to="/sources/backfill"
onClick={closeCreateNewPopup}
className={classes.link}
>
<MenuItem>
New automated source backfill
</MenuItem>
</Link>
</>
<Link
to="/sources/automated"
onClick={closeCreateNewPopup}
className={classes.link}
>
<MenuItem>New automated source</MenuItem>
</Link>
)}
{hasAnyRole(user, [Role.Curator]) && (
<Link
to="/sources/automated"
onClick={closeCreateNewPopup}
className={classes.link}
>
<MenuItem>New automated source</MenuItem>
</Link>
)}
</Menu>
</>
Expand Down
Loading

0 comments on commit 6b4ab01

Please sign in to comment.