Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/meteor/ee/server/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"pino": "^8.21.0",
"sodium-native": "^4.3.3",
"sodium-plus": "^0.9.0",
"ws": "~8.18.3"
"ws": "~8.19.0"
},
"devDependencies": {
"@rocket.chat/icons": "~0.47.0",
Expand All @@ -54,7 +54,7 @@
"@types/express": "^4.17.25",
"@types/fibers": "^3.1.4",
"@types/node": "~22.16.5",
"@types/ws": "^8.5.13",
"@types/ws": "^8.18.1",
"npm-run-all": "^4.1.5",
"pino-pretty": "^7.6.1",
"ts-node": "^10.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ test.describe('E2EE Encrypted Channels', () => {
await poHomeChannel.content.toggleAlsoSendThreadToChannel(true);
await page.getByRole('dialog').locator('[name="msg"]').last().fill('This is an encrypted thread message also sent in channel');
await page.keyboard.press('Enter');
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is an encrypted thread message also sent in channel');
await expect(poHomeChannel.content.lastThreadMessageText.locator('.rcx-icon--name-key')).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is an encrypted thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage.locator('.rcx-icon--name-key')).toBeVisible();
await expect(poHomeChannel.content.lastThreadMessagePreview).toContainText('This is an encrypted thread message also sent in channel');
await expect(poHomeChannel.content.mainThreadMessageText).toContainText('This is the thread main message.');
await expect(poHomeChannel.content.mainThreadMessageText.locator('.rcx-icon--name-key')).toBeVisible();
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/tests/e2e/message-actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test.describe.serial('message-actions', () => {
await page.locator('.rcx-vertical-bar').locator(`role=textbox[name="Message #${targetChannel}"]`).type('this is a reply message');
await page.keyboard.press('Enter');

await expect(poHomeChannel.content.lastThreadMessageText).toHaveText('this is a reply message');
await expect(poHomeChannel.content.lastUserThreadMessage).toHaveText('this is a reply message');
});

// with thread open we listen to the subscription and update the collection from there
Expand All @@ -48,7 +48,7 @@ test.describe.serial('message-actions', () => {
await poHomeChannel.content.openReplyInThread();
await page.getByRole('dialog').locator(`role=textbox[name="Message #${targetChannel}"]`).fill('this is a reply message');
await page.keyboard.press('Enter');
await expect(poHomeChannel.content.lastThreadMessageText).toHaveText('this is a reply message');
await expect(poHomeChannel.content.lastUserThreadMessage).toHaveText('this is a reply message');
});

