Deflakey threads
cypress test (#10632)
`inviteUser` is asynchronous so you can't just call it and plough straight on. Also some logging improvements which helped debug this
This commit is contained in:
parent
ac2855789f
commit
e350b4c2c2
3 changed files with 24 additions and 15 deletions
|
@ -31,7 +31,6 @@ describe("Threads", () => {
|
|||
});
|
||||
cy.startHomeserver("default").then((data) => {
|
||||
homeserver = data;
|
||||
|
||||
cy.initTestUser(homeserver, "Tom");
|
||||
});
|
||||
});
|
||||
|
@ -50,12 +49,15 @@ describe("Threads", () => {
|
|||
});
|
||||
|
||||
let roomId: string;
|
||||
cy.createRoom({}).then((_roomId) => {
|
||||
roomId = _roomId;
|
||||
cy.inviteUser(roomId, bot.getUserId());
|
||||
bot.joinRoom(roomId);
|
||||
cy.visit("/#/room/" + roomId);
|
||||
});
|
||||
cy.createRoom({})
|
||||
.then((_roomId) => {
|
||||
roomId = _roomId;
|
||||
return cy.inviteUser(roomId, bot.getUserId());
|
||||
})
|
||||
.then(async () => {
|
||||
await bot.joinRoom(roomId);
|
||||
cy.visit("/#/room/" + roomId);
|
||||
});
|
||||
|
||||
// Around 200 characters
|
||||
const MessageLong =
|
||||
|
@ -407,12 +409,15 @@ describe("Threads", () => {
|
|||
});
|
||||
|
||||
let roomId: string;
|
||||
cy.createRoom({}).then((_roomId) => {
|
||||
roomId = _roomId;
|
||||
cy.inviteUser(roomId, bot.getUserId());
|
||||
bot.joinRoom(roomId);
|
||||
cy.visit("/#/room/" + roomId);
|
||||
});
|
||||
cy.createRoom({})
|
||||
.then((_roomId) => {
|
||||
roomId = _roomId;
|
||||
return cy.inviteUser(roomId, bot.getUserId());
|
||||
})
|
||||
.then(async () => {
|
||||
await bot.joinRoom(roomId);
|
||||
cy.visit("/#/room/" + roomId);
|
||||
});
|
||||
|
||||
// Exclude timestamp, read marker, and mapboxgl-map from snapshots
|
||||
const percyCSS =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue