|
4 | 4 | "net/http" |
5 | 5 | "testing" |
6 | 6 |
|
7 | | - "github.com/tidwall/gjson" |
8 | | - |
9 | 7 | "github.com/matrix-org/complement/internal/b" |
10 | 8 | "github.com/matrix-org/complement/internal/client" |
11 | 9 | "github.com/matrix-org/complement/internal/match" |
@@ -138,12 +136,7 @@ func TestRoomDeleteAlias(t *testing.T) { |
138 | 136 | }) |
139 | 137 |
|
140 | 138 | bob.JoinRoom(t, roomID, nil) |
141 | | - // todo: replace with `SyncUntilJoined` |
142 | | - bob.SyncUntilTimelineHas(t, roomID, func(event gjson.Result) bool { |
143 | | - return event.Get("type").Str == "m.room.member" && |
144 | | - event.Get("content.membership").Str == "join" && |
145 | | - event.Get("state_key").Str == bob.UserID |
146 | | - }) |
| 139 | + bob.MustSyncUntil(t, client.SyncReq{}, client.SyncJoinedTo(bob.UserID, roomID)) |
147 | 140 |
|
148 | 141 | roomAlias := "#no_ops_delete:hs1" |
149 | 142 |
|
@@ -175,12 +168,7 @@ func TestRoomDeleteAlias(t *testing.T) { |
175 | 168 | }) |
176 | 169 |
|
177 | 170 | bob.JoinRoom(t, roomID, nil) |
178 | | - // todo: replace with `SyncUntilJoined` |
179 | | - bob.SyncUntilTimelineHas(t, roomID, func(event gjson.Result) bool { |
180 | | - return event.Get("type").Str == "m.room.member" && |
181 | | - event.Get("content.membership").Str == "join" && |
182 | | - event.Get("state_key").Str == bob.UserID |
183 | | - }) |
| 171 | + bob.MustSyncUntil(t, client.SyncReq{}, client.SyncJoinedTo(bob.UserID, roomID)) |
184 | 172 |
|
185 | 173 | roomAlias := "#no_ops_delete_canonical:hs1" |
186 | 174 |
|
|
0 commit comments