@@ -29,7 +29,7 @@ describe('NavToolbar Component', () => {
2929 expect ( screen . queryByTestId ( 'PersonIcon' ) ) . not . toBeInTheDocument ( ) ;
3030
3131 expect ( screen . queryByText ( 'explore' ) ) . toBeInTheDocument ( ) ;
32- expect ( screen . queryByText ( 'DOCS ' ) ) . toBeInTheDocument ( ) ;
32+ expect ( screen . queryByText ( 'help ' ) ) . toBeInTheDocument ( ) ;
3333 expect ( screen . queryByText ( 'Sign In/Sign Up' ) ) . toBeInTheDocument ( ) ;
3434 } ) ;
3535
@@ -41,7 +41,7 @@ describe('NavToolbar Component', () => {
4141 expect ( screen . queryByText ( 'NEW PROJECT' ) ) . toBeInTheDocument ( ) ;
4242 expect ( screen . queryByText ( 'my projects' ) ) . toBeInTheDocument ( ) ;
4343 expect ( screen . queryByText ( 'explore' ) ) . toBeInTheDocument ( ) ;
44- expect ( screen . queryByText ( 'DOCS ' ) ) . toBeInTheDocument ( ) ;
44+ expect ( screen . queryByText ( 'help ' ) ) . toBeInTheDocument ( ) ;
4545 expect ( screen . getByTestId ( 'PersonIcon' ) ) . toBeInTheDocument ( ) ;
4646 } ) ;
4747
@@ -66,7 +66,8 @@ describe('NavToolbar Component', () => {
6666 it ( 'should open the navpopup menu with the given menu items' , ( ) => {
6767 render ( < NavToolbar onLogin = { mockLogin } onLogout = { mockLogout } /> ) ;
6868
69- userEvent . click ( screen . getByTestId ( 'mock-trigger-show-popup' ) ) ;
69+ // get the first element (the Explore button)
70+ userEvent . click ( screen . getAllByTestId ( 'mock-trigger-show-popup' ) [ 0 ] ) ;
7071 expect ( screen . getByText ( 'Studies' ) ) . toBeInTheDocument ( ) ;
7172 expect ( screen . getByText ( 'Meta-Analyses' ) ) . toBeInTheDocument ( ) ;
7273 } ) ;
0 commit comments