Skip to content

Commit afbcdfe

Browse files
committed
test(searchbar): add snapshots
1 parent b24cc94 commit afbcdfe

7 files changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { expect } from '@playwright/test';
2+
import { configs, test } from '@utils/test/playwright';
3+
4+
/**
5+
* This behavior only applies to the `ionic` theme.
6+
* This behavior does not vary across directions.
7+
*/
8+
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
9+
test.describe(title('searchbar: size'), () => {
10+
['medium', 'large'].forEach((size) => {
11+
test(`${size} - should not have visual regressions`, async ({ page }) => {
12+
await page.setContent(
13+
`
14+
<ion-searchbar size="${size}" show-clear-button="always" value="Filled text"></ion-searchbar>
15+
`,
16+
config
17+
);
18+
19+
const searchbar = page.locator('ion-searchbar');
20+
21+
await expect(searchbar).toHaveScreenshot(screenshot(`searchbar-size-${size}`));
22+
});
23+
});
24+
});
25+
});
1.96 KB
Loading
Loading
2.06 KB
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)