Skip to content

Commit 58b6e44

Browse files
committed
test(datetime): wait for calendar body to be visible
1 parent 87a64b3 commit 58b6e44

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/components/datetime/test/color/datetime.e2e.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ test.describe('datetime: color', () => {
55
test('should not have visual regressions', async ({ page }) => {
66
await page.goto('/src/components/datetime/test/color');
77

8-
await page.waitForSelector('.datetime-ready');
9-
108
const colorSelect = page.locator('ion-select');
119
const darkModeToggle = page.locator('ion-checkbox');
1210
const datetime = page.locator('ion-datetime');
1311

12+
await Promise.all([
13+
expect(page.locator('#first .calendar-body')).toBeVisible({ timeout: 30000 }),
14+
expect(page.locator('#second .calendar-body')).toBeVisible({ timeout: 30000 }),
15+
]);
16+
1417
await darkModeToggle.evaluate((el: HTMLIonCheckboxElement) => (el.checked = true));
1518
await page.waitForChanges();
1619

0 commit comments

Comments
 (0)