Skip to content

Commit

Permalink
test: fix messaging flaky test (#31512)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Jan 23, 2024
1 parent 1726b50 commit 1d81df0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions apps/meteor/tests/e2e/messaging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(async () => {
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
}).toPass();

await auxContext.page.close();
});
Expand All @@ -43,8 +45,10 @@ test.describe.serial('Messaging', () => {

await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(async () => {
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
await expect(auxContext.poHomeChannel.content.lastUserMessageBody).toHaveText('hello world');
}).toPass();

await auxContext.page.close();
});
Expand Down

0 comments on commit 1d81df0

Please sign in to comment.