From 16682ca8b0f9653be91a08d3c19933bad167dc42 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Tue, 5 Dec 2023 11:56:14 -0300 Subject: [PATCH] chore: adjusted close room flow and permissions --- .../e2e/omnichannel/omnichannel-monitor-role.spec.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts index ed84a94f0158b..57af5093366f6 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts @@ -40,7 +40,7 @@ test.describe('OC - Monitor Role', () => { // Create agents test.beforeAll(async ({ api }) => { - agents = await Promise.all([createAgent(api, 'user1'), createAgent(api, 'user2'), createAgent(api, MONITOR)]); + agents = await Promise.all([createAgent(api, 'user1'), createAgent(api, 'user2')]); const agentsStatuses = await Promise.all(agents.slice(0, 1).map(({ data: agent }) => makeAgentAvailable(api, agent._id))); @@ -184,12 +184,9 @@ test.describe('OC - Monitor Role', () => { await page.waitForURL('/omnichannel/current'); }); - await test.step('expect to be able to remove closed rooms', async () => { - await poOmnichannel.currentChats.btnRemoveByName(ROOM_A).click(); - await expect(poOmnichannel.currentChats.modalConfirmRemove).toBeVisible(); - await poOmnichannel.currentChats.btnConfirmRemove.click(); - await expect(poOmnichannel.currentChats.modalConfirmRemove).not.toBeVisible(); - await expect(poOmnichannel.currentChats.findRowByName(ROOM_A)).not.toBeVisible(); + await test.step('expect not to be able to remove closed room', async () => { + await expect(poOmnichannel.currentChats.findRowByName(ROOM_A)).toBeVisible(); + await expect(poOmnichannel.currentChats.btnRemoveByName(ROOM_A)).not.toBeVisible(); }); });