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', () => {
68
68
await createDoc ( page , 'doc-update' , browserName , 1 ) ;
69
69
const docTitle = page . getByRole ( 'textbox' , { name : 'doc title input' } ) ;
70
70
await expect ( docTitle ) . toBeVisible ( ) ;
71
- await docTitle . fill ( '👍 Hello World' ) ;
71
+ await docTitle . fill ( '👍 Hello Emoji World' ) ;
72
72
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 ( ) ;
74
87
} ) ;
75
88
76
89
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) => {
136
136
137
137
const rows = docsGrid . getByRole ( 'row' ) ;
138
138
139
- const row = rows . filter ( {
140
- hasText : title ,
141
- } ) ;
139
+ const row = rows
140
+ . filter ( {
141
+ hasText : title ,
142
+ } )
143
+ . first ( ) ;
142
144
143
145
await expect ( row ) . toBeVisible ( ) ;
144
146
You can’t perform that action at this time.
0 commit comments