/
githubmirror
/
ionic-framework
Обзор
Документация
Войти
/
githubmirror
/
ionic-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/test/base/e2e/src/lazy/popover.spec.ts
37 строк
1 KB
Brandy Smith
test(angular): migrate to playwright (#30594)
05 авг 2025, 16:58
Не верифицирован
05 авг 2025, 16:58
05026c5
Код
Авторство
О чём код?
import { test, expect } from '@playwright/test'; test.describe('Popovers: Inline', () => { test.beforeEach(async ({ page }) => { await page.goto('/lazy/popover-inline'); }); test('should initially have no items', async ({ page }) => { await page.locator('ion-button').click(); await expect(page.locator('ion-popover')).toBeVisible(); await expect(page.locator('ion-list ion-item')).not.toBeVisible(); }); test('should have items after 1500ms', async ({ page }) => { await page.locator('ion-button').click(); await expect(page.locator('ion-popover')).toBeVisible(); await page.waitForTimeout(1500); await expect(page.locator('ion-list ion-item:nth-child(1)')).toHaveText('A'); await expect(page.locator('ion-list ion-item:nth-child(2)')).toHaveText('B'); await expect(page.locator('ion-list ion-item:nth-child(3)')).toHaveText('C'); await expect(page.locator('ion-list ion-item:nth-child(4)')).toHaveText('D'); }); test('should have an item with a disabled attribute', async ({ page }) => { await page.locator('ion-button').click(); await expect(page.locator('ion-popover')).toBeVisible(); await page.waitForTimeout(1500); await expect(page.locator('ion-list ion-item:nth-child(3)')).toHaveAttribute('disabled'); }); });