@@ -6,52 +6,66 @@ msTest('Fab button and menu as administrator and read/write', async ({ workspace
66 await workspaces . setDisplaySize ( DisplaySize . Small ) ;
77 const fabButton = workspaces . locator ( '#add-menu-fab-button' ) ;
88 const tabBarButtons = workspaces . locator ( '#tab-bar' ) . locator ( '.tab-bar-menu-button' ) ;
9- const fabModalOptions = workspaces . locator ( '#fab-modal' ) . locator ( '.list-group-item' ) ;
9+ const fabModal = workspaces . locator ( '.tab-menu-modal' ) ;
10+ const fabModalOptions = fabModal . locator ( '.list-group-item' ) ;
1011
1112 // WorkspacesPage
1213 await expect ( fabButton ) . toBeVisible ( ) ;
14+ await expect ( fabModal ) . toBeHidden ( ) ;
1315 await fabButton . click ( ) ;
16+ await expect ( fabModal ) . toBeVisible ( ) ;
1417 await expect ( fabModalOptions ) . toHaveCount ( 2 ) ;
1518 await expect ( fabModalOptions ) . toHaveText ( [ 'New workspace' , 'Invite a user' ] ) ;
1619 await fabButton . click ( ) ;
20+ await expect ( fabModal ) . toBeHidden ( ) ;
1721
1822 // Read/write workspace + admin
1923 await workspaces . locator ( '.workspaces-container-grid' ) . locator ( '.workspace-card-item' ) . nth ( 0 ) . click ( ) ;
2024 await expect ( fabButton ) . toBeVisible ( ) ;
2125 await fabButton . click ( ) ;
26+ await expect ( fabModal ) . toBeVisible ( ) ;
2227 await expect ( fabModalOptions ) . toHaveCount ( 4 ) ;
2328 await expect ( fabModalOptions ) . toHaveText ( [ 'New folder' , 'Import a folder' , 'Import files' , 'Invite a user' ] ) ;
2429 await fabButton . click ( ) ;
30+ await expect ( fabModal ) . toBeHidden ( ) ;
2531
2632 // Organization management
2733 await tabBarButtons . nth ( 2 ) . click ( ) ;
2834 await expect ( workspaces ) . toBeOrganizationPage ( ) ;
2935 await fabButton . click ( ) ;
36+ await expect ( fabModal ) . toBeVisible ( ) ;
3037 await expect ( fabModalOptions ) . toHaveCount ( 2 ) ;
3138 await expect ( fabModalOptions ) . toHaveText ( [ 'Invite a user' , 'Copy link (PKI)' ] ) ;
3239 await fabButton . click ( ) ;
40+ await expect ( fabModal ) . toBeHidden ( ) ;
3341
3442 // No button in profile page
3543 await tabBarButtons . nth ( 3 ) . click ( ) ;
3644 await expect ( workspaces ) . toBeMyProfilePage ( ) ;
3745 await fabButton . click ( ) ;
46+ await expect ( fabModal ) . toBeVisible ( ) ;
3847 await expect ( fabModalOptions ) . toHaveCount ( 2 ) ;
3948 await expect ( fabModalOptions ) . toHaveText ( [ 'Invite a user' , 'Copy link (PKI)' ] ) ;
4049 await fabButton . click ( ) ;
50+ await expect ( fabModal ) . toBeHidden ( ) ;
4151} ) ;
4252
4353msTest ( 'Fab button and menu as standard and reader' , async ( { workspacesStandard } ) => {
4454 await workspacesStandard . setDisplaySize ( DisplaySize . Small ) ;
4555 const fabButton = workspacesStandard . locator ( '#add-menu-fab-button' ) ;
4656 const tabBarButtons = workspacesStandard . locator ( '#tab-bar' ) . locator ( '.tab-bar-menu-button' ) ;
47- const fabModalOptions = workspacesStandard . locator ( '#fab-modal' ) . getByRole ( 'listitem' ) ;
57+ const fabModal = workspacesStandard . locator ( '.tab-menu-modal' ) ;
58+ const fabModalOptions = fabModal . getByRole ( 'listitem' ) ;
4859
4960 // WorkspacesPage
61+ await expect ( fabModal ) . toBeHidden ( ) ;
5062 await expect ( fabButton ) . toBeVisible ( ) ;
5163 await fabButton . click ( ) ;
64+ await expect ( fabModal ) . toBeVisible ( ) ;
5265 await expect ( fabModalOptions ) . toHaveCount ( 1 ) ;
5366 await expect ( fabModalOptions ) . toHaveText ( [ 'New workspace' ] ) ;
5467 await fabButton . click ( ) ;
68+ await expect ( fabModal ) . toBeHidden ( ) ;
5569
5670 // No button in reader workspace
5771 await workspacesStandard . locator ( '.workspaces-container-grid' ) . locator ( '.workspace-card-item' ) . nth ( 0 ) . click ( ) ;
0 commit comments