File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
src/frontend/apps/e2e/__tests__/app-impress Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ import { expect , test } from '@playwright/test' ;
2+
3+ test . describe ( 'Onboarding modal' , ( ) => {
4+ test . beforeEach ( async ( { page } ) => {
5+ await page . goto ( '/' ) ;
6+ await expect ( page . getByTestId ( 'left-panel-desktop' ) ) . toBeVisible ( ) ;
7+ } ) ;
8+
9+ test ( 'opens onboarding modal from help menu and can navigate/close' , async ( {
10+ page,
11+ } ) => {
12+ await page . getByRole ( 'button' , { name : 'Open onboarding menu' } ) . click ( ) ;
13+
14+ await page . getByRole ( 'menuitem' , { name : 'Onboarding' } ) . click ( ) ;
15+
16+ const modal = page . getByTestId ( 'onboarding-modal' ) ;
17+ await expect ( modal ) . toBeVisible ( ) ;
18+
19+ await expect ( page . getByTestId ( 'onboarding-step-0' ) ) . toHaveAttribute (
20+ 'tabindex' ,
21+ '0' ,
22+ ) ;
23+
24+ // Go to next step and ensure step focusable state updates
25+ await page . getByTestId ( 'onboarding-next' ) . click ( ) ;
26+ await expect ( page . getByTestId ( 'onboarding-step-1' ) ) . toHaveAttribute (
27+ 'tabindex' ,
28+ '0' ,
29+ ) ;
30+
31+ // Close the modal using Escape (works regardless of close button label)
32+ await page . keyboard . press ( 'Escape' ) ;
33+ await expect ( modal ) . toBeHidden ( ) ;
34+ } ) ;
35+ } ) ;
You can’t perform that action at this time.
0 commit comments