File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,6 @@ test.describe('#typingNotification', () => {
211211 await expect ( writers ) . toBeAttached ( ) ;
212212 const start = Date . now ( ) ;
213213 await expect ( writers ) . toHaveText ( / j o v y a n _ 2 i s t y p i n g / ) ;
214- await expect ( writers ) . not . toBeAttached ( ) ;
215214
216215 // Message should disappear after 1s, but this delay include the awareness update.
217216 expect ( Date . now ( ) - start ) . toBeLessThanOrEqual ( 2000 ) ;
@@ -243,14 +242,17 @@ test.describe('#typingNotification', () => {
243242
244243 await guestInput . press ( 'a' ) ;
245244
246- let visible = true ;
245+ let hasContent = true ;
247246 try {
248- await page . waitForCondition ( ( ) => writers . isVisible ( ) , 3000 ) ;
247+ await page . waitForCondition (
248+ async ( ) => ! ! ( await writers . textContent ( ) ) ?. trim ( ) ,
249+ 3000
250+ ) ;
249251 } catch {
250- visible = false ;
252+ hasContent = false ;
251253 }
252254
253- if ( visible ) {
255+ if ( hasContent ) {
254256 throw Error ( 'The typing notification should not be attached.' ) ;
255257 }
256258 } ) ;
@@ -312,6 +314,5 @@ test.describe('#typingNotification', () => {
312314 const result = regexp . exec ( ( await writers . textContent ( ) ) ?? '' ) ;
313315 expect ( result ?. [ 1 ] !== undefined ) ;
314316 expect ( result ?. [ 1 ] !== result ?. [ 2 ] ) ;
315- await expect ( writers ) . not . toBeAttached ( ) ;
316317 } ) ;
317318} ) ;
You can’t perform that action at this time.
0 commit comments