Skip to content

Commit

Permalink
fix: e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Apr 30, 2024
1 parent fadb465 commit e236469
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions apps/meteor/tests/e2e/read-receipts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,19 @@ test.describe.serial('read-receipts', () => {
await page.goto('/home');
});

test('should show read receipts message sent status in the sent message', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await poHomeChannel.content.sendMessage('hello world');

await expect(poHomeChannel.content.lastUserMessage.getByRole('status', { name: 'Message sent' })).toBeVisible();
});

test('should show read receipts message viewed status in the sent message', async ({ browser }) => {
test('should show read receipts message sent status in the sent message', async ({ browser }) => {
const { page } = await createAuxContext(browser, Users.user1);
const auxContext = { page, poHomeChannel: new HomeChannel(page) };
await auxContext.poHomeChannel.sidenav.openChat(targetChannel);
await auxContext.poHomeChannel.content.sendMessage('hello admin');

await expect(auxContext.poHomeChannel.content.lastUserMessage.getByRole('status', { name: 'Message sent' })).toBeVisible();
await auxContext.page.close();
});

test('should show read receipts message viewed status in the sent message', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await expect(poHomeChannel.content.lastUserMessage.getByRole('status', { name: 'Message viewed' })).toBeVisible();

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

test('should show the reads receipt modal with the users who read the message', async ({ page, api }) => {
Expand Down

0 comments on commit e236469

Please sign in to comment.