Ensure the bot has joined the correct room before we start the test (#11693)

pull/28788/head^2
Andy Balaam 2023-10-02 13:51:56 +01:00 committed by GitHub
parent 41a2325a2a
commit 966d8bd695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 0 deletions

View File

@ -103,10 +103,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });

View File

@ -111,10 +111,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });

View File

@ -81,10 +81,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });

View File

@ -109,10 +109,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });

View File

@ -99,10 +99,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });

View File

@ -114,10 +114,12 @@ describe("Read receipts", () => {
// Invite the bot to both rooms // Invite the bot to both rooms
cy.inviteUser(alphaRoomId, bot.getUserId()); cy.inviteUser(alphaRoomId, bot.getUserId());
cy.viewRoomById(alphaRoomId); cy.viewRoomById(alphaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomAlpha).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
cy.inviteUser(betaRoomId, bot.getUserId()); cy.inviteUser(betaRoomId, bot.getUserId());
cy.viewRoomById(betaRoomId); cy.viewRoomById(betaRoomId);
cy.get(".mx_LegacyRoomHeader").within(() => cy.findByTitle(roomBeta).should("exist"));
cy.findByText(botName + " joined the room").should("exist"); cy.findByText(botName + " joined the room").should("exist");
}); });
}); });