-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2e00df
commit 7a0378b
Showing
4 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test('EmbeddedChat should render', async ({ page }) => { | ||
await page.goto('/'); | ||
await expect(page.locator('.ec-embedded-chat')).toBeVisible(); | ||
}); | ||
test.describe.serial("EmbeddedChat Tests", () => { | ||
test("EmbeddedChat should render", async ({ page }) => { | ||
await page.goto("/"); | ||
await expect(page.locator(".ec-embedded-chat")).toBeVisible(); | ||
}); | ||
|
||
test('EmbeddedChat has a title', async ({ page }) => { | ||
await page.goto('/'); | ||
await expect(page.locator('.ec-chat-header--channelName')).toHaveText('Login to chat'); | ||
}); | ||
test("EmbeddedChat has a title", async ({ page }) => { | ||
await page.goto("/"); | ||
await expect(page.locator(".ec-chat-header--channelName")).toHaveText( | ||
"Login to chat" | ||
); | ||
}); | ||
|
||
test("Login and check for messages", async ({ page }) => { | ||
await page.goto("/"); | ||
await page.click('button.ec-button:has-text("JOIN")'); | ||
|
||
await expect( | ||
page.locator('.ec-modal-title:has-text("Login")') | ||
).toBeVisible(); | ||
|
||
await page.fill('input[placeholder="example@example.com"]', "test_acc"); | ||
await page.fill('input[placeholder="Password"]', "test_acc"); | ||
|
||
await page.click('button:has-text("Login")'); | ||
|
||
test('EmbeddedChat has messages', async ({ page }) => { | ||
await page.goto('/'); | ||
await page.waitForSelector(".ec-message"); | ||
|
||
await page.waitForSelector('.ec-message'); | ||
expect(await page.locator('.ec-message').count()).toBeGreaterThan(0); | ||
expect(await page.locator(".ec-message").count()).toBeGreaterThan(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters