|
|
|
|
@ -27,6 +27,17 @@ test.describe('omnichannel-transfer-to-another-agent', () => { |
|
|
|
|
agent2 = { page: page2, poHomeOmnichannel: new HomeOmnichannel(page2) }; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test.afterAll(async ({ api }) => { |
|
|
|
|
await Promise.all([ |
|
|
|
|
api.delete('/livechat/users/agent/user1').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.delete('/livechat/users/manager/user1').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.delete('/livechat/users/agent/user2').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.post('/settings/Livechat_enabled_when_agent_idle', { value: true }).then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
await agent1.page.close(); |
|
|
|
|
await agent2.page.close(); |
|
|
|
|
}); |
|
|
|
|
test.beforeEach(async ({ page }) => { |
|
|
|
|
// make "user-1" online & "user-2" offline so that chat can be automatically routed to "user-1"
|
|
|
|
|
await agent1.poHomeOmnichannel.sidenav.switchStatus('online'); |
|
|
|
|
@ -45,18 +56,6 @@ test.describe('omnichannel-transfer-to-another-agent', () => { |
|
|
|
|
await poLiveChat.btnSendMessageToOnlineAgent.click(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test.afterAll(async ({ api }) => { |
|
|
|
|
await Promise.all([ |
|
|
|
|
api.delete('/livechat/users/agent/user1').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.delete('/livechat/users/manager/user1').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.delete('/livechat/users/agent/user2').then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
api.post('/settings/Livechat_enabled_when_agent_idle', { value: true }).then((res) => expect(res.status()).toBe(200)), |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
await agent1.page.close(); |
|
|
|
|
await agent2.page.close(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('transfer omnichannel chat to another agent', async () => { |
|
|
|
|
await test.step('Expect to have 1 omnichannel assigned to agent 1', async () => { |
|
|
|
|
await agent1.poHomeOmnichannel.sidenav.openChat(newVisitor.name); |
|
|
|
|
|