forked from BuilderIO/mitosis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.spec.ts
37 lines (25 loc) · 1.12 KB
/
main.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { expect, test } from '@playwright/test';
test.describe('e2e', () => {
test('todo list add', async ({ page }) => {
await page.goto('/one-component/');
// await expect(page.locator('li')).toHaveCount(2);
await page.locator('input').click();
await page.locator('input').fill('Test Items One');
await page.locator('text=Add list item').click(); // Add button
// await expect(page.locator('li')).toHaveCount(3);
});
test('todo list add - multi component', async ({ page }) => {
await page.goto('/two-components/');
// await expect(page.locator('li')).toHaveCount(2);
await page.locator('input').click();
await page.locator('input').fill('Test Items One');
await page.locator('text=Add list item').click(); // Add button
// await expect(page.locator('li')).toHaveCount(3);
});
test('show-for component test', async ({ page }) => {
await page.goto('/show-for-component/');
await expect(page.locator('text=number :1')).toBeVisible();
await expect(page.locator('text=number :2')).toBeVisible();
await expect(page.locator('text=number :3')).toBeVisible();
});
});