File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -265,31 +265,29 @@ describe('NavBar Component', () => {
265265 console . log ( 'After rendering NavBar' ) ;
266266
267267 await act ( async ( ) => {
268- // Initially, the dropdown should have the "hideNavDropDown" class
268+
269269 const dropdownMenu = getByTestId ( 'navDropDown' ) ;
270270 expect ( dropdownMenu ) . toHaveClass ( 'hideNavDropDown' ) ;
271271
272- // Find and click the button to open the dropdown
272+
273273 const moreVertButton = getByTestId ( 'more-vert-button' ) ;
274274 fireEvent . click ( moreVertButton ) ;
275275
276- // After clicking, the dropdown should have the "navDropDown" class
276+
277277 expect ( dropdownMenu ) . toHaveClass ( 'hideNavDropDown' ) ;
278278
279- // Clear canvas click
279+
280280 const clearCanvasMenuItem = getByText ( 'Clear Canvas' ) ;
281281 fireEvent . click ( clearCanvasMenuItem ) ;
282282 expect ( dropdownMenu ) . toHaveClass ( 'hideNavDropDown' ) ;
283283
284- // After clicking "Marketplace", it should remain open
284+
285285 const marketplaceMenuItem = getByText ( 'Marketplace' ) ;
286286 fireEvent . click ( marketplaceMenuItem ) ;
287287 expect ( dropdownMenu ) . toHaveClass ( 'hideNavDropDown' ) ;
288288
289- // Close the dropdown by clicking the button again
290289 fireEvent . click ( moreVertButton ) ;
291290
292- // After closing, the dropdown should have the "hideNavDropDown" class
293291 expect ( dropdownMenu ) . toHaveClass ( 'hideNavDropDown' ) ;
294292 } ) ;
295293 } ) ;
You can’t perform that action at this time.
0 commit comments