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 22, 2022
1 parent 687af8f commit dbd4c04
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cypress/e2e/spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,15 @@ 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(($element) =>
expect($element.get(0).innerText).contains(groupDm.name));
cy.get(".mx_RoomSublist[aria-label=People]").should(($element) =>
expect($element.get(0).innerText).contains(groupDm.name));
});

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

0 comments on commit dbd4c04

Please sign in to comment.