Skip to content

Commit 3ae2fff

Browse files
committed
test(input-otp): set explicit height to capture full screenshot
1 parent 64cf4e7 commit 3ae2fff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/components/input-otp/test/color/input-otp.e2e.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
2424
);
2525

2626
const container = page.locator('#container');
27+
// Set viewport size to ensure the entire height is visible
28+
await page.setViewportSize({ width: 393, height: 900 });
2729
await expect(container).toHaveScreenshot(screenshot(`input-otp-color-${fill}`));
2830
});
2931
test(`disabled color with ${fill} fill should not have visual regressions`, async ({ page }) => {
@@ -45,6 +47,8 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
4547
);
4648

4749
const container = page.locator('#container');
50+
// Set viewport size to ensure the entire height is visible
51+
await page.setViewportSize({ width: 393, height: 900 });
4852
await expect(container).toHaveScreenshot(screenshot(`input-otp-color-${fill}-disabled`));
4953
});
5054
test(`readonly color with ${fill} fill should not have visual regressions`, async ({ page }) => {
@@ -66,6 +70,8 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
6670
);
6771

6872
const container = page.locator('#container');
73+
// Set viewport size to ensure the entire height is visible
74+
await page.setViewportSize({ width: 393, height: 900 });
6975
await expect(container).toHaveScreenshot(screenshot(`input-otp-color-${fill}-readonly`));
7076
});
7177
});

0 commit comments

Comments
 (0)