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

Commit

Permalink
Make spotlight test more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Aug 19, 2022
1 parent 687af8f commit 246bec2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cypress/e2e/spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,13 @@ describe("Spotlight", () => {
cy.get(".mx_RoomSublist[aria-label=People]").should("contain", bot2Name);

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

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

0 comments on commit 246bec2

Please sign in to comment.