@@ -29,6 +29,9 @@ test.describe("Room list", () => {
29
29
test . beforeEach ( async ( { page, app, user } ) => {
30
30
// The notification toast is displayed above the search section
31
31
await app . closeNotificationToast ( ) ;
32
+
33
+ // focus the user menu to avoid to have hover decoration
34
+ await page . getByRole ( "button" , { name : "User menu" } ) . focus ( ) ;
32
35
} ) ;
33
36
34
37
test . describe ( "Room list" , ( ) => {
@@ -241,6 +244,10 @@ test.describe("Room list", () => {
241
244
test ( "should be a public room" , { tag : "@screenshot" } , async ( { page, app, user } ) => {
242
245
// @ts -ignore Visibility enum is not accessible
243
246
await app . client . createRoom ( { name : "public room" , visibility : "public" } ) ;
247
+
248
+ // focus the user menu to avoid to have hover decoration
249
+ await page . getByRole ( "button" , { name : "User menu" } ) . focus ( ) ;
250
+
244
251
const roomListView = getRoomList ( page ) ;
245
252
const publicRoom = roomListView . getByRole ( "gridcell" , { name : "public room" } ) ;
246
253
@@ -256,6 +263,10 @@ test.describe("Room list", () => {
256
263
257
264
const roomListView = getRoomList ( page ) ;
258
265
const videoRoom = roomListView . getByRole ( "gridcell" , { name : "video room" } ) ;
266
+
267
+ // focus the user menu to avoid to have hover decoration
268
+ await page . getByRole ( "button" , { name : "User menu" } ) . focus ( ) ;
269
+
259
270
await expect ( videoRoom ) . toBeVisible ( ) ;
260
271
await expect ( videoRoom ) . toMatchScreenshot ( "room-list-item-video.png" ) ;
261
272
} ) ;
@@ -328,6 +339,10 @@ test.describe("Room list", () => {
328
339
await page . getByRole ( "menuitemcheckbox" , { name : "Show message previews" } ) . click ( ) ;
329
340
330
341
const roomId = await app . client . createRoom ( { name : "activity" } ) ;
342
+
343
+ // focus the user menu to avoid to have hover decoration
344
+ await page . getByRole ( "button" , { name : "User menu" } ) . focus ( ) ;
345
+
331
346
await app . client . inviteUser ( roomId , bot . credentials . userId ) ;
332
347
await bot . joinRoom ( roomId ) ;
333
348
await bot . sendMessage ( roomId , "I am a robot. Beep." ) ;
@@ -376,8 +391,8 @@ test.describe("Room list", () => {
376
391
await room . getByRole ( "button" , { name : "More Options" } ) . click ( ) ;
377
392
await page . getByRole ( "menuitem" , { name : "mark as unread" } ) . click ( ) ;
378
393
379
- // Remove hover on the room list item
380
- await roomListView . hover ( ) ;
394
+ // focus the user menu to avoid to have hover decoration
395
+ await page . getByRole ( "button" , { name : "User menu" } ) . focus ( ) ;
381
396
382
397
await expect ( room ) . toMatchScreenshot ( "room-list-item-mark-as-unread.png" ) ;
383
398
} ) ;
0 commit comments