await test.step('unfollow thread', async () => {
Expand All @@ -73,7 +73,7 @@ test.describe.serial('message-actions', () => {
await poHomeChannel.content.openReplyInThread();
await page.locator('.rcx-vertical-bar').locator(`role=textbox[name="Message #${targetChannel}"]`).fill('this is a reply message');
await page.keyboard.press('Enter');
await expect(poHomeChannel.content.lastThreadMessageText).toHaveText('this is a reply message');
await expect(poHomeChannel.content.lastUserThreadMessage).toHaveText('this is a reply message');
});

// close thread before testing because the behavior changes
Expand Down
14 changes: 7 additions & 7 deletions apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export class HomeContent {
return this.messageListItems.last();
}

get lastUserThreadMessage(): Locator {
return this.threadMessageListItems.last();
}

get lastThreadMessagePreview(): Locator {
return this.page.getByRole('listitem').locator('[role="link"][aria-roledescription="thread message preview"]').last();
}
Expand Down Expand Up @@ -269,10 +273,6 @@ export class HomeContent {
return this.threadMessageListItems.first();
}

get lastThreadMessageText(): Locator {
return this.threadMessageListItems.last();
}

get lastThreadMessagePreviewText(): Locator {
return this.page.locator('div.messages-box ul.messages-list [role=link]').last();
}
Expand Down Expand Up @@ -417,9 +417,9 @@ export class HomeContent {
}

async openLastThreadMessageMenu(): Promise<void> {
await this.threadMessageList.last().hover();
await this.threadMessageList.last().getByRole('button', { name: 'More', exact: true }).waitFor();
await this.threadMessageList.last().getByRole('button', { name: 'More', exact: true }).click();
await this.lastUserThreadMessage.hover();
await this.lastUserThreadMessage.getByRole('button', { name: 'More', exact: true }).waitFor();
await this.lastUserThreadMessage.getByRole('button', { name: 'More', exact: true }).click();
}

async toggleAlsoSendThreadToChannel(isChecked: boolean): Promise<void> {
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/tests/e2e/quote-attachment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test.describe.parallel('Quote Attachment', () => {
});

await test.step('Quote the message with attachment in thread', async () => {
await poHomeChannel.content.lastThreadMessageText.hover();
await poHomeChannel.content.lastUserThreadMessage.hover();
await poHomeChannel.content.btnQuoteMessage.click();

// Verify the quote preview shows both file and description
Expand All @@ -94,10 +94,10 @@ test.describe.parallel('Quote Attachment', () => {
});

await test.step('Verify the quoted message appears correctly in thread', async () => {
await expect(poHomeChannel.content.lastThreadMessageText).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toBeVisible();
await expect(poHomeChannel.content.threadMessageQuotedFileDescription(fileDescription)).toBeVisible();
await expect(poHomeChannel.content.threadMessageQuotedFileName(textFileName)).toBeVisible();
await expect(poHomeChannel.content.lastThreadMessageText).toContainText(threadQuoteMessage);
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText(threadQuoteMessage);
});
});

Expand Down
10 changes: 5 additions & 5 deletions apps/meteor/tests/e2e/quote-messages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,21 @@ test.describe.serial('Quote Messages', () => {
await poHomeChannel.content.openReplyInThread();
await expect(page).toHaveURL(/.*thread/);
await poHomeChannel.content.sendMessageInThread(threadMessage);
await expect(poHomeChannel.content.lastThreadMessageText).toContainText(threadMessage);
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText(threadMessage);
});

await test.step('Quote message in DM thread', async () => {
await poHomeChannel.content.lastThreadMessageText.hover();
await poHomeChannel.content.lastUserThreadMessage.hover();
await poHomeChannel.content.btnQuoteMessage.click();
await expect(poHomeChannel.content.threadQuotePreview).toBeVisible();
await expect(poHomeChannel.content.threadQuotePreview).toContainText(threadMessage);
await poHomeChannel.content.sendMessageInThread(quoteText);
});

await test.step('Verify quoted message appears in DM thread', async () => {
await expect(poHomeChannel.content.lastThreadMessageText).toBeVisible();
await expect(poHomeChannel.content.lastThreadMessageText.locator('blockquote')).toBeVisible();
await expect(poHomeChannel.content.lastThreadMessageText).toContainText(quoteText);
await expect(poHomeChannel.content.lastUserThreadMessage).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage.locator('blockquote')).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText(quoteText);
});
});
});
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/team-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ test.describe.serial('teams-management', () => {
await poHomeTeam.content.openReplyInThread();
await page.locator('.rcx-vertical-bar').locator(`role=textbox[name="Message #${targetTeam}"]`).type('any-reply-message');
await page.keyboard.press('Enter');
await expect(poHomeTeam.content.lastThreadMessageText).toHaveText('any-reply-message');
await expect(poHomeTeam.content.lastUserThreadMessage).toHaveText('any-reply-message');
});

