From 96656e4e1762c08c324888eac6f065c509f193d6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 8 Sep 2022 18:13:03 +0100 Subject: [PATCH] Add tests --- cypress/e2e/sliding-sync/sliding-sync.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cypress/e2e/sliding-sync/sliding-sync.ts b/cypress/e2e/sliding-sync/sliding-sync.ts index 5b5ec5145e..8f4e42be25 100644 --- a/cypress/e2e/sliding-sync/sliding-sync.ts +++ b/cypress/e2e/sliding-sync/sliding-sync.ts @@ -319,4 +319,18 @@ 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.contains(".mx_RoomSublist", "Apple"); + + 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"); + }); });