Skip to content

Commit

Permalink
test: adding missing verifications on message-actions (#30531)
Browse files Browse the repository at this point in the history
  • Loading branch information
janainaCoelhoRocketchat authored Oct 2, 2023
1 parent b252d69 commit d04c601
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/meteor/tests/e2e/message-actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ test.describe.serial('message-actions', () => {
await page.locator('[data-qa-id="edit-message"]').click();
await page.locator('[name="msg"]').fill('this message was edited');
await page.keyboard.press('Enter');

await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('this message was edited');
});

test('expect message is deleted', async ({ page }) => {
await poHomeChannel.content.sendMessage('Message to delete');
await poHomeChannel.content.openLastMessageMenu();
await page.locator('[data-qa-id="delete-message"]').click();
await page.locator('#modal-root .rcx-button-group--align-end .rcx-button--danger').click();
await expect(poHomeChannel.content.lastUserMessage.locator('[data-qa-type="message-body"]:has-text("Message to delete")')).toHaveCount(
0,
);
});

test('expect quote the message', async ({ page }) => {
Expand All @@ -64,6 +69,9 @@ test.describe.serial('message-actions', () => {
await poHomeChannel.content.sendMessage('Message to star');
await poHomeChannel.content.openLastMessageMenu();
await page.locator('[data-qa-id="star-message"]').click();
await page.getByRole('button').and(page.getByTitle('Options')).click();
await page.locator('[data-key="starred-messages"]').click();
await expect(poHomeChannel.content.lastUserMessageBody).toHaveText('Message to star');
});

test('expect copy the message', async ({ page }) => {
Expand Down

0 comments on commit d04c601

Please sign in to comment.