@ionic/core 7.3.2 → 7.3.3-nightly.20230831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/label.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/collection/components/checkbox/test/color/checkbox.e2e.js +2 -2
- package/dist/collection/components/checkbox/test/item/checkbox.e2e.js +4 -4
- package/dist/collection/components/checkbox/test/label/checkbox.e2e.js +10 -10
- package/dist/collection/components/checkbox/test/legacy/basic/checkbox.e2e.js +1 -1
- package/dist/collection/components/checkbox/test/legacy/indeterminate/checkbox.e2e.js +1 -1
- package/dist/collection/components/checkbox/test/states/checkbox.e2e.js +4 -4
- package/dist/collection/components/datetime/test/custom/datetime.e2e.js +0 -7
- package/dist/collection/components/input/test/bottom-content/input.e2e.js +7 -7
- package/dist/collection/components/input/test/card/input.e2e.js +1 -1
- package/dist/collection/components/input/test/color/input.e2e.js +15 -15
- package/dist/collection/components/input/test/fill/input.e2e.js +10 -10
- package/dist/collection/components/input/test/highlight/input.e2e.js +9 -9
- package/dist/collection/components/input/test/item/input.e2e.js +2 -2
- package/dist/collection/components/input/test/label-placement/input.e2e.js +16 -16
- package/dist/collection/components/input/test/legacy/basic/input.e2e.js +10 -10
- package/dist/collection/components/input/test/states/input.e2e.js +2 -2
- package/dist/collection/components/label/label.ios.css +2 -4
- package/dist/collection/components/label/label.md.css +2 -4
- package/dist/collection/components/radio/test/color/radio.e2e.js +2 -2
- package/dist/collection/components/radio/test/item/radio.e2e.js +3 -3
- package/dist/collection/components/radio/test/label-placement/radio.e2e.js +9 -9
- package/dist/collection/components/radio/test/states/radio.e2e.js +4 -4
- package/dist/collection/components/range/test/color/range.e2e.js +1 -1
- package/dist/collection/components/range/test/custom/range.e2e.js +1 -1
- package/dist/collection/components/range/test/item/range.e2e.js +3 -3
- package/dist/collection/components/range/test/label/range.e2e.js +12 -12
- package/dist/collection/components/range/test/legacy/a11y/range.e2e.js +3 -3
- package/dist/collection/components/range/test/legacy/active-bar-start/range.e2e.js +1 -1
- package/dist/collection/components/range/test/legacy/basic/range.e2e.js +1 -1
- package/dist/collection/components/range/test/states/range.e2e.js +4 -4
- package/dist/collection/components/select/test/card/select.e2e.js +1 -1
- package/dist/collection/components/select/test/color/select.e2e.js +3 -3
- package/dist/collection/components/select/test/fill/select.e2e.js +10 -10
- package/dist/collection/components/select/test/highlight/select.e2e.js +3 -3
- package/dist/collection/components/select/test/item/select.e2e.js +2 -2
- package/dist/collection/components/select/test/label/select.e2e.js +20 -20
- package/dist/collection/components/select/test/states/select.e2e.js +4 -4
- package/dist/collection/components/toggle/test/color/toggle.e2e.js +2 -2
- package/dist/collection/components/toggle/test/item/toggle.e2e.js +4 -4
- package/dist/collection/components/toggle/test/label/toggle.e2e.js +9 -9
- package/dist/collection/components/toggle/test/legacy/enable-on-off-labels/toggle.e2e.js +2 -2
- package/dist/collection/components/toggle/test/legacy/sizes/toggle.e2e.js +1 -1
- package/dist/collection/components/toggle/test/states/toggle.e2e.js +3 -3
- package/dist/docs.json +1 -1
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-b9312889.entry.js → p-341d5877.entry.js} +1 -1
- package/dist/ionic/{p-79e30193.system.entry.js → p-5ba27716.system.entry.js} +1 -1
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/hydrate/index.js +2 -2
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
14
14
|
</ion-list>
|
|
15
15
|
`, config);
|
|
16
16
|
const list = page.locator('ion-list');
|
|
17
|
-
expect(
|
|
17
|
+
await expect(list).toHaveScreenshot(screenshot(`range-list`));
|
|
18
18
|
});
|
|
19
19
|
test('should render correctly in inset list', async ({ page }) => {
|
|
20
20
|
await page.setContent(`
|
|
@@ -25,7 +25,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
25
25
|
</ion-list>
|
|
26
26
|
`, config);
|
|
27
27
|
const list = page.locator('ion-list');
|
|
28
|
-
expect(
|
|
28
|
+
await expect(list).toHaveScreenshot(screenshot(`range-inset-list`));
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -38,7 +38,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
38
38
|
</ion-item>
|
|
39
39
|
`, config);
|
|
40
40
|
const item = page.locator('ion-item');
|
|
41
|
-
expect(
|
|
41
|
+
await expect(item).toHaveScreenshot(screenshot(`range-item-color`));
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
});
|
|
@@ -11,7 +11,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
11
11
|
<ion-range legacy="true"></ion-range>
|
|
12
12
|
`, config);
|
|
13
13
|
const range = page.locator('ion-range');
|
|
14
|
-
expect(
|
|
14
|
+
await expect(range).toHaveScreenshot(screenshot(`range-no-items-no-label`));
|
|
15
15
|
});
|
|
16
16
|
test('should render label in the start placement', async ({ page }) => {
|
|
17
17
|
await page.setContent(`
|
|
@@ -20,7 +20,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
20
20
|
</ion-range>
|
|
21
21
|
`, config);
|
|
22
22
|
const range = page.locator('ion-range');
|
|
23
|
-
expect(
|
|
23
|
+
await expect(range).toHaveScreenshot(screenshot(`range-no-items-start`));
|
|
24
24
|
});
|
|
25
25
|
test('should render label in the end placement', async ({ page }) => {
|
|
26
26
|
await page.setContent(`
|
|
@@ -29,7 +29,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
29
29
|
</ion-range>
|
|
30
30
|
`, config);
|
|
31
31
|
const range = page.locator('ion-range');
|
|
32
|
-
expect(
|
|
32
|
+
await expect(range).toHaveScreenshot(screenshot(`range-no-items-end`));
|
|
33
33
|
});
|
|
34
34
|
test('should render label in the fixed placement', async ({ page }) => {
|
|
35
35
|
await page.setContent(`
|
|
@@ -38,7 +38,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
38
38
|
</ion-range>
|
|
39
39
|
`, config);
|
|
40
40
|
const range = page.locator('ion-range');
|
|
41
|
-
expect(
|
|
41
|
+
await expect(range).toHaveScreenshot(screenshot(`range-no-items-fixed`));
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
test.describe('range: start and end items', () => {
|
|
@@ -50,7 +50,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
50
50
|
</ion-range>
|
|
51
51
|
`, config);
|
|
52
52
|
const range = page.locator('ion-range');
|
|
53
|
-
expect(
|
|
53
|
+
await expect(range).toHaveScreenshot(screenshot(`range-items-no-label`));
|
|
54
54
|
});
|
|
55
55
|
test('should render label in the start placement', async ({ page }) => {
|
|
56
56
|
await page.setContent(`
|
|
@@ -61,7 +61,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
61
61
|
</ion-range>
|
|
62
62
|
`, config);
|
|
63
63
|
const range = page.locator('ion-range');
|
|
64
|
-
expect(
|
|
64
|
+
await expect(range).toHaveScreenshot(screenshot(`range-items-start`));
|
|
65
65
|
});
|
|
66
66
|
test('should render label in the end placement', async ({ page }) => {
|
|
67
67
|
await page.setContent(`
|
|
@@ -72,7 +72,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
72
72
|
</ion-range>
|
|
73
73
|
`, config);
|
|
74
74
|
const range = page.locator('ion-range');
|
|
75
|
-
expect(
|
|
75
|
+
await expect(range).toHaveScreenshot(screenshot(`range-items-end`));
|
|
76
76
|
});
|
|
77
77
|
test('should render label in the fixed placement', async ({ page }) => {
|
|
78
78
|
await page.setContent(`
|
|
@@ -83,24 +83,24 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
83
83
|
</ion-range>
|
|
84
84
|
`, config);
|
|
85
85
|
const range = page.locator('ion-range');
|
|
86
|
-
expect(
|
|
86
|
+
await expect(range).toHaveScreenshot(screenshot(`range-items-fixed`));
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
test.describe('range: label prop', () => {
|
|
90
90
|
test('should render label in the start placement', async ({ page }) => {
|
|
91
91
|
await page.setContent(`<ion-range label-placement="start" label="Volume"></ion-range>`, config);
|
|
92
92
|
const range = page.locator('ion-range');
|
|
93
|
-
expect(
|
|
93
|
+
await expect(range).toHaveScreenshot(screenshot(`range-label-prop-start`));
|
|
94
94
|
});
|
|
95
95
|
test('should render label in the end placement', async ({ page }) => {
|
|
96
96
|
await page.setContent(`<ion-range label-placement="end" label="Volume"></ion-range>`, config);
|
|
97
97
|
const range = page.locator('ion-range');
|
|
98
|
-
expect(
|
|
98
|
+
await expect(range).toHaveScreenshot(screenshot(`range-label-prop-end`));
|
|
99
99
|
});
|
|
100
100
|
test('should render label in the fixed placement', async ({ page }) => {
|
|
101
101
|
await page.setContent(`<ion-range label-placement="fixed" label="Volume"></ion-range>`, config);
|
|
102
102
|
const range = page.locator('ion-range');
|
|
103
|
-
expect(
|
|
103
|
+
await expect(range).toHaveScreenshot(screenshot(`range-label-prop-fixed`));
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
106
|
});
|
|
@@ -114,7 +114,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
114
114
|
</ion-range>
|
|
115
115
|
`, config);
|
|
116
116
|
const range = page.locator('ion-range');
|
|
117
|
-
expect(
|
|
117
|
+
await expect(range).toHaveScreenshot(screenshot(`range-label-truncate`));
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
});
|
|
@@ -19,14 +19,14 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
19
19
|
const rangeHandle = range.locator('.range-knob-handle');
|
|
20
20
|
await rangeHandle.evaluate((el) => el.classList.add('ion-focused'));
|
|
21
21
|
await page.waitForChanges();
|
|
22
|
-
expect(
|
|
22
|
+
await expect(range).toHaveScreenshot(screenshot(`range-focus`));
|
|
23
23
|
const box = (await rangeHandle.boundingBox());
|
|
24
24
|
const centerX = box.x + box.width / 2;
|
|
25
25
|
const centerY = box.y + box.height / 2;
|
|
26
26
|
await page.mouse.move(centerX, centerY);
|
|
27
27
|
await page.mouse.down();
|
|
28
28
|
await page.waitForChanges();
|
|
29
|
-
expect(
|
|
29
|
+
await expect(range).toHaveScreenshot(screenshot(`range-active`));
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -43,7 +43,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
43
43
|
const rangeHandle = range.locator('.range-knob-handle');
|
|
44
44
|
await rangeHandle.evaluate((el) => el.classList.add('ion-focused'));
|
|
45
45
|
await page.waitForChanges();
|
|
46
|
-
expect(
|
|
46
|
+
await expect(range).toHaveScreenshot(screenshot(`range-focus-with-pin`));
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -8,7 +8,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.goto(`/src/components/range/test/legacy/active-bar-start`, config);
|
|
10
10
|
await page.setIonViewport();
|
|
11
|
-
expect(
|
|
11
|
+
await expect(page).toHaveScreenshot(screenshot(`range-activeBarStart-diff`));
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -8,7 +8,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.goto(`/src/components/range/test/legacy/basic`, config);
|
|
10
10
|
await page.setIonViewport();
|
|
11
|
-
expect(
|
|
11
|
+
await expect(page).toHaveScreenshot(screenshot(`range-diff`));
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -14,7 +14,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
14
14
|
</ion-range>
|
|
15
15
|
`, config);
|
|
16
16
|
const range = page.locator('ion-range');
|
|
17
|
-
expect(
|
|
17
|
+
await expect(range).toHaveScreenshot(screenshot(`range-enabled`));
|
|
18
18
|
});
|
|
19
19
|
test('should render disabled state', async ({ page }) => {
|
|
20
20
|
await page.setContent(`
|
|
@@ -25,7 +25,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
25
25
|
</ion-range>
|
|
26
26
|
`, config);
|
|
27
27
|
const range = page.locator('ion-range');
|
|
28
|
-
expect(
|
|
28
|
+
await expect(range).toHaveScreenshot(screenshot(`range-disabled`));
|
|
29
29
|
});
|
|
30
30
|
test('should render disabled state with a value', async ({ page }) => {
|
|
31
31
|
await page.setContent(`
|
|
@@ -36,7 +36,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
36
36
|
</ion-range>
|
|
37
37
|
`, config);
|
|
38
38
|
const range = page.locator('ion-range');
|
|
39
|
-
expect(
|
|
39
|
+
await expect(range).toHaveScreenshot(screenshot(`range-disabled-value`));
|
|
40
40
|
});
|
|
41
41
|
test('should render disabled state with ticks', async ({ page }) => {
|
|
42
42
|
await page.setContent(`
|
|
@@ -47,7 +47,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
47
47
|
</ion-range>
|
|
48
48
|
`, config);
|
|
49
49
|
const range = page.locator('ion-range');
|
|
50
|
-
expect(
|
|
50
|
+
await expect(range).toHaveScreenshot(screenshot(`range-disabled-ticks`));
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
});
|
|
@@ -16,7 +16,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
16
16
|
</ion-card>
|
|
17
17
|
`, config);
|
|
18
18
|
const card = page.locator('ion-card');
|
|
19
|
-
expect(
|
|
19
|
+
await expect(card).toHaveScreenshot(screenshot(`select-card`));
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -13,7 +13,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
13
13
|
</ion-select>
|
|
14
14
|
`, config);
|
|
15
15
|
const select = page.locator('ion-select');
|
|
16
|
-
expect(
|
|
16
|
+
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-color`));
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
test.describe('input: fill solid', () => {
|
|
@@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
24
24
|
</ion-select>
|
|
25
25
|
`, config);
|
|
26
26
|
const select = page.locator('ion-select');
|
|
27
|
-
expect(
|
|
27
|
+
await expect(select).toHaveScreenshot(screenshot(`select-solid-color`));
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
test.describe('input: fill outline', () => {
|
|
@@ -35,7 +35,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
35
35
|
</ion-select>
|
|
36
36
|
`, config);
|
|
37
37
|
const select = page.locator('ion-select');
|
|
38
|
-
expect(
|
|
38
|
+
await expect(select).toHaveScreenshot(screenshot(`select-outline-color`));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -17,7 +17,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
17
17
|
</ion-select>
|
|
18
18
|
`, config);
|
|
19
19
|
const select = page.locator('ion-select');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-solid`));
|
|
21
21
|
});
|
|
22
22
|
test('should render correctly with floating label', async ({ page }) => {
|
|
23
23
|
await page.setContent(`
|
|
@@ -31,7 +31,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
31
31
|
</ion-select>
|
|
32
32
|
`, config);
|
|
33
33
|
const select = page.locator('ion-select');
|
|
34
|
-
expect(
|
|
34
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-solid-label-floating`));
|
|
35
35
|
});
|
|
36
36
|
test('should not have visual regressions with shaped solid', async ({ page }) => {
|
|
37
37
|
await page.setContent(`
|
|
@@ -45,7 +45,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
45
45
|
</ion-select>
|
|
46
46
|
`, config);
|
|
47
47
|
const select = page.locator('ion-select');
|
|
48
|
-
expect(
|
|
48
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-shaped-solid`));
|
|
49
49
|
});
|
|
50
50
|
test('padding and border radius should be customizable', async ({ page }) => {
|
|
51
51
|
await page.setContent(`
|
|
@@ -67,7 +67,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
67
67
|
</ion-select>
|
|
68
68
|
`, config);
|
|
69
69
|
const select = page.locator('ion-select');
|
|
70
|
-
expect(
|
|
70
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-shaped-solid-custom`));
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
test.describe('select: fill outline', () => {
|
|
@@ -82,7 +82,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
82
82
|
</ion-select>
|
|
83
83
|
`, config);
|
|
84
84
|
const select = page.locator('ion-select');
|
|
85
|
-
expect(
|
|
85
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-outline`));
|
|
86
86
|
});
|
|
87
87
|
test('should render correctly with floating label', async ({ page }) => {
|
|
88
88
|
await page.setContent(`
|
|
@@ -96,7 +96,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
96
96
|
</ion-select>
|
|
97
97
|
`, config);
|
|
98
98
|
const select = page.locator('ion-select');
|
|
99
|
-
expect(
|
|
99
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-outline-label-floating`));
|
|
100
100
|
});
|
|
101
101
|
test('should not have visual regressions with shaped outline', async ({ page }) => {
|
|
102
102
|
await page.setContent(`
|
|
@@ -110,7 +110,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
110
110
|
</ion-select>
|
|
111
111
|
`, config);
|
|
112
112
|
const select = page.locator('ion-select');
|
|
113
|
-
expect(
|
|
113
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-shaped-outline`));
|
|
114
114
|
});
|
|
115
115
|
test('padding and border radius should be customizable', async ({ page }) => {
|
|
116
116
|
await page.setContent(`
|
|
@@ -132,7 +132,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
132
132
|
</ion-select>
|
|
133
133
|
`, config);
|
|
134
134
|
const select = page.locator('ion-select');
|
|
135
|
-
expect(
|
|
135
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-shaped-outline-custom`));
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
});
|
|
@@ -156,7 +156,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
156
156
|
</ion-select>
|
|
157
157
|
`, config);
|
|
158
158
|
const select = page.locator('ion-select');
|
|
159
|
-
expect(
|
|
159
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-outline-slotted-label`));
|
|
160
160
|
});
|
|
161
161
|
test('should render the notch correctly with a slotted label after the select was originally hidden', async ({ page, }) => {
|
|
162
162
|
await page.setContent(`
|
|
@@ -177,7 +177,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
177
177
|
`, config);
|
|
178
178
|
const select = page.locator('ion-select');
|
|
179
179
|
await select.evaluate((el) => el.style.removeProperty('display'));
|
|
180
|
-
expect(
|
|
180
|
+
await expect(select).toHaveScreenshot(screenshot(`select-fill-outline-hidden-slotted-label`));
|
|
181
181
|
});
|
|
182
182
|
});
|
|
183
183
|
test.describe(title('select: notch cutout'), () => {
|
|
@@ -100,7 +100,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
100
100
|
<ion-select label="Label" class="select-expanded"></ion-select>
|
|
101
101
|
`, config);
|
|
102
102
|
const select = page.locator('ion-select');
|
|
103
|
-
expect(
|
|
103
|
+
await expect(select).toHaveScreenshot(screenshot(`select-no-fill-highlight`));
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
106
|
test.describe('select: solid', () => {
|
|
@@ -109,7 +109,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
109
109
|
<ion-select fill="solid" label="Label" class="select-expanded"></ion-select>
|
|
110
110
|
`, config);
|
|
111
111
|
const select = page.locator('ion-select');
|
|
112
|
-
expect(
|
|
112
|
+
await expect(select).toHaveScreenshot(screenshot(`select-solid-highlight`));
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
test.describe('select: outline', () => {
|
|
@@ -118,7 +118,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
118
118
|
<ion-select fill="outline" label="Label" class="select-expanded"></ion-select>
|
|
119
119
|
`, config);
|
|
120
120
|
const select = page.locator('ion-select');
|
|
121
|
-
expect(
|
|
121
|
+
await expect(select).toHaveScreenshot(screenshot(`select-outline-highlight`));
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
124
|
});
|
|
@@ -19,7 +19,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
19
19
|
</ion-list>
|
|
20
20
|
`, config);
|
|
21
21
|
const list = page.locator('ion-list');
|
|
22
|
-
expect(
|
|
22
|
+
await expect(list).toHaveScreenshot(screenshot(`select-list-no-fill`));
|
|
23
23
|
});
|
|
24
24
|
test('should render correctly in inset list with no fill', async ({ page }) => {
|
|
25
25
|
await page.setContent(`
|
|
@@ -35,7 +35,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
35
35
|
</ion-list>
|
|
36
36
|
`, config);
|
|
37
37
|
const list = page.locator('ion-list');
|
|
38
|
-
expect(
|
|
38
|
+
await expect(list).toHaveScreenshot(screenshot(`select-inset-list-no-fill`));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -20,7 +20,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
20
20
|
<ion-select label="Label" placeholder="Select an Item" label-placement="start" justify="start" style="width: 200px"></ion-select>
|
|
21
21
|
`, config);
|
|
22
22
|
const select = page.locator('ion-select');
|
|
23
|
-
expect(
|
|
23
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-start-justify-start`));
|
|
24
24
|
});
|
|
25
25
|
test('should render an end justification with label in the start position', async ({ page }) => {
|
|
26
26
|
await page.setContent(`
|
|
@@ -28,7 +28,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
28
28
|
<ion-select label="Label" placeholder="Select an Item" label-placement="start" justify="end" style="width: 200px"></ion-select>
|
|
29
29
|
`, config);
|
|
30
30
|
const select = page.locator('ion-select');
|
|
31
|
-
expect(
|
|
31
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-start-justify-end`));
|
|
32
32
|
});
|
|
33
33
|
test('should render a space between justification with label in the start position', async ({ page }) => {
|
|
34
34
|
await page.setContent(`
|
|
@@ -36,7 +36,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
36
36
|
<ion-select label="Label" placeholder="Select an Item" label-placement="start" justify="space-between" style="width: 200px"></ion-select>
|
|
37
37
|
`, config);
|
|
38
38
|
const select = page.locator('ion-select');
|
|
39
|
-
expect(
|
|
39
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-start-justify-space-between`));
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
test.describe('select: end placement', () => {
|
|
@@ -46,7 +46,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
46
46
|
<ion-select label="Label" placeholder="Select an Item" label-placement="end" justify="start" style="width: 200px"></ion-select>
|
|
47
47
|
`, config);
|
|
48
48
|
const select = page.locator('ion-select');
|
|
49
|
-
expect(
|
|
49
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-end-justify-start`));
|
|
50
50
|
});
|
|
51
51
|
test('should render an end justification with label in the end position', async ({ page }) => {
|
|
52
52
|
await page.setContent(`
|
|
@@ -54,7 +54,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
54
54
|
<ion-select label="Label" placeholder="Select an Item" label-placement="end" justify="end" style="width: 200px"></ion-select>
|
|
55
55
|
`, config);
|
|
56
56
|
const select = page.locator('ion-select');
|
|
57
|
-
expect(
|
|
57
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-end-justify-end`));
|
|
58
58
|
});
|
|
59
59
|
test('should render a space between justification with label in the end position', async ({ page }) => {
|
|
60
60
|
await page.setContent(`
|
|
@@ -62,7 +62,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
62
62
|
<ion-select label="Label" placeholder="Select an Item" label-placement="end" justify="space-between" style="width: 200px"></ion-select>
|
|
63
63
|
`, config);
|
|
64
64
|
const select = page.locator('ion-select');
|
|
65
|
-
expect(
|
|
65
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-end-justify-space-between`));
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
test.describe('select: fixed placement', () => {
|
|
@@ -72,7 +72,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
72
72
|
<ion-select label="Label" placeholder="Select an Item" label-placement="fixed" justify="start" style="width: 200px"></ion-select>
|
|
73
73
|
`, config);
|
|
74
74
|
const select = page.locator('ion-select');
|
|
75
|
-
expect(
|
|
75
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-fixed-justify-start`));
|
|
76
76
|
});
|
|
77
77
|
test('should render an end justification with label in the fixed position', async ({ page }) => {
|
|
78
78
|
await page.setContent(`
|
|
@@ -80,7 +80,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
80
80
|
<ion-select label="Label" placeholder="Select an Item" label-placement="fixed" justify="end" style="width: 200px"></ion-select>
|
|
81
81
|
`, config);
|
|
82
82
|
const select = page.locator('ion-select');
|
|
83
|
-
expect(
|
|
83
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-fixed-justify-end`));
|
|
84
84
|
});
|
|
85
85
|
test('should render a space between justification with label in the fixed position', async ({ page }) => {
|
|
86
86
|
await page.setContent(`
|
|
@@ -88,7 +88,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
88
88
|
<ion-select label="Label" placeholder="Select an Item" label-placement="fixed" justify="space-between" style="width: 200px"></ion-select>
|
|
89
89
|
`, config);
|
|
90
90
|
const select = page.locator('ion-select');
|
|
91
|
-
expect(
|
|
91
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-fixed-justify-space-between`));
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
test.describe('select: floating placement', () => {
|
|
@@ -99,7 +99,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
99
99
|
</ion-select>
|
|
100
100
|
`, config);
|
|
101
101
|
const select = page.locator('ion-select');
|
|
102
|
-
expect(
|
|
102
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-floating-value`));
|
|
103
103
|
});
|
|
104
104
|
test('label should appear on top of the select when there is no value', async ({ page }) => {
|
|
105
105
|
await page.setContent(`
|
|
@@ -108,7 +108,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
108
108
|
</ion-select>
|
|
109
109
|
`, config);
|
|
110
110
|
const select = page.locator('ion-select');
|
|
111
|
-
expect(
|
|
111
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-floating-no-value`));
|
|
112
112
|
});
|
|
113
113
|
test('label should appear on top of the select when there is a placeholder and no value', async ({ page }) => {
|
|
114
114
|
await page.setContent(`
|
|
@@ -117,7 +117,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
117
117
|
</ion-select>
|
|
118
118
|
`, config);
|
|
119
119
|
const select = page.locator('ion-select');
|
|
120
|
-
expect(
|
|
120
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-floating-no-value-placeholder`));
|
|
121
121
|
});
|
|
122
122
|
test('label should appear on top of the select when the select is expanded', async ({ page }) => {
|
|
123
123
|
await page.setContent(`
|
|
@@ -126,7 +126,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
126
126
|
</ion-select>
|
|
127
127
|
`, config);
|
|
128
128
|
const select = page.locator('ion-select');
|
|
129
|
-
expect(
|
|
129
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-floating-expanded`));
|
|
130
130
|
});
|
|
131
131
|
test('long text should truncate', async ({ page }) => {
|
|
132
132
|
await page.setContent(`
|
|
@@ -135,7 +135,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
135
135
|
</ion-select>
|
|
136
136
|
`, config);
|
|
137
137
|
const select = page.locator('ion-select');
|
|
138
|
-
expect(
|
|
138
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-floating-long-text`));
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
141
|
test.describe('select: stacked placement', () => {
|
|
@@ -146,7 +146,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
146
146
|
</ion-select>
|
|
147
147
|
`, config);
|
|
148
148
|
const select = page.locator('ion-select');
|
|
149
|
-
expect(
|
|
149
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-stacked-value`));
|
|
150
150
|
});
|
|
151
151
|
test('label should appear above the select when there is no value', async ({ page }) => {
|
|
152
152
|
await page.setContent(`
|
|
@@ -155,7 +155,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
155
155
|
</ion-select>
|
|
156
156
|
`, config);
|
|
157
157
|
const select = page.locator('ion-select');
|
|
158
|
-
expect(
|
|
158
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-stacked-no-value`));
|
|
159
159
|
});
|
|
160
160
|
test('label should appear on top of the select when the select is expanded', async ({ page }) => {
|
|
161
161
|
await page.setContent(`
|
|
@@ -164,7 +164,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
164
164
|
</ion-select>
|
|
165
165
|
`, config);
|
|
166
166
|
const select = page.locator('ion-select');
|
|
167
|
-
expect(
|
|
167
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-stacked-expanded`));
|
|
168
168
|
});
|
|
169
169
|
test('long text should truncate', async ({ page }) => {
|
|
170
170
|
await page.setContent(`
|
|
@@ -173,7 +173,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
173
173
|
</ion-select>
|
|
174
174
|
`, config);
|
|
175
175
|
const select = page.locator('ion-select');
|
|
176
|
-
expect(
|
|
176
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-stacked-long-text`));
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
179
|
});
|
|
@@ -185,7 +185,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
185
185
|
<ion-select label="Label Label Label Label Label" placeholder="Select an Item"></ion-select>
|
|
186
186
|
`, config);
|
|
187
187
|
const select = page.locator('ion-select');
|
|
188
|
-
expect(
|
|
188
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-truncate`));
|
|
189
189
|
});
|
|
190
190
|
test('label slot should be truncated with ellipses', async ({ page }) => {
|
|
191
191
|
await page.setContent(`
|
|
@@ -194,7 +194,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
194
194
|
</ion-select>
|
|
195
195
|
`, config);
|
|
196
196
|
const select = page.locator('ion-select');
|
|
197
|
-
expect(
|
|
197
|
+
await expect(select).toHaveScreenshot(screenshot(`select-label-slot-truncate`));
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
200
|
});
|
|
@@ -10,7 +10,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-select label="Favorite Fruit" placeholder="Select a fruit"></ion-select>
|
|
11
11
|
`, config);
|
|
12
12
|
const select = page.locator('ion-select');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(select).toHaveScreenshot(screenshot(`select-placeholder`));
|
|
14
14
|
});
|
|
15
15
|
test('should render enabled select with a value correctly', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
@@ -19,14 +19,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
19
19
|
</ion-select>
|
|
20
20
|
`, config);
|
|
21
21
|
const select = page.locator('ion-select');
|
|
22
|
-
expect(
|
|
22
|
+
await expect(select).toHaveScreenshot(screenshot(`select-value`));
|
|
23
23
|
});
|
|
24
24
|
test('should render disabled select with a placeholder correctly', async ({ page }) => {
|
|
25
25
|
await page.setContent(`
|
|
26
26
|
<ion-select label="Favorite Fruit" placeholder="Select a fruit" disabled="true"></ion-select>
|
|
27
27
|
`, config);
|
|
28
28
|
const select = page.locator('ion-select');
|
|
29
|
-
expect(
|
|
29
|
+
await expect(select).toHaveScreenshot(screenshot(`select-disabled-placeholder`));
|
|
30
30
|
});
|
|
31
31
|
test('should render disabled select with a value correctly', async ({ page }) => {
|
|
32
32
|
await page.setContent(`
|
|
@@ -35,7 +35,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
35
35
|
</ion-select>
|
|
36
36
|
`, config);
|
|
37
37
|
const select = page.locator('ion-select');
|
|
38
|
-
expect(
|
|
38
|
+
await expect(select).toHaveScreenshot(screenshot(`select-disabled-value`));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -10,14 +10,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-toggle color="danger" checked="true">Label</ion-toggle>
|
|
11
11
|
`, config);
|
|
12
12
|
const toggle = page.locator('ion-toggle');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-color-checked`));
|
|
14
14
|
});
|
|
15
15
|
test('should not apply color when unchecked', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
17
17
|
<ion-toggle color="danger">Label</ion-toggle>
|
|
18
18
|
`, config);
|
|
19
19
|
const toggle = page.locator('ion-toggle');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-color-unchecked`));
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
});
|