From 9be2a86be3b96fbb7f6642325a77c82cc26b7488 Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com> Date: Sat, 19 Oct 2024 23:00:24 -0300 Subject: [PATCH] Do not assert settings update status --- .../e2e/omnichannel/omnichannel-current-chats.spec.ts | 8 ++++---- .../e2e/omnichannel/omnichannel-livechat-api.spec.ts | 2 +- .../omnichannel-livechat-avatar-visibility.spec.ts | 4 ++-- .../omnichannel/omnichannel-livechat-department.spec.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-current-chats.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-current-chats.spec.ts index 3940a249e5561..e1a8b75d685c1 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-current-chats.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-current-chats.spec.ts @@ -291,8 +291,8 @@ test.describe('OC - Current Chats [Manual Selection]', () => { let agent: Awaited>; test.beforeAll(async ({ api }) => { - expect((await api.post('/settings/Livechat_Routing_Method', { value: 'Manual_Selection' })).status()).toBe(200); - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' })).status()).toBe(200); + await api.post('/settings/Livechat_Routing_Method', { value: 'Manual_Selection' }); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' }); }); test.beforeAll(async ({ api }) => { @@ -325,8 +325,8 @@ test.describe('OC - Current Chats [Manual Selection]', () => { }); test.afterAll(async ({ api }) => { - expect((await api.post('/settings/Livechat_Routing_Method', { value: 'Auto_Selection' })).status()).toBe(200); - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' })).status()).toBe(200); + await api.post('/settings/Livechat_Routing_Method', { value: 'Auto_Selection' }); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' }); }); test.afterAll(async () => { diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-api.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-api.spec.ts index 3a3a597575cba..8818df07d38fe 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-api.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-api.spec.ts @@ -71,7 +71,7 @@ test.describe('OC - Livechat API', () => { }); test.afterAll(async ({ api }) => { - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' })).status()).toBe(200); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' }); }); test.describe('Basic Widget Interactions', () => { diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-avatar-visibility.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-avatar-visibility.spec.ts index da2c3e9244013..04ac0c9debe87 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-avatar-visibility.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-avatar-visibility.spec.ts @@ -30,7 +30,7 @@ test.describe('OC - Livechat - Avatar visibility', async () => { if (res.status() !== 200) { throw new Error('Failed to make agent available'); } - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' })).status()).toBe(200); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' }); }); test.beforeEach(async ({ browser }) => { @@ -51,7 +51,7 @@ test.describe('OC - Livechat - Avatar visibility', async () => { test.afterAll(async ({ api }) => { await agent.delete(); - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' })).status()).toBe(200); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' }); }); test('OC - Livechat - Change avatar visibility', async () => { diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-department.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-department.spec.ts index 453b83b36b4b5..896fc81fd99ec 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-department.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-department.spec.ts @@ -34,7 +34,7 @@ test.describe('OC - Livechat - Department Flow', () => { [departmentA, departmentB] = departments.map(({ data }) => data); await addAgentToDepartment(api, { department: departmentA, agentId: agent1._id }); await addAgentToDepartment(api, { department: departmentB, agentId: agent2._id }); - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' })).status()).toBe(200); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'never' }); }); test.beforeEach(async ({ page, api, browser }) => { @@ -59,7 +59,7 @@ test.describe('OC - Livechat - Department Flow', () => { await Promise.all([...agents.map((agent) => agent.delete())]); await Promise.all([...departments.map((department) => department.delete())]); await expect((await api.post('/settings/Omnichannel_enable_department_removal', { value: false })).status()).toBe(200); - expect((await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' })).status()).toBe(200); + await api.post('/settings/Livechat_Require_Contact_Verification', { value: 'always' }); }); test('OC - Livechat - Chat with Department', async () => {