test('should set targetTeam as readonly', async () => {
Expand Down
20 changes: 10 additions & 10 deletions apps/meteor/tests/e2e/threads.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ test.describe.serial('Threads', () => {
await poHomeChannel.content.toggleAlsoSendThreadToChannel(true);
await page.getByRole('dialog').locator('[name="msg"]').last().fill('This is a thread message also sent in channel');
await page.keyboard.press('Enter');
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastThreadMessagePreview).toContainText('This is a thread message also sent in channel');
});
test('expect open threads contextual bar when clicked on thread preview', async ({ page }) => {
await poHomeChannel.content.lastThreadMessagePreviewText.click();
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is a thread message also sent in channel');
});
test.describe('hideFlexTab Preference enabled for threads', () => {
test.beforeAll(async ({ api }) => {
Expand All @@ -64,18 +64,18 @@ test.describe.serial('Threads', () => {
test('expect open threads contextual bar when clicked on thread preview', async ({ page }) => {
await poHomeChannel.content.lastThreadMessagePreviewText.click();
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is a thread message also sent in channel');
});
test('expect not to close thread contextual bar when performing some action', async ({ page }) => {
await poHomeChannel.content.lastThreadMessagePreviewText.click();
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is a thread message also sent in channel');

await poHomeChannel.content.openLastThreadMessageMenu();
await page.locator('role=menuitem[name="Copy text"]').click();

await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toContainText('This is a thread message also sent in channel');
await expect(poHomeChannel.content.lastUserThreadMessage).toContainText('This is a thread message also sent in channel');
});
});
test('expect upload a file attachment in thread with description', async ({ page }) => {
Expand Down Expand Up @@ -131,8 +131,8 @@ test.describe.serial('Threads', () => {
});

test('expect quote the thread message', async ({ page }) => {
await poHomeChannel.content.lastThreadMessageText.hover();
await poHomeChannel.content.lastThreadMessageText.getByRole('button', { name: 'Quote' }).click();
await poHomeChannel.content.lastUserThreadMessage.hover();
await poHomeChannel.content.lastUserThreadMessage.getByRole('button', { name: 'Quote' }).click();
await page.locator('[name="msg"]').last().fill('this is a quote message');
await page.keyboard.press('Enter');

Expand Down Expand Up @@ -168,15 +168,15 @@ test.describe.serial('Threads', () => {

test('expect close thread if has only one message and user press escape', async ({ page }) => {
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toBeVisible();
await expect(page.locator('[name="msg"]').last()).toBeFocused();
await page.keyboard.press('Escape');
await expect(page).not.toHaveURL(/.*thread/);
});

test('expect reset the thread composer to original message if user presses escape', async ({ page }) => {
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toBeVisible();

await expect(page.locator('[name="msg"]').last()).toBeFocused();
await page.locator('[name="msg"]').last().fill('message to be edited');
Expand All @@ -193,7 +193,7 @@ test.describe.serial('Threads', () => {

test('expect clean composer and keep the thread open if user is editing message and presses escape', async ({ page }) => {
await expect(page).toHaveURL(/.*thread/);
await expect(poHomeChannel.content.lastThreadMessageText).toBeVisible();
await expect(poHomeChannel.content.lastUserThreadMessage).toBeVisible();
await expect(page.locator('[name="msg"]').last()).toBeFocused();

await page.locator('[name="msg"]').last().fill('message to be edited');
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/ddp-streamer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"sharp": "^0.33.5",
"underscore": "^1.13.7",
"uuid": "^11.0.3",
"ws": "~8.18.3"
"ws": "~8.19.0"
},
"devDependencies": {
"@rocket.chat/apps-engine": "workspace:^",
Expand All @@ -56,7 +56,7 @@
"@types/prometheus-gc-stats": "^0.6.4",
"@types/underscore": "^1.13.0",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.13",
"@types/ws": "^8.18.1",
"eslint": "~9.39.3",
"pino-pretty": "^7.6.1",
"ts-node": "^10.9.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/ddp-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"@rocket.chat/jest-presets": "workspace:~",
"@rocket.chat/tsconfig": "workspace:*",
"@types/jest": "~30.0.0",
"@types/ws": "^8.5.13",
"@types/ws": "^8.18.1",
"eslint": "~9.39.3",
"jest": "~30.2.0",
"jest-websocket-mock": "~2.5.0",
"typescript": "~5.9.3",
"ws": "~8.18.3"
"ws": "~8.19.0"
},
"peerDependencies": {
"@rocket.chat/emitter": "*"
Expand Down
29 changes: 19 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9020,12 +9020,12 @@ __metadata:
"@rocket.chat/rest-typings": "workspace:^"
"@rocket.chat/tsconfig": "workspace:*"
"@types/jest": "npm:~30.0.0"
"@types/ws": "npm:^8.5.13"
"@types/ws": "npm:^8.18.1"
eslint: "npm:~9.39.3"
jest: "npm:~30.2.0"
jest-websocket-mock: "npm:~2.5.0"
typescript: "npm:~5.9.3"
ws: "npm:~8.18.3"
ws: "npm:~8.19.0"
peerDependencies:
"@rocket.chat/emitter": "*"
languageName: unknown
Expand Down Expand Up @@ -9054,7 +9054,7 @@ __metadata:
"@types/prometheus-gc-stats": "npm:^0.6.4"
"@types/underscore": "npm:^1.13.0"
"@types/uuid": "npm:^10.0.0"
"@types/ws": "npm:^8.5.13"
"@types/ws": "npm:^8.18.1"
colorette: "npm:^1.4.0"
ejson: "npm:^2.2.3"
eslint: "npm:~9.39.3"
Expand All @@ -9074,7 +9074,7 @@ __metadata:
typescript: "npm:~5.9.3"
underscore: "npm:^1.13.7"
uuid: "npm:^11.0.3"
ws: "npm:~8.18.3"
ws: "npm:~8.19.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -15185,6 +15185,15 @@ __metadata:
languageName: node
linkType: hard

"@types/ws@npm:^8.18.1":
version: 8.18.1
resolution: "@types/ws@npm:8.18.1"
dependencies:
"@types/node": "npm:*"
checksum: 10/1ce05e3174dcacf28dae0e9b854ef1c9a12da44c7ed73617ab6897c5cbe4fccbb155a20be5508ae9a7dde2f83bd80f5cf3baa386b934fc4b40889ec963e94f3a
languageName: node
linkType: hard

"@types/ws@npm:^8.5.10, @types/ws@npm:^8.5.13":
version: 8.5.13
resolution: "@types/ws@npm:8.5.13"
Expand Down Expand Up @@ -33687,7 +33696,7 @@ __metadata:
"@types/express": "npm:^4.17.25"
"@types/fibers": "npm:^3.1.4"
"@types/node": "npm:~22.16.5"
"@types/ws": "npm:^8.5.13"
"@types/ws": "npm:^8.18.1"
ajv: "npm:^8.17.1"
bcrypt: "npm:^5.1.1"
body-parser: "npm:^1.20.4"
Expand All @@ -33709,7 +33718,7 @@ __metadata:
sodium-plus: "npm:^0.9.0"
ts-node: "npm:^10.9.2"
typescript: "npm:~5.9.3"
ws: "npm:~8.18.3"
ws: "npm:~8.19.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -38492,9 +38501,9 @@ __metadata:
languageName: node
linkType: hard

"ws@npm:~8.18.3":
version: 8.18.3
resolution: "ws@npm:8.18.3"
"ws@npm:~8.19.0":
version: 8.19.0
resolution: "ws@npm:8.19.0"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ">=5.0.2"
Expand All @@ -38503,7 +38512,7 @@ __metadata:
optional: true
utf-8-validate:
optional: true
checksum: 10/725964438d752f0ab0de582cd48d6eeada58d1511c3f613485b5598a83680bedac6187c765b0fe082e2d8cc4341fc57707c813ae780feee82d0c5efe6a4c61b6
checksum: 10/26e4901e93abaf73af9f26a93707c95b4845e91a7a347ec8c569e6e9be7f9df066f6c2b817b2d685544e208207898a750b78461e6e8d810c11a370771450c31b
languageName: node
linkType: hard

Expand Down
Loading