Skip to content

Commit

Permalink
Do not assert settings update status
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 authored Oct 20, 2024
1 parent d13ca2a commit 9be2a86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ test.describe('OC - Current Chats [Manual Selection]', () => {
let agent: Awaited<ReturnType<typeof createAgent>>;

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 }) => {
Expand Down Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand All @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand All @@ -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 () => {
Expand Down

0 comments on commit 9be2a86

Please sign in to comment.