Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
5 changes: 5 additions & 0 deletions .changeset/grumpy-colts-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue where custom status is not updating immediately if the value is empty
2 changes: 1 addition & 1 deletion apps/meteor/server/modules/listeners/listeners.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class ListenersModule {
id: _id,
diff: {
status,
...(statusText && { statusText }),
statusText,
Comment thread
cardoso marked this conversation as resolved.
Outdated
},
unset: {},
});
Expand Down
18 changes: 17 additions & 1 deletion apps/meteor/tests/e2e/presence.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ test.describe.serial('Presence', () => {
await user1Channel.sidenav.btnUserProfileMenu.click();
await user1Channel.sidenav.getUserProfileMenuOption('Custom Status').click();
await user1Modal.changeStatusMessage('new status');

await user1Page.close();
});

Expand All @@ -64,6 +63,23 @@ test.describe.serial('Presence', () => {
await expect(poHomeChannel.content.channelHeader).toContainText('new status');
});
});

test('should be able to erase custom status', async ({ page }) => {
const editStatusModal = new EditStatusModal(page);

await poHomeChannel.sidenav.btnUserProfileMenu.click();
await poHomeChannel.sidenav.getUserProfileMenuOption('Custom Status').click();
await editStatusModal.changeStatusMessage('new status');

await poHomeChannel.sidenav.btnUserProfileMenu.click();
await expect(poHomeChannel.sidenav.userProfileMenu).toContainText('new status');

await poHomeChannel.sidenav.getUserProfileMenuOption('Custom Status').click();
await editStatusModal.changeStatusMessage('');

await poHomeChannel.sidenav.btnUserProfileMenu.click();
await expect(poHomeChannel.sidenav.userProfileMenu).not.toContainText('new status');
});
});

test.describe('Login using with "Methods by REST" disabled', () => {
Expand Down
Loading