Prevent sliding sync from showing a room under multiple sublists (#9266)

* Prevent sliding sync from showing a room under multiple sublists

* Add tests

(cherry picked from commit 96656e4e17)
This commit is contained in:
Michael Telatynski 2022-09-12 17:16:37 +01:00 committed by GitHub
parent 28a418dd2a
commit 6be85e7146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -319,4 +319,16 @@ describe("Sliding Sync", () => {
"Join", "Test Room",
]);
});
it("should show a favourite DM only in the favourite sublist", () => {
cy.createRoom({
name: "Favourite DM",
is_direct: true,
}).as("room").then(roomId => {
cy.getClient().then(cli => cli.setRoomTag(roomId, "m.favourite", { order: 0.5 }));
});
cy.get('.mx_RoomSublist[aria-label="Favourites"]').contains(".mx_RoomTile", "Favourite DM").should("exist");
cy.get('.mx_RoomSublist[aria-label="People"]').contains(".mx_RoomTile", "Favourite DM").should("not.exist");
});
});