Skip to content

Commit 20267bd

Browse files
committed
test(select): add color snapshots
1 parent ca59165 commit 20267bd

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
import { expect } from '@playwright/test';
22
import { configs, test } from '@utils/test/playwright';
33

4-
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
4+
configs({ modes: ['md', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
55
test.describe(title('input: color'), () => {
6-
test.describe('input: fill none', () => {
6+
test.describe('input: fill outline', () => {
77
test('should set label and highlight color on expand', async ({ page }) => {
88
await page.setContent(
99
`
10-
<ion-select label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
10+
<ion-select fill="outline" label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
1111
<ion-select-option value="apple">Apple</ion-select-option>
1212
</ion-select>
1313
`,
1414
config
1515
);
1616

1717
const select = page.locator('ion-select');
18-
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-color`));
18+
await expect(select).toHaveScreenshot(screenshot(`select-outline-color`));
1919
});
2020
});
21-
test.describe('input: fill solid', () => {
21+
});
22+
});
23+
24+
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
25+
test.describe(title('input: color'), () => {
26+
test.describe('input: fill none', () => {
2227
test('should set label and highlight color on expand', async ({ page }) => {
2328
await page.setContent(
2429
`
25-
<ion-select fill="solid" label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
30+
<ion-select label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
2631
<ion-select-option value="apple">Apple</ion-select-option>
2732
</ion-select>
2833
`,
2934
config
3035
);
3136

3237
const select = page.locator('ion-select');
33-
await expect(select).toHaveScreenshot(screenshot(`select-solid-color`));
38+
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-color`));
3439
});
3540
});
36-
test.describe('input: fill outline', () => {
41+
test.describe('input: fill solid', () => {
3742
test('should set label and highlight color on expand', async ({ page }) => {
3843
await page.setContent(
3944
`
40-
<ion-select fill="outline" label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
45+
<ion-select fill="solid" label="Label" class="select-expanded" value="apple" class="ion-focused" color="danger">
4146
<ion-select-option value="apple">Apple</ion-select-option>
4247
</ion-select>
4348
`,
4449
config
4550
);
4651

4752
const select = page.locator('ion-select');
48-
await expect(select).toHaveScreenshot(screenshot(`select-outline-color`));
53+
await expect(select).toHaveScreenshot(screenshot(`select-solid-color`));
4954
});
5055
});
5156
});
2.38 KB
Loading
3.08 KB
Loading
2.48 KB
Loading

0 commit comments

Comments
 (0)