@@ -43,7 +43,8 @@ test.describe("Room list", () => {
43
43
await expect ( roomListView . getByRole ( "gridcell" , { name : "Open room room29" } ) ) . toBeVisible ( ) ;
44
44
await expect ( roomListView ) . toMatchScreenshot ( "room-list.png" ) ;
45
45
46
- await roomListView . hover ( ) ;
46
+ // Put focus on the room list
47
+ await roomListView . getByRole ( "gridcell" , { name : "Open room room29" } ) . click ( ) ;
47
48
// Scroll to the end of the room list
48
49
await page . mouse . wheel ( 0 , 1000 ) ;
49
50
await expect ( roomListView . getByRole ( "gridcell" , { name : "Open room room0" } ) ) . toBeVisible ( ) ;
@@ -105,13 +106,10 @@ test.describe("Room list", () => {
105
106
// It should make the room muted
106
107
await page . getByRole ( "menuitem" , { name : "Mute room" } ) . click ( ) ;
107
108
108
- // Remove hover on the room list item
109
- await roomListView . hover ( ) ;
110
-
111
- // Scroll to the bottom of the list
112
- await page . getByRole ( "grid" , { name : "Room list" } ) . evaluate ( ( e ) => {
113
- e . scrollTop = e . scrollHeight ;
114
- } ) ;
109
+ // Put focus on the room list
110
+ await roomListView . getByRole ( "gridcell" , { name : "Open room room28" } ) . click ( ) ;
111
+ // Scroll to the end of the room list
112
+ await page . mouse . wheel ( 0 , 1000 ) ;
115
113
116
114
// The room decoration should have the muted icon
117
115
await expect ( roomItem . getByTestId ( "notification-decoration" ) ) . toBeVisible ( ) ;
@@ -129,7 +127,8 @@ test.describe("Room list", () => {
129
127
130
128
test ( "should scroll to the current room" , async ( { page, app, user } ) => {
131
129
const roomListView = getRoomList ( page ) ;
132
- await roomListView . hover ( ) ;
130
+ // Put focus on the room list
131
+ await roomListView . getByRole ( "gridcell" , { name : "Open room room29" } ) . click ( ) ;
133
132
// Scroll to the end of the room list
134
133
await page . mouse . wheel ( 0 , 1000 ) ;
135
134
0 commit comments