Skip to content

Commit

Permalink
fix: explicitly navigate to chat view in e2e spec (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
walaszczykm authored Jul 15, 2024
1 parent 14c28bd commit 7b95638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions e2e/example-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export class ExamplePage {
this.widgetFrame = await elementHandle.contentFrame()
}

async openChatView() {
await this.widgetFrame.locator('text=Chat now').click()
}

async startTheChat() {
const startTheChatButton = await this.widgetFrame.waitForSelector('text=Start the chat', {
state: 'visible',
Expand Down
1 change: 1 addition & 0 deletions e2e/examples.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test.describe.parallel('Example applications', () => {
const examplePage = new ExamplePage(page, framework)
await examplePage.goto()
await examplePage.getWidgetIframe()
await examplePage.openChatView()

customerData.id = examplePage.getServerCustomerId()
await expect(examplePage.dataContainers.widgetIsReady).toHaveText('Widget is ready: true')
Expand Down

0 comments on commit 7b95638

Please sign in to comment.