File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
src/frontend/apps/e2e/__tests__/app-impress Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,22 @@ test.describe('Doc Header', () => {
6868 await createDoc ( page , 'doc-update' , browserName , 1 ) ;
6969 const docTitle = page . getByRole ( 'textbox' , { name : 'doc title input' } ) ;
7070 await expect ( docTitle ) . toBeVisible ( ) ;
71- await docTitle . fill ( '👍 Hello World' ) ;
71+ await docTitle . fill ( '👍 Hello Emoji World' ) ;
7272 await docTitle . blur ( ) ;
73- await verifyDocName ( page , '👍 Hello World' ) ;
73+ await verifyDocName ( page , '👍 Hello Emoji World' ) ;
74+
75+ // Check the tree
76+ const docTree = page . getByTestId ( 'doc-tree' ) ;
77+ await expect ( docTree . getByText ( 'Hello Emoji World' ) ) . toBeVisible ( ) ;
78+ await expect ( docTree . getByLabel ( 'Document emoji icon' ) ) . toBeVisible ( ) ;
79+ await expect ( docTree . getByLabel ( 'Simple document icon' ) ) . toBeHidden ( ) ;
80+
81+ await page . getByTestId ( 'home-button' ) . click ( ) ;
82+
83+ // Check the documents grid
84+ const gridRow = await getGridRow ( page , 'Hello Emoji World' ) ;
85+ await expect ( gridRow . getByLabel ( 'Document emoji icon' ) ) . toBeVisible ( ) ;
86+ await expect ( gridRow . getByLabel ( 'Simple document icon' ) ) . toBeHidden ( ) ;
7487 } ) ;
7588
7689 test ( 'it deletes the doc' , async ( { page, browserName } ) => {
Original file line number Diff line number Diff line change @@ -136,9 +136,11 @@ export const getGridRow = async (page: Page, title: string) => {
136136
137137 const rows = docsGrid . getByRole ( 'row' ) ;
138138
139- const row = rows . filter ( {
140- hasText : title ,
141- } ) ;
139+ const row = rows
140+ . filter ( {
141+ hasText : title ,
142+ } )
143+ . first ( ) ;
142144
143145 await expect ( row ) . toBeVisible ( ) ;
144146
You can’t perform that action at this time.
0 commit comments