From 97329f355e5fd078b8a962ab01717503c1749bea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:00:52 +0000 Subject: [PATCH 01/10] Initial plan From 4149bc959541f0c48be898a28ef28fbbf819e773 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:07:12 +0000 Subject: [PATCH 02/10] refactor: move visitor creation to before/after blocks in livechat room tests Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- .../tests/end-to-end/api/livechat/00-rooms.ts | 151 ++++++++++-------- 1 file changed, 88 insertions(+), 63 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index d606feac77a87..c94844deb3e43 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -138,79 +138,104 @@ describe('LIVECHAT - rooms', () => { it('should fail when token is not a valid guest token', async () => { await request.get(api('livechat/room')).query({ token: 'invalid-token' }).expect(400); }); - it('should fail if rid is passed but doesnt point to a valid room', async () => { - const visitor = await createVisitor(); - await request.get(api('livechat/room')).query({ token: visitor.token, rid: 'invalid-rid' }).expect(400); - await deleteVisitor(visitor.token); + + describe('with a valid visitor', () => { + let visitor: ILivechatVisitor; + + before(async () => { + visitor = await createVisitor(); + }); + + after(async () => { + await deleteVisitor(visitor.token); + }); + + it('should fail if rid is passed but doesnt point to a valid room', async () => { + await request.get(api('livechat/room')).query({ token: visitor.token, rid: 'invalid-rid' }).expect(400); + }); }); - (IS_EE ? it : it.skip)('should prevent create a room for visitor if an app throws an error', async () => { + + (IS_EE ? describe : describe.skip)('with a visitor that triggers app error', () => { // this test relies on the app installed by the insertApp fixture - // TODO: this visitor should be created on before block and deleted on after block - const visitor = await createVisitor(undefined, 'visitor prevent from app'); - const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + let visitor: ILivechatVisitor; - expect(body).to.have.property('success', false); - await deleteVisitor(visitor.token); - }); - it('should create a room for visitor', async () => { - // TODO: this visitor should be created on before block and deleted on after block - const visitor = await createVisitor(); - const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + before(async () => { + visitor = await createVisitor(undefined, 'visitor prevent from app'); + }); - expect(body).to.have.property('success', true); - expect(body).to.have.property('room'); - expect(body.room).to.have.property('v'); - expect(body.room.v).to.have.property('token', visitor.token); - expect(body.room.source.type).to.be.equal('api'); - await closeOmnichannelRoom(body.room._id); - await deleteVisitor(visitor.token); + after(async () => { + await deleteVisitor(visitor.token); + }); + + it('should prevent create a room for visitor if an app throws an error', async () => { + const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + + expect(body).to.have.property('success', false); + }); }); - it('should return an existing open room when visitor has one available', async () => { - // TODO: this visitor should be created on before block and deleted on after block - const visitor = await createVisitor(); - const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); - expect(body).to.have.property('success', true); - expect(body).to.have.property('room'); - expect(body.room).to.have.property('v'); - expect(body.room.v).to.have.property('token', visitor.token); + describe('room creation', () => { + let visitor: ILivechatVisitor; + + before(async () => { + visitor = await createVisitor(); + }); - const { body: body2 } = await request.get(api('livechat/room')).query({ token: visitor.token }); + after(async () => { + await deleteVisitor(visitor.token); + }); - expect(body2).to.have.property('success', true); - expect(body2).to.have.property('room'); - expect(body2.room).to.have.property('_id', body.room._id); - expect(body2.newRoom).to.be.false; - await closeOmnichannelRoom(body.room._id); - await deleteVisitor(visitor.token); - }); - it('should return a room for the visitor when rid points to a valid open room', async () => { - // TODO: this visitor should be created on before block and deleted on after block - const visitor = await createVisitor(); - const room = await createLivechatRoom(visitor.token); - const { body } = await request.get(api('livechat/room')).query({ token: visitor.token, rid: room._id }); + it('should create a room for visitor', async () => { + const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); - expect(body).to.have.property('success', true); - expect(body).to.have.property('room'); - expect(body.room.v).to.have.property('token', visitor.token); - expect(body.newRoom).to.be.false; - await closeOmnichannelRoom(room._id); - await deleteVisitor(visitor.token); - }); - it('should properly read widget cookies', async () => { - // TODO: this visitor should be created on before block and deleted on after block - const visitor = await createVisitor(); - const { body } = await request - .get(api('livechat/room')) - .set('Cookie', [`rc_room_type=l`, `rc_is_widget=t`]) - .query({ token: visitor.token }); + expect(body).to.have.property('success', true); + expect(body).to.have.property('room'); + expect(body.room).to.have.property('v'); + expect(body.room.v).to.have.property('token', visitor.token); + expect(body.room.source.type).to.be.equal('api'); + await closeOmnichannelRoom(body.room._id); + }); - expect(body).to.have.property('success', true); - expect(body).to.have.property('room'); - expect(body.room.v).to.have.property('token', visitor.token); - expect(body.room.source.type).to.be.equal('widget'); - await closeOmnichannelRoom(body.room._id); - await deleteVisitor(visitor.token); + it('should return an existing open room when visitor has one available', async () => { + const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + + expect(body).to.have.property('success', true); + expect(body).to.have.property('room'); + expect(body.room).to.have.property('v'); + expect(body.room.v).to.have.property('token', visitor.token); + + const { body: body2 } = await request.get(api('livechat/room')).query({ token: visitor.token }); + + expect(body2).to.have.property('success', true); + expect(body2).to.have.property('room'); + expect(body2.room).to.have.property('_id', body.room._id); + expect(body2.newRoom).to.be.false; + await closeOmnichannelRoom(body.room._id); + }); + + it('should return a room for the visitor when rid points to a valid open room', async () => { + const room = await createLivechatRoom(visitor.token); + const { body } = await request.get(api('livechat/room')).query({ token: visitor.token, rid: room._id }); + + expect(body).to.have.property('success', true); + expect(body).to.have.property('room'); + expect(body.room.v).to.have.property('token', visitor.token); + expect(body.newRoom).to.be.false; + await closeOmnichannelRoom(room._id); + }); + + it('should properly read widget cookies', async () => { + const { body } = await request + .get(api('livechat/room')) + .set('Cookie', [`rc_room_type=l`, `rc_is_widget=t`]) + .query({ token: visitor.token }); + + expect(body).to.have.property('success', true); + expect(body).to.have.property('room'); + expect(body.room.v).to.have.property('token', visitor.token); + expect(body.room.source.type).to.be.equal('widget'); + await closeOmnichannelRoom(body.room._id); + }); }); }); From 05d86223ca7033ca2e62dc73f5607588680c7061 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:09:13 +0000 Subject: [PATCH 03/10] refactor: split room tests into separate describe blocks for better isolation Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- .../tests/end-to-end/api/livechat/00-rooms.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index c94844deb3e43..8164295d5e8f4 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -195,6 +195,18 @@ describe('LIVECHAT - rooms', () => { expect(body.room.source.type).to.be.equal('api'); await closeOmnichannelRoom(body.room._id); }); + }); + + describe('existing room retrieval', () => { + let visitor: ILivechatVisitor; + + before(async () => { + visitor = await createVisitor(); + }); + + after(async () => { + await deleteVisitor(visitor.token); + }); it('should return an existing open room when visitor has one available', async () => { const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); @@ -212,6 +224,18 @@ describe('LIVECHAT - rooms', () => { expect(body2.newRoom).to.be.false; await closeOmnichannelRoom(body.room._id); }); + }); + + describe('room retrieval with rid', () => { + let visitor: ILivechatVisitor; + + before(async () => { + visitor = await createVisitor(); + }); + + after(async () => { + await deleteVisitor(visitor.token); + }); it('should return a room for the visitor when rid points to a valid open room', async () => { const room = await createLivechatRoom(visitor.token); @@ -223,6 +247,18 @@ describe('LIVECHAT - rooms', () => { expect(body.newRoom).to.be.false; await closeOmnichannelRoom(room._id); }); + }); + + describe('widget cookies', () => { + let visitor: ILivechatVisitor; + + before(async () => { + visitor = await createVisitor(); + }); + + after(async () => { + await deleteVisitor(visitor.token); + }); it('should properly read widget cookies', async () => { const { body } = await request From 9881835b641b64c17a5e916615bd01835fdc2f99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:12:54 +0000 Subject: [PATCH 04/10] refactor: consolidate visitor before/after blocks into single shared block Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- .../tests/end-to-end/api/livechat/00-rooms.ts | 58 ++----------------- 1 file changed, 5 insertions(+), 53 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index 8164295d5e8f4..1ade8688f305b 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -139,22 +139,6 @@ describe('LIVECHAT - rooms', () => { await request.get(api('livechat/room')).query({ token: 'invalid-token' }).expect(400); }); - describe('with a valid visitor', () => { - let visitor: ILivechatVisitor; - - before(async () => { - visitor = await createVisitor(); - }); - - after(async () => { - await deleteVisitor(visitor.token); - }); - - it('should fail if rid is passed but doesnt point to a valid room', async () => { - await request.get(api('livechat/room')).query({ token: visitor.token, rid: 'invalid-rid' }).expect(400); - }); - }); - (IS_EE ? describe : describe.skip)('with a visitor that triggers app error', () => { // this test relies on the app installed by the insertApp fixture let visitor: ILivechatVisitor; @@ -174,7 +158,7 @@ describe('LIVECHAT - rooms', () => { }); }); - describe('room creation', () => { + describe('with a valid visitor', () => { let visitor: ILivechatVisitor; before(async () => { @@ -185,6 +169,10 @@ describe('LIVECHAT - rooms', () => { await deleteVisitor(visitor.token); }); + it('should fail if rid is passed but doesnt point to a valid room', async () => { + await request.get(api('livechat/room')).query({ token: visitor.token, rid: 'invalid-rid' }).expect(400); + }); + it('should create a room for visitor', async () => { const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); @@ -195,18 +183,6 @@ describe('LIVECHAT - rooms', () => { expect(body.room.source.type).to.be.equal('api'); await closeOmnichannelRoom(body.room._id); }); - }); - - describe('existing room retrieval', () => { - let visitor: ILivechatVisitor; - - before(async () => { - visitor = await createVisitor(); - }); - - after(async () => { - await deleteVisitor(visitor.token); - }); it('should return an existing open room when visitor has one available', async () => { const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); @@ -224,18 +200,6 @@ describe('LIVECHAT - rooms', () => { expect(body2.newRoom).to.be.false; await closeOmnichannelRoom(body.room._id); }); - }); - - describe('room retrieval with rid', () => { - let visitor: ILivechatVisitor; - - before(async () => { - visitor = await createVisitor(); - }); - - after(async () => { - await deleteVisitor(visitor.token); - }); it('should return a room for the visitor when rid points to a valid open room', async () => { const room = await createLivechatRoom(visitor.token); @@ -247,18 +211,6 @@ describe('LIVECHAT - rooms', () => { expect(body.newRoom).to.be.false; await closeOmnichannelRoom(room._id); }); - }); - - describe('widget cookies', () => { - let visitor: ILivechatVisitor; - - before(async () => { - visitor = await createVisitor(); - }); - - after(async () => { - await deleteVisitor(visitor.token); - }); it('should properly read widget cookies', async () => { const { body } = await request From 40804cb23851340744cc8a6d81c8ac8458fd345c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:23:36 +0000 Subject: [PATCH 05/10] refactor: add room cleanup array to prevent after block failures Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index 1ade8688f305b..1beea47a41adc 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -160,12 +160,14 @@ describe('LIVECHAT - rooms', () => { describe('with a valid visitor', () => { let visitor: ILivechatVisitor; + const roomsToClose: string[] = []; before(async () => { visitor = await createVisitor(); }); after(async () => { + await Promise.all(roomsToClose.map((roomId) => closeOmnichannelRoom(roomId).catch(() => {}))); await deleteVisitor(visitor.token); }); @@ -181,7 +183,7 @@ describe('LIVECHAT - rooms', () => { expect(body.room).to.have.property('v'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('api'); - await closeOmnichannelRoom(body.room._id); + roomsToClose.push(body.room._id); }); it('should return an existing open room when visitor has one available', async () => { @@ -198,7 +200,7 @@ describe('LIVECHAT - rooms', () => { expect(body2).to.have.property('room'); expect(body2.room).to.have.property('_id', body.room._id); expect(body2.newRoom).to.be.false; - await closeOmnichannelRoom(body.room._id); + roomsToClose.push(body.room._id); }); it('should return a room for the visitor when rid points to a valid open room', async () => { @@ -209,7 +211,7 @@ describe('LIVECHAT - rooms', () => { expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.newRoom).to.be.false; - await closeOmnichannelRoom(room._id); + roomsToClose.push(room._id); }); it('should properly read widget cookies', async () => { @@ -222,7 +224,7 @@ describe('LIVECHAT - rooms', () => { expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('widget'); - await closeOmnichannelRoom(body.room._id); + roomsToClose.push(body.room._id); }); }); }); From 7a888082f6dd74cc6af2392fd4b732fbca35f6b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:24:49 +0000 Subject: [PATCH 06/10] refactor: use Set for room cleanup to handle duplicates gracefully Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- .../meteor/tests/end-to-end/api/livechat/00-rooms.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index 1beea47a41adc..6585ec45c36e7 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -160,14 +160,14 @@ describe('LIVECHAT - rooms', () => { describe('with a valid visitor', () => { let visitor: ILivechatVisitor; - const roomsToClose: string[] = []; + const roomsToClose = new Set(); before(async () => { visitor = await createVisitor(); }); after(async () => { - await Promise.all(roomsToClose.map((roomId) => closeOmnichannelRoom(roomId).catch(() => {}))); + await Promise.all([...roomsToClose].map((roomId) => closeOmnichannelRoom(roomId).catch(() => {}))); await deleteVisitor(visitor.token); }); @@ -183,7 +183,7 @@ describe('LIVECHAT - rooms', () => { expect(body.room).to.have.property('v'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('api'); - roomsToClose.push(body.room._id); + roomsToClose.add(body.room._id); }); it('should return an existing open room when visitor has one available', async () => { @@ -200,7 +200,7 @@ describe('LIVECHAT - rooms', () => { expect(body2).to.have.property('room'); expect(body2.room).to.have.property('_id', body.room._id); expect(body2.newRoom).to.be.false; - roomsToClose.push(body.room._id); + roomsToClose.add(body.room._id); }); it('should return a room for the visitor when rid points to a valid open room', async () => { @@ -211,7 +211,7 @@ describe('LIVECHAT - rooms', () => { expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.newRoom).to.be.false; - roomsToClose.push(room._id); + roomsToClose.add(room._id); }); it('should properly read widget cookies', async () => { @@ -224,7 +224,7 @@ describe('LIVECHAT - rooms', () => { expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('widget'); - roomsToClose.push(body.room._id); + roomsToClose.add(body.room._id); }); }); }); From b3ca98fe738271fd8f279574f115959e3885d12a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:29:31 +0000 Subject: [PATCH 07/10] refactor: move roomsToClose.add before expect statements Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- .../tests/end-to-end/api/livechat/00-rooms.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index 6585ec45c36e7..6ae19c7dd0858 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -178,17 +178,20 @@ describe('LIVECHAT - rooms', () => { it('should create a room for visitor', async () => { const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + roomsToClose.add(body.room._id); + expect(body).to.have.property('success', true); expect(body).to.have.property('room'); expect(body.room).to.have.property('v'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('api'); - roomsToClose.add(body.room._id); }); it('should return an existing open room when visitor has one available', async () => { const { body } = await request.get(api('livechat/room')).query({ token: visitor.token }); + roomsToClose.add(body.room._id); + expect(body).to.have.property('success', true); expect(body).to.have.property('room'); expect(body.room).to.have.property('v'); @@ -200,18 +203,19 @@ describe('LIVECHAT - rooms', () => { expect(body2).to.have.property('room'); expect(body2.room).to.have.property('_id', body.room._id); expect(body2.newRoom).to.be.false; - roomsToClose.add(body.room._id); }); it('should return a room for the visitor when rid points to a valid open room', async () => { const room = await createLivechatRoom(visitor.token); + + roomsToClose.add(room._id); + const { body } = await request.get(api('livechat/room')).query({ token: visitor.token, rid: room._id }); expect(body).to.have.property('success', true); expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.newRoom).to.be.false; - roomsToClose.add(room._id); }); it('should properly read widget cookies', async () => { @@ -220,11 +224,12 @@ describe('LIVECHAT - rooms', () => { .set('Cookie', [`rc_room_type=l`, `rc_is_widget=t`]) .query({ token: visitor.token }); + roomsToClose.add(body.room._id); + expect(body).to.have.property('success', true); expect(body).to.have.property('room'); expect(body.room.v).to.have.property('token', visitor.token); expect(body.room.source.type).to.be.equal('widget'); - roomsToClose.add(body.room._id); }); }); }); From 2314cab520c449c9cb462e533a821b396ef45b4c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:31:29 +0000 Subject: [PATCH 08/10] refactor: remove room IDs from set after closing Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com> --- apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index 6ae19c7dd0858..f8d6ee084e266 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -167,7 +167,13 @@ describe('LIVECHAT - rooms', () => { }); after(async () => { - await Promise.all([...roomsToClose].map((roomId) => closeOmnichannelRoom(roomId).catch(() => {}))); + await Promise.all( + [...roomsToClose].map((roomId) => + closeOmnichannelRoom(roomId) + .then(() => roomsToClose.delete(roomId)) + .catch(() => {}), + ), + ); await deleteVisitor(visitor.token); }); From 9cd26ad79099a0a075b4b9809dfe04c8cacd6049 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 3 Mar 2026 13:45:32 -0300 Subject: [PATCH 09/10] Apply suggestion from @ggazzo --- apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index f8d6ee084e266..c803ce1498783 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -170,8 +170,7 @@ describe('LIVECHAT - rooms', () => { await Promise.all( [...roomsToClose].map((roomId) => closeOmnichannelRoom(roomId) - .then(() => roomsToClose.delete(roomId)) - .catch(() => {}), + .then(() => roomsToClose.delete(roomId)), ), ); await deleteVisitor(visitor.token); From fd4dcc190f5a9e87798e8e38d7e71b915a6d800f Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 3 Mar 2026 14:23:43 -0300 Subject: [PATCH 10/10] lint --- apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts index c803ce1498783..c4a54e6e74bad 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/00-rooms.ts @@ -167,12 +167,7 @@ describe('LIVECHAT - rooms', () => { }); after(async () => { - await Promise.all( - [...roomsToClose].map((roomId) => - closeOmnichannelRoom(roomId) - .then(() => roomsToClose.delete(roomId)), - ), - ); + await Promise.all([...roomsToClose].map((roomId) => closeOmnichannelRoom(roomId).then(() => roomsToClose.delete(roomId)))); await deleteVisitor(visitor.token); });