-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathmodal-sheet-inline.spec.ts
More file actions
34 lines (24 loc) · 1.23 KB
/
modal-sheet-inline.spec.ts
File metadata and controls
34 lines (24 loc) · 1.23 KB
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
import { expect, test } from '@playwright/test';
test.describe('Modals: Inline Sheet', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/lazy/modal-sheet-inline');
});
test('should open inline sheet modal', async ({ page }) => {
await page.locator('#present-inline-sheet-modal').click();
await expect(page.locator('ion-modal')).toBeVisible();
await expect(page.locator('#current-breakpoint')).toHaveText('0.2');
await expect(page.locator('ion-modal ion-item')).toHaveCount(4);
});
test('should expand to 0.75 breakpoint when searchbar is clicked', async ({ page }) => {
await page.locator('#present-inline-sheet-modal').click();
await expect(page.locator('#current-breakpoint')).toHaveText('0.2');
await page.locator('ion-modal ion-searchbar').click();
await expect(page.locator('#current-breakpoint')).toHaveText('0.75');
});
test('should allow interacting with background content while sheet is open', async ({ page }) => {
await page.locator('#present-inline-sheet-modal').click();
await expect(page.locator('ion-modal')).toBeVisible();
await page.locator('#background-action').click();
await expect(page.locator('#background-action-count')).toHaveText('1');
});
});