Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 246bec2

Browse files
committed
Make spotlight test more reliable
1 parent 687af8f commit 246bec2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cypress/e2e/spotlight/spotlight.spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,13 @@ describe("Spotlight", () => {
349349
cy.get(".mx_RoomSublist[aria-label=People]").should("contain", bot2Name);
350350

351351
// Invite BotBob into existing DM with ByteBot
352-
cy.getDmRooms(bot2.getUserId()).then(dmRooms => dmRooms[0])
353-
.then(groupDmId => cy.inviteUser(groupDmId, bot1.getUserId()))
354-
.then(() => {
355-
cy.roomHeaderName().should("contain", `${bot1Name} and ${bot2Name}`);
356-
cy.get(".mx_RoomSublist[aria-label=People]").should("contain", `${bot1Name} and ${bot2Name}`);
352+
cy.getDmRooms(bot2.getUserId())
353+
.should("have.length", 1)
354+
.then(dmRooms => cy.getClient().then(client => client.getRoom(dmRooms[0])))
355+
.then(groupDm => {
356+
cy.inviteUser(groupDm.roomId, bot1.getUserId());
357+
cy.roomHeaderName().should("contain", groupDm.name);
358+
cy.get(".mx_RoomSublist[aria-label=People]").should("contain", groupDm.name);
357359
});
358360

359361
// Search for BotBob by id, should return group DM and user

0 commit comments

Comments
 (0)