Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ test.describe('OC - Livechat API', () => {
await poLiveChat.onlineAgentMessage.type('this_a_test_message_from_visitor');
await poLiveChat.btnSendMessageToOnlineAgent.click();

await poAuxContext.poHomeOmnichannel.sidenav.openChat(registerGuestVisitor.name);

await test.step('Expect setGuestEmail to change a guest email', async () => {
await poLiveChat.page.evaluate(
(registerGuestVisitor) => window.RocketChat.livechat.setGuestName(`changed${registerGuestVisitor.name}`),
Expand All @@ -429,9 +431,7 @@ test.describe('OC - Livechat API', () => {
});

await test.step('Expect registered guest to have valid info', async () => {
await poAuxContext.poHomeOmnichannel.sidenav.openChat(registerGuestVisitor.name);

await expect(poAuxContext.poHomeOmnichannel.content.infoContactName).toContainText(`changed${registerGuestVisitor.name}`);
await expect(poAuxContext.poHomeOmnichannel.content.infoHeaderName).toContainText(`changed${registerGuestVisitor.name}`);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,8 @@ export class HomeOmnichannelContent extends HomeContent {
get btnOnHoldConfirm(): Locator {
return this.modalOnHold.locator('role=button[name="Place chat On-Hold"]');
}

get infoHeaderName(): Locator {
return this.page.locator('.rcx-room-header').getByRole('heading');
}
}