5
5
* Please see LICENSE files in the repository root for full details.
6
6
*/
7
7
8
- import { Visibility } from "matrix-js-sdk/src/matrix" ;
8
+ import { type Visibility } from "matrix-js-sdk/src/matrix" ;
9
+ import { type Locator , type Page } from "@playwright/test" ;
10
+
9
11
import { expect , test } from "../../../element-web-test" ;
10
12
import { SettingLevel } from "../../../../src/settings/SettingLevel" ;
11
- import { type Locator , type Page } from "@playwright/test" ;
12
13
13
14
test . describe ( "Room list filters and sort" , ( ) => {
14
15
test . use ( {
@@ -43,7 +44,7 @@ test.describe("Room list filters and sort", () => {
43
44
44
45
test ( "Tombstoned rooms are not shown even when they receive updates" , async ( { page, app, bot } ) => {
45
46
// This bug shows up with this setting turned on
46
- app . settings . setValue ( "Spaces.allRoomsInHome" , null , SettingLevel . DEVICE , true ) ;
47
+ await app . settings . setValue ( "Spaces.allRoomsInHome" , null , SettingLevel . DEVICE , true ) ;
47
48
48
49
/*
49
50
We will first create a room named 'Old Room' and will invite the bot user to this room.
@@ -60,7 +61,7 @@ test.describe("Room list filters and sort", () => {
60
61
*/
61
62
const roomListView = getRoomList ( page ) ;
62
63
const oldRoomTile = roomListView . getByRole ( "gridcell" , { name : "Open room Old Room" } ) ;
63
- expect ( oldRoomTile ) . toBeVisible ( ) ;
64
+ await expect ( oldRoomTile ) . toBeVisible ( ) ;
64
65
65
66
/*
66
67
Now let's tombstone 'Old Room'.
@@ -74,7 +75,7 @@ test.describe("Room list filters and sort", () => {
74
75
room_id : oldRoomId ,
75
76
} ,
76
77
} ,
77
- visibility : Visibility . Public ,
78
+ visibility : "public" as Visibility ,
78
79
} ) ;
79
80
80
81
/*
@@ -89,15 +90,15 @@ test.describe("Room list filters and sort", () => {
89
90
await app . client . joinRoom ( newRoomId ) ;
90
91
91
92
// We expect 'Old Room' to be hidden from the room list.
92
- expect ( oldRoomTile ) . not . toBeVisible ( ) ;
93
+ await expect ( oldRoomTile ) . not . toBeVisible ( ) ;
93
94
94
95
/*
95
96
Let's say some user in the 'Old Room' changes their display name.
96
97
This will send events to the all the rooms including 'Old Room'.
97
98
Nevertheless, the replaced room should not be shown in the room list.
98
99
*/
99
100
await bot . setDisplayName ( "MyNewName" ) ;
100
- expect ( oldRoomTile ) . not . toBeVisible ( ) ;
101
+ await expect ( oldRoomTile ) . not . toBeVisible ( ) ;
101
102
} ) ;
102
103
103
104
test . describe ( "Scroll behaviour" , ( ) => {
0 commit comments