Skip to content

Commit

Permalink
Merge branch 'develop' into after-reg-trigger-flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jul 22, 2024
2 parents 35ca730 + 6599afe commit fc5615e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sixty-nails-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed an issue that prevented the option to start a discussion from being shown on the message actions
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Meteor.startup(() => {
subscription,
user,
}) {
if (drid || !Number.isNaN(dcount)) {
if (drid || !Number.isNaN(Number(dcount))) {
return false;
}
if (!subscription) {
Expand Down
14 changes: 14 additions & 0 deletions apps/meteor/tests/e2e/message-actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ test.describe.serial('message-actions', () => {
await expect(poHomeChannel.content.lastMessageTextAttachmentEqualsText).toHaveText(message);
});

test('expect create a discussion from message', async ({ page }) => {
const message = `Message for discussion - ${Date.now()}`;

await poHomeChannel.content.sendMessage(message);
await poHomeChannel.content.openLastMessageMenu();
await page.locator('role=menuitem[name="Start a Discussion"]').click();
await page.locator('input[name="topic"]').fill('1');
await page.getByRole('dialog').getByRole('button', { name: 'create' }).click();
// There is some condition checking if the form has been edited.
// the "Create" button should not be disabled if starting a discussion from a message
// TODO: Fix form and remove line below
await expect(page.locator('header h1')).toHaveText(message);
});

test('expect star the message', async ({ page }) => {
await poHomeChannel.content.sendMessage('Message to star');
await poHomeChannel.content.openLastMessageMenu();
Expand Down

0 comments on commit fc5615e

Please sign in to comment.