Skip to content
Snippets Groups Projects
Unverified Commit 6599afe3 authored by Pierre Lehnen's avatar Pierre Lehnen Committed by GitHub
Browse files

fix: option to start a discussion on an existing message is not showing up (#32765)

parent 580c1ed5
No related branches found
No related tags found
No related merge requests found
---
'@rocket.chat/meteor': patch
---
Fixed an issue that prevented the option to start a discussion from being shown on the message actions
......@@ -44,7 +44,7 @@ Meteor.startup(() => {
subscription,
user,
}) {
if (drid || !Number.isNaN(dcount)) {
if (drid || !Number.isNaN(Number(dcount))) {
return false;
}
if (!subscription) {
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment