test(datetime): update snapshots and use waitFor

This commit is contained in:
Maria Hutt
2025-03-31 13:03:20 -07:00
parent 78df64c115
commit e27bb2c529
29 changed files with 7 additions and 0 deletions

View File

@ -8,42 +8,49 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('datetime: show adjacent days'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#default');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days`));
});
test('should not have visual regressions with a custom styled calendar', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#custom-calendar-days');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-custom-calendar`));
});
test('should not have visual regressions with specific date disabled', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#specificDate');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-specific-date-disabled`));
});
test('should not have visual regressions with weekends disabled', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#weekends');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-weekends-disabled`));
});
test('should not have visual regressions with date range disabled', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#dateRange');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-date-range-disabled`));
});
test('should not have visual regressions with month disabled', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#month');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-month-disabled`));
});
test('should not have visual regressions with display specified', async ({ page }) => {
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
await page.locator('.datetime-ready').first().waitFor();
const datetime = page.locator('#display');
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-display`));
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 21 KiB