@ionic/core 7.3.2 → 7.3.3-dev.11693533652.1969cc78
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/action-sheet.js +8 -16
- package/components/alert.js +8 -16
- package/components/framework-delegate.js +21 -2
- package/components/ion-loading.js +8 -16
- package/components/ion-modal.js +21 -29
- package/components/ion-picker.js +8 -16
- package/components/ion-router-outlet.js +1 -0
- package/components/ion-toast.js +8 -16
- package/components/label.js +2 -2
- package/components/lock-controller.js +38 -0
- package/components/popover.js +15 -29
- package/dist/cjs/{framework-delegate-e8174951.js → framework-delegate-c0873a6f.js} +21 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +10 -18
- package/dist/cjs/ion-alert.cjs.entry.js +10 -18
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +10 -18
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +10 -18
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +23 -31
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +17 -31
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +10 -18
- package/dist/cjs/lock-controller-4ae2eb59.js +40 -0
- package/dist/cjs/{overlays-0ea06fcb.js → overlays-5c1706ed.js} +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +8 -16
- package/dist/collection/components/alert/alert.js +8 -16
- 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/datetime/test/presentation/datetime.e2e.js +48 -17
- 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/loading/loading.js +8 -16
- package/dist/collection/components/modal/modal.js +21 -29
- package/dist/collection/components/picker/picker.js +8 -16
- package/dist/collection/components/popover/popover.js +15 -29
- package/dist/collection/components/popover/test/async/popover.e2e.js +42 -0
- 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/router-outlet/router-outlet.js +1 -0
- 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/textarea/test/bottom-content/textarea.e2e.js +6 -6
- package/dist/collection/components/textarea/test/card/textarea.e2e.js +1 -1
- package/dist/collection/components/textarea/test/color/textarea.e2e.js +15 -15
- package/dist/collection/components/textarea/test/fill/textarea.e2e.js +10 -10
- package/dist/collection/components/textarea/test/highlight/textarea.e2e.js +9 -9
- package/dist/collection/components/textarea/test/item/textarea.e2e.js +2 -2
- package/dist/collection/components/textarea/test/label-placement/textarea.e2e.js +21 -21
- package/dist/collection/components/textarea/test/legacy/autogrow/textarea.e2e.js +5 -5
- package/dist/collection/components/textarea/test/states/textarea.e2e.js +2 -2
- package/dist/collection/components/toast/toast.js +8 -16
- 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/collection/utils/framework-delegate.js +21 -2
- package/dist/collection/utils/lock-controller.js +36 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{framework-delegate-2b76c681.js → framework-delegate-aa433dea.js} +21 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +10 -18
- package/dist/esm/ion-alert.entry.js +10 -18
- package/dist/esm/ion-app_8.entry.js +2 -1
- package/dist/esm/ion-datetime_3.entry.js +10 -18
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +10 -18
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +23 -31
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +17 -31
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +10 -18
- package/dist/esm/lock-controller-e8c6c051.js +38 -0
- package/dist/esm/{overlays-c3387ec0.js → overlays-e1dadfe6.js} +1 -1
- package/dist/esm-es5/framework-delegate-aa433dea.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/lock-controller-e8c6c051.js +4 -0
- package/dist/esm-es5/{overlays-c3387ec0.js → overlays-e1dadfe6.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-958bde76.entry.js → p-091cd81e.entry.js} +1 -1
- package/dist/ionic/{p-d1356034.system.entry.js → p-0b68c41d.system.entry.js} +1 -1
- package/dist/ionic/p-0cc2bf5a.system.entry.js +4 -0
- package/dist/ionic/p-208f640c.entry.js +4 -0
- package/dist/ionic/p-2539e967.system.entry.js +4 -0
- package/dist/ionic/{p-74bd26b8.system.entry.js → p-28f5715a.system.entry.js} +1 -1
- package/dist/ionic/{p-b9312889.entry.js → p-341d5877.entry.js} +1 -1
- package/dist/ionic/p-38dd9aec.entry.js +4 -0
- package/dist/ionic/p-3ff018da.entry.js +4 -0
- package/dist/ionic/{p-8074bdd7.system.entry.js → p-45ee211b.system.entry.js} +1 -1
- package/dist/ionic/p-5009cb46.entry.js +4 -0
- package/dist/ionic/p-53b2a46f.js +4 -0
- package/dist/ionic/{p-5ef91692.js → p-582dc7c1.js} +1 -1
- package/dist/ionic/{p-79e30193.system.entry.js → p-5ba27716.system.entry.js} +1 -1
- package/dist/ionic/{p-c0d1e5a1.entry.js → p-5c17f888.entry.js} +1 -1
- package/dist/ionic/{p-8d9475b5.system.js → p-613d4042.system.js} +1 -1
- package/dist/ionic/p-647d15d4.system.entry.js +4 -0
- package/dist/ionic/p-653f2fc6.entry.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/p-772f6c84.system.js +4 -0
- package/dist/ionic/p-87383d00.system.entry.js +4 -0
- package/dist/ionic/{p-db46fc66.system.js → p-8843b046.system.js} +1 -1
- package/dist/ionic/p-93e47822.entry.js +4 -0
- package/dist/ionic/{p-229df0d8.entry.js → p-98ebc376.entry.js} +1 -1
- package/dist/ionic/p-af0bc751.system.entry.js +4 -0
- package/dist/ionic/p-b0e9e0b8.system.entry.js +4 -0
- package/dist/ionic/p-b287ab05.js +4 -0
- package/dist/ionic/{p-81b46714.system.js → p-b32742f3.system.js} +1 -1
- package/dist/ionic/p-b3394798.system.entry.js +4 -0
- package/dist/ionic/{p-20087c90.entry.js → p-c759a704.entry.js} +1 -1
- package/dist/ionic/{p-6b9bf14c.system.entry.js → p-d1d3b740.system.entry.js} +1 -1
- package/dist/ionic/{p-8fa43732.system.entry.js → p-d693e765.system.entry.js} +1 -1
- package/dist/ionic/{p-5c96dc4e.entry.js → p-f7faa32d.entry.js} +1 -1
- package/dist/ionic/p-fabb7294.entry.js +4 -0
- package/dist/types/components/action-sheet/action-sheet.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/loading/loading.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +1 -1
- package/dist/types/components/picker/picker.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/toast/toast.d.ts +1 -1
- package/dist/types/utils/lock-controller.d.ts +10 -0
- package/hydrate/index.js +127 -142
- package/package.json +1 -1
- package/dist/esm-es5/framework-delegate-2b76c681.js +0 -4
- package/dist/ionic/p-06f1f560.system.entry.js +0 -4
- package/dist/ionic/p-2936ec7f.system.entry.js +0 -4
- package/dist/ionic/p-29b3e70a.entry.js +0 -4
- package/dist/ionic/p-2bc49e5d.system.entry.js +0 -4
- package/dist/ionic/p-2da3e015.system.entry.js +0 -4
- package/dist/ionic/p-423d5a4d.entry.js +0 -4
- package/dist/ionic/p-564aaba3.entry.js +0 -4
- package/dist/ionic/p-61769039.entry.js +0 -4
- package/dist/ionic/p-74723f41.entry.js +0 -4
- package/dist/ionic/p-9b3c3564.entry.js +0 -4
- package/dist/ionic/p-b34c1ae1.js +0 -4
- package/dist/ionic/p-ccea9adc.system.entry.js +0 -4
- package/dist/ionic/p-d5db0834.system.entry.js +0 -4
- package/dist/ionic/p-d8538837.entry.js +0 -4
- package/dist/ionic/p-dd0b6889.system.entry.js +0 -4
|
@@ -19,21 +19,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
19
19
|
<ion-checkbox label-placement="start" justify="start" style="width: 200px">Label</ion-checkbox>
|
|
20
20
|
`, config);
|
|
21
21
|
const checkbox = page.locator('ion-checkbox');
|
|
22
|
-
expect(
|
|
22
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-start`));
|
|
23
23
|
});
|
|
24
24
|
test('should render an end justification with label in the start position', async ({ page }) => {
|
|
25
25
|
await page.setContent(`
|
|
26
26
|
<ion-checkbox label-placement="start" justify="end" style="width: 200px">Label</ion-checkbox>
|
|
27
27
|
`, config);
|
|
28
28
|
const checkbox = page.locator('ion-checkbox');
|
|
29
|
-
expect(
|
|
29
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-end`));
|
|
30
30
|
});
|
|
31
31
|
test('should render a space between justification with label in the start position', async ({ page }) => {
|
|
32
32
|
await page.setContent(`
|
|
33
33
|
<ion-checkbox label-placement="start" justify="space-between" style="width: 200px">Label</ion-checkbox>
|
|
34
34
|
`, config);
|
|
35
35
|
const checkbox = page.locator('ion-checkbox');
|
|
36
|
-
expect(
|
|
36
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-start-justify-space-between`));
|
|
37
37
|
});
|
|
38
38
|
test('should truncate long labels with ellipses', async ({ page }) => {
|
|
39
39
|
await page.setContent(`
|
|
@@ -42,7 +42,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
42
42
|
</ion-checkbox>
|
|
43
43
|
`, config);
|
|
44
44
|
const checkbox = page.locator('ion-checkbox');
|
|
45
|
-
expect(
|
|
45
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-long-label`));
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
test.describe('checkbox: end placement', () => {
|
|
@@ -51,21 +51,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
51
51
|
<ion-checkbox label-placement="end" justify="start" style="width: 200px">Label</ion-checkbox>
|
|
52
52
|
`, config);
|
|
53
53
|
const checkbox = page.locator('ion-checkbox');
|
|
54
|
-
expect(
|
|
54
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-start`));
|
|
55
55
|
});
|
|
56
56
|
test('should render an end justification with label in the end position', async ({ page }) => {
|
|
57
57
|
await page.setContent(`
|
|
58
58
|
<ion-checkbox label-placement="end" justify="end" style="width: 200px">Label</ion-checkbox>
|
|
59
59
|
`, config);
|
|
60
60
|
const checkbox = page.locator('ion-checkbox');
|
|
61
|
-
expect(
|
|
61
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-end`));
|
|
62
62
|
});
|
|
63
63
|
test('should render a space between justification with label in the end position', async ({ page }) => {
|
|
64
64
|
await page.setContent(`
|
|
65
65
|
<ion-checkbox label-placement="end" justify="space-between" style="width: 200px">Label</ion-checkbox>
|
|
66
66
|
`, config);
|
|
67
67
|
const checkbox = page.locator('ion-checkbox');
|
|
68
|
-
expect(
|
|
68
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-end-justify-space-between`));
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
test.describe('checkbox: fixed placement', () => {
|
|
@@ -74,21 +74,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
74
74
|
<ion-checkbox label-placement="fixed" justify="start" style="width: 200px">This is a long label</ion-checkbox>
|
|
75
75
|
`, config);
|
|
76
76
|
const checkbox = page.locator('ion-checkbox');
|
|
77
|
-
expect(
|
|
77
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-start`));
|
|
78
78
|
});
|
|
79
79
|
test('should render an end justification with label in the fixed position', async ({ page }) => {
|
|
80
80
|
await page.setContent(`
|
|
81
81
|
<ion-checkbox label-placement="fixed" justify="end" style="width: 200px">This is a long label</ion-checkbox>
|
|
82
82
|
`, config);
|
|
83
83
|
const checkbox = page.locator('ion-checkbox');
|
|
84
|
-
expect(
|
|
84
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-end`));
|
|
85
85
|
});
|
|
86
86
|
test('should render a space between justification with label in the fixed position', async ({ page }) => {
|
|
87
87
|
await page.setContent(`
|
|
88
88
|
<ion-checkbox label-placement="fixed" justify="space-between" style="width: 200px">This is a long label</ion-checkbox>
|
|
89
89
|
`, config);
|
|
90
90
|
const checkbox = page.locator('ion-checkbox');
|
|
91
|
-
expect(
|
|
91
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-label-fixed-justify-space-between`));
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
});
|
|
@@ -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/checkbox/test/legacy/basic`, config);
|
|
10
10
|
await page.setIonViewport();
|
|
11
|
-
expect(
|
|
11
|
+
await expect(page).toHaveScreenshot(screenshot(`checkbox-legacy-basic`));
|
|
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/checkbox/test/legacy/indeterminate`, config);
|
|
10
10
|
const content = page.locator('#checkboxes');
|
|
11
|
-
expect(
|
|
11
|
+
await expect(content).toHaveScreenshot(screenshot(`checkbox-legacy-indeterminate`));
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -10,28 +10,28 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-checkbox disabled>Label</ion-checkbox>
|
|
11
11
|
`, config);
|
|
12
12
|
const checkbox = page.locator('ion-checkbox');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-disabled`));
|
|
14
14
|
});
|
|
15
15
|
test('should render disabled checked checkbox correctly', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
17
17
|
<ion-checkbox checked disabled>Label</ion-checkbox>
|
|
18
18
|
`, config);
|
|
19
19
|
const checkbox = page.locator('ion-checkbox');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-checked-disabled`));
|
|
21
21
|
});
|
|
22
22
|
test('should render checked checkbox correctly', async ({ page }) => {
|
|
23
23
|
await page.setContent(`
|
|
24
24
|
<ion-checkbox checked>Label</ion-checkbox>
|
|
25
25
|
`, config);
|
|
26
26
|
const checkbox = page.locator('ion-checkbox');
|
|
27
|
-
expect(
|
|
27
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-checked`));
|
|
28
28
|
});
|
|
29
29
|
test('should render unchecked checkbox correctly', async ({ page }) => {
|
|
30
30
|
await page.setContent(`
|
|
31
31
|
<ion-checkbox>Label</ion-checkbox>
|
|
32
32
|
`, config);
|
|
33
33
|
const checkbox = page.locator('ion-checkbox');
|
|
34
|
-
expect(
|
|
34
|
+
await expect(checkbox).toHaveScreenshot(screenshot(`checkbox-unchecked`));
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -12,13 +12,6 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
12
12
|
const datetime = page.locator('#custom-wheel');
|
|
13
13
|
await expect(datetime).toHaveScreenshot(screenshot(`datetime-custom-wheel`));
|
|
14
14
|
});
|
|
15
|
-
test('should allow styling month/year picker in grid style datetimes', async ({ page }) => {
|
|
16
|
-
const datetime = page.locator('#custom-grid');
|
|
17
|
-
const monthYearToggle = datetime.locator('.calendar-month-year');
|
|
18
|
-
await monthYearToggle.click();
|
|
19
|
-
await page.waitForChanges();
|
|
20
|
-
await expect(datetime).toHaveScreenshot(screenshot(`datetime-custom-month-year`));
|
|
21
|
-
});
|
|
22
15
|
test('should allow styling time picker in grid style datetimes', async ({ page }) => {
|
|
23
16
|
const timeButton = page.locator('ion-datetime .time-body');
|
|
24
17
|
const popover = page.locator('.popover-viewport');
|
|
@@ -4,23 +4,39 @@
|
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
6
|
configs().forEach(({ title, screenshot, config }) => {
|
|
7
|
-
test(title('
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
await
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
await
|
|
23
|
-
}
|
|
7
|
+
test.describe(title('datetime: presentation rendering'), () => {
|
|
8
|
+
let presentationFixture;
|
|
9
|
+
test.beforeEach(({ page }) => {
|
|
10
|
+
presentationFixture = new DatetimePresentationFixture(page);
|
|
11
|
+
});
|
|
12
|
+
test('should not have visual regressions with date-time presentation', async () => {
|
|
13
|
+
await presentationFixture.goto('date-time', config);
|
|
14
|
+
await presentationFixture.screenshot('datetime-presentation-date-time-diff', screenshot);
|
|
15
|
+
});
|
|
16
|
+
test('should not have visual regressions with time-date presentation', async () => {
|
|
17
|
+
await presentationFixture.goto('time-date', config);
|
|
18
|
+
await presentationFixture.screenshot('datetime-presentation-time-date-diff', screenshot);
|
|
19
|
+
});
|
|
20
|
+
test('should not have visual regressions with time presentation', async () => {
|
|
21
|
+
await presentationFixture.goto('time', config);
|
|
22
|
+
await presentationFixture.screenshot('datetime-presentation-time-diff', screenshot);
|
|
23
|
+
});
|
|
24
|
+
test('should not have visual regressions with date presentation', async () => {
|
|
25
|
+
await presentationFixture.goto('date', config);
|
|
26
|
+
await presentationFixture.screenshot('datetime-presentation-date-diff', screenshot);
|
|
27
|
+
});
|
|
28
|
+
test('should not have visual regressions with month-year presentation', async () => {
|
|
29
|
+
await presentationFixture.goto('month-year', config);
|
|
30
|
+
await presentationFixture.screenshot('datetime-presentation-month-year-diff', screenshot);
|
|
31
|
+
});
|
|
32
|
+
test('should not have visual regressions with month presentation', async () => {
|
|
33
|
+
await presentationFixture.goto('month', config);
|
|
34
|
+
await presentationFixture.screenshot('datetime-presentation-month-diff', screenshot);
|
|
35
|
+
});
|
|
36
|
+
test('should not have visual regressions with year presentation', async () => {
|
|
37
|
+
await presentationFixture.goto('year', config);
|
|
38
|
+
await presentationFixture.screenshot('datetime-presentation-year-diff', screenshot);
|
|
39
|
+
});
|
|
24
40
|
});
|
|
25
41
|
});
|
|
26
42
|
/**
|
|
@@ -112,6 +128,21 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
112
128
|
});
|
|
113
129
|
});
|
|
114
130
|
});
|
|
131
|
+
class DatetimePresentationFixture {
|
|
132
|
+
constructor(page) {
|
|
133
|
+
this.page = page;
|
|
134
|
+
}
|
|
135
|
+
async goto(presentation, config) {
|
|
136
|
+
await this.page.setContent(`
|
|
137
|
+
<ion-datetime presentation="${presentation}" value="2010-03-10T13:00:00"></ion-datetime>
|
|
138
|
+
`, config);
|
|
139
|
+
await this.page.waitForSelector('.datetime-ready');
|
|
140
|
+
this.datetime = this.page.locator('ion-datetime');
|
|
141
|
+
}
|
|
142
|
+
async screenshot(name, screenshotFn) {
|
|
143
|
+
await expect(this.datetime).toHaveScreenshot(screenshotFn(name));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
115
146
|
class TimePickerFixture {
|
|
116
147
|
constructor(page) {
|
|
117
148
|
this.page = page;
|
|
@@ -10,21 +10,21 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-input value="hi@ionic.io" label="Email" helper-text="Enter an email" maxlength="20" counter="true"></ion-input>
|
|
11
11
|
`, config);
|
|
12
12
|
const input = page.locator('ion-input');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(input).toHaveScreenshot(screenshot(`input-full-bottom-no-fill`));
|
|
14
14
|
});
|
|
15
15
|
test('entire input component should render correctly with solid fill', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
17
17
|
<ion-input fill="solid" value="hi@ionic.io" label="Email" helper-text="Enter an email" maxlength="20" counter="true"></ion-input>
|
|
18
18
|
`, config);
|
|
19
19
|
const input = page.locator('ion-input');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(input).toHaveScreenshot(screenshot(`input-full-bottom-solid`));
|
|
21
21
|
});
|
|
22
22
|
test('entire input component should render correctly with outline fill', async ({ page }) => {
|
|
23
23
|
await page.setContent(`
|
|
24
24
|
<ion-input fill="outline" value="hi@ionic.io" label="Email" helper-text="Enter an email" maxlength="20" counter="true"></ion-input>
|
|
25
25
|
`, config);
|
|
26
26
|
const input = page.locator('ion-input');
|
|
27
|
-
expect(
|
|
27
|
+
await expect(input).toHaveScreenshot(screenshot(`input-full-bottom-outline`));
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
});
|
|
@@ -72,7 +72,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
72
72
|
<ion-input class="ion-invalid ion-touched custom-input" label="my label" error-text="my error"></ion-input>
|
|
73
73
|
`, config);
|
|
74
74
|
const errorText = page.locator('ion-input .error-text');
|
|
75
|
-
expect(
|
|
75
|
+
await expect(errorText).toHaveScreenshot(screenshot(`input-error-custom-color`));
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
test.describe('input: hint text rendering', () => {
|
|
@@ -80,12 +80,12 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
80
80
|
test('should not have visual regressions when rendering helper text', async ({ page }) => {
|
|
81
81
|
await page.setContent(`<ion-input helper-text="my helper" label="my input"></ion-input>`, config);
|
|
82
82
|
const bottomEl = page.locator('ion-input .input-bottom');
|
|
83
|
-
expect(
|
|
83
|
+
await expect(bottomEl).toHaveScreenshot(screenshot(`input-bottom-content-helper`));
|
|
84
84
|
});
|
|
85
85
|
test('should not have visual regressions when rendering error text', async ({ page }) => {
|
|
86
86
|
await page.setContent(`<ion-input class="ion-invalid ion-touched" error-text="my helper" label="my input"></ion-input>`, config);
|
|
87
87
|
const bottomEl = page.locator('ion-input .input-bottom');
|
|
88
|
-
expect(
|
|
88
|
+
await expect(bottomEl).toHaveScreenshot(screenshot(`input-bottom-content-error`));
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
});
|
|
@@ -137,7 +137,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
137
137
|
test('should not have visual regressions when rendering counter', async ({ page }) => {
|
|
138
138
|
await page.setContent(`<ion-input counter="true" maxlength="20" label="my input"></ion-input>`, config);
|
|
139
139
|
const bottomEl = page.locator('ion-input .input-bottom');
|
|
140
|
-
expect(
|
|
140
|
+
await expect(bottomEl).toHaveScreenshot(screenshot(`input-bottom-content-counter`));
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
});
|
|
@@ -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(`input-card`));
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -21,35 +21,35 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
21
21
|
<ion-input class="has-focus" color="danger" label="Email" label-placement="start" value="hi@ionic.io"></ion-input>
|
|
22
22
|
`, config);
|
|
23
23
|
const input = page.locator('ion-input');
|
|
24
|
-
expect(
|
|
24
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-color-start`));
|
|
25
25
|
});
|
|
26
26
|
test('should set label and highlight color on focus with end label placement', async ({ page }) => {
|
|
27
27
|
await page.setContent(`
|
|
28
28
|
<ion-input class="has-focus" color="danger" label="Email" label-placement="end" value="hi@ionic.io"></ion-input>
|
|
29
29
|
`, config);
|
|
30
30
|
const input = page.locator('ion-input');
|
|
31
|
-
expect(
|
|
31
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-color-end`));
|
|
32
32
|
});
|
|
33
33
|
test('should set label and highlight color on focus with fixed label placement', async ({ page }) => {
|
|
34
34
|
await page.setContent(`
|
|
35
35
|
<ion-input class="has-focus" color="danger" label="Email" label-placement="fixed" value="hi@ionic.io"></ion-input>
|
|
36
36
|
`, config);
|
|
37
37
|
const input = page.locator('ion-input');
|
|
38
|
-
expect(
|
|
38
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-color-fixed`));
|
|
39
39
|
});
|
|
40
40
|
test('should set label and highlight color on focus with floating label placement', async ({ page }) => {
|
|
41
41
|
await page.setContent(`
|
|
42
42
|
<ion-input class="has-focus" color="danger" label="Email" label-placement="floating" value="hi@ionic.io"></ion-input>
|
|
43
43
|
`, config);
|
|
44
44
|
const input = page.locator('ion-input');
|
|
45
|
-
expect(
|
|
45
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-color-floating`));
|
|
46
46
|
});
|
|
47
47
|
test('should set label and highlight color on focus with stacked label placement', async ({ page }) => {
|
|
48
48
|
await page.setContent(`
|
|
49
49
|
<ion-input class="has-focus" color="danger" label="Email" label-placement="stacked" value="hi@ionic.io"></ion-input>
|
|
50
50
|
`, config);
|
|
51
51
|
const input = page.locator('ion-input');
|
|
52
|
-
expect(
|
|
52
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-color-stacked`));
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
test.describe('input: fill solid', () => {
|
|
@@ -58,35 +58,35 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
58
58
|
<ion-input fill="solid" class="has-focus" color="danger" label="Email" label-placement="start" value="hi@ionic.io"></ion-input>
|
|
59
59
|
`, config);
|
|
60
60
|
const input = page.locator('ion-input');
|
|
61
|
-
expect(
|
|
61
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-color-start`));
|
|
62
62
|
});
|
|
63
63
|
test('should set label and highlight color on focus with end label placement', async ({ page }) => {
|
|
64
64
|
await page.setContent(`
|
|
65
65
|
<ion-input fill="solid" class="has-focus" color="danger" label="Email" label-placement="end" value="hi@ionic.io"></ion-input>
|
|
66
66
|
`, config);
|
|
67
67
|
const input = page.locator('ion-input');
|
|
68
|
-
expect(
|
|
68
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-color-end`));
|
|
69
69
|
});
|
|
70
70
|
test('should set label and highlight color on focus with fixed label placement', async ({ page }) => {
|
|
71
71
|
await page.setContent(`
|
|
72
72
|
<ion-input fill="solid" class="has-focus" color="danger" label="Email" label-placement="fixed" value="hi@ionic.io"></ion-input>
|
|
73
73
|
`, config);
|
|
74
74
|
const input = page.locator('ion-input');
|
|
75
|
-
expect(
|
|
75
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-color-fixed`));
|
|
76
76
|
});
|
|
77
77
|
test('should set label and highlight color on focus with floating label placement', async ({ page }) => {
|
|
78
78
|
await page.setContent(`
|
|
79
79
|
<ion-input fill="solid" class="has-focus" color="danger" label="Email" label-placement="floating" value="hi@ionic.io"></ion-input>
|
|
80
80
|
`, config);
|
|
81
81
|
const input = page.locator('ion-input');
|
|
82
|
-
expect(
|
|
82
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-color-floating`));
|
|
83
83
|
});
|
|
84
84
|
test('should set label and highlight color on focus with stacked label placement', async ({ page }) => {
|
|
85
85
|
await page.setContent(`
|
|
86
86
|
<ion-input fill="solid" class="has-focus" color="danger" label="Email" label-placement="stacked" value="hi@ionic.io"></ion-input>
|
|
87
87
|
`, config);
|
|
88
88
|
const input = page.locator('ion-input');
|
|
89
|
-
expect(
|
|
89
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-color-stacked`));
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
test.describe('input: fill outline', () => {
|
|
@@ -95,35 +95,35 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
95
95
|
<ion-input fill="outline" class="has-focus" color="danger" label="Email" label-placement="start" value="hi@ionic.io"></ion-input>
|
|
96
96
|
`, config);
|
|
97
97
|
const input = page.locator('ion-input');
|
|
98
|
-
expect(
|
|
98
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-color-start`));
|
|
99
99
|
});
|
|
100
100
|
test('should set label and highlight color on focus with end label placement', async ({ page }) => {
|
|
101
101
|
await page.setContent(`
|
|
102
102
|
<ion-input fill="outline" class="has-focus" color="danger" label="Email" label-placement="end" value="hi@ionic.io"></ion-input>
|
|
103
103
|
`, config);
|
|
104
104
|
const input = page.locator('ion-input');
|
|
105
|
-
expect(
|
|
105
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-color-end`));
|
|
106
106
|
});
|
|
107
107
|
test('should set label and highlight color on focus with fixed label placement', async ({ page }) => {
|
|
108
108
|
await page.setContent(`
|
|
109
109
|
<ion-input fill="outline" class="has-focus" color="danger" label="Email" label-placement="fixed" value="hi@ionic.io"></ion-input>
|
|
110
110
|
`, config);
|
|
111
111
|
const input = page.locator('ion-input');
|
|
112
|
-
expect(
|
|
112
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-color-fixed`));
|
|
113
113
|
});
|
|
114
114
|
test('should set label and highlight color on focus with floating label placement', async ({ page }) => {
|
|
115
115
|
await page.setContent(`
|
|
116
116
|
<ion-input fill="outline" class="has-focus" color="danger" label="Email" label-placement="floating" value="hi@ionic.io"></ion-input>
|
|
117
117
|
`, config);
|
|
118
118
|
const input = page.locator('ion-input');
|
|
119
|
-
expect(
|
|
119
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-color-floating`));
|
|
120
120
|
});
|
|
121
121
|
test('should set label and highlight color on focus with stacked label placement', async ({ page }) => {
|
|
122
122
|
await page.setContent(`
|
|
123
123
|
<ion-input fill="outline" class="has-focus" color="danger" label="Email" label-placement="stacked" value="hi@ionic.io"></ion-input>
|
|
124
124
|
`, config);
|
|
125
125
|
const input = page.locator('ion-input');
|
|
126
|
-
expect(
|
|
126
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-color-stacked`));
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
129
|
});
|
|
@@ -21,7 +21,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
21
21
|
></ion-input>
|
|
22
22
|
`, config);
|
|
23
23
|
const input = page.locator('ion-input');
|
|
24
|
-
expect(
|
|
24
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-solid`));
|
|
25
25
|
});
|
|
26
26
|
test('should render correctly with floating label', async ({ page }) => {
|
|
27
27
|
await page.setContent(`
|
|
@@ -36,7 +36,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
36
36
|
></ion-input>
|
|
37
37
|
`, config);
|
|
38
38
|
const input = page.locator('ion-input');
|
|
39
|
-
expect(
|
|
39
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-solid-label-floating`));
|
|
40
40
|
});
|
|
41
41
|
test('should not have visual regressions with shaped solid', async ({ page }) => {
|
|
42
42
|
await page.setContent(`
|
|
@@ -51,7 +51,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
51
51
|
></ion-input>
|
|
52
52
|
`, config);
|
|
53
53
|
const input = page.locator('ion-input');
|
|
54
|
-
expect(
|
|
54
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-shaped-solid`));
|
|
55
55
|
});
|
|
56
56
|
test('padding and border radius should be customizable', async ({ page }) => {
|
|
57
57
|
await page.setContent(`
|
|
@@ -75,7 +75,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
75
75
|
></ion-input>
|
|
76
76
|
`, config);
|
|
77
77
|
const input = page.locator('ion-input');
|
|
78
|
-
expect(
|
|
78
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-shaped-solid-custom`));
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
test.describe('input: fill outline', () => {
|
|
@@ -91,7 +91,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
91
91
|
></ion-input>
|
|
92
92
|
`, config);
|
|
93
93
|
const input = page.locator('ion-input');
|
|
94
|
-
expect(
|
|
94
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-outline`));
|
|
95
95
|
});
|
|
96
96
|
test('should render correctly with floating label', async ({ page }) => {
|
|
97
97
|
await page.setContent(`
|
|
@@ -106,7 +106,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
106
106
|
></ion-input>
|
|
107
107
|
`, config);
|
|
108
108
|
const input = page.locator('ion-input');
|
|
109
|
-
expect(
|
|
109
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-outline-label-floating`));
|
|
110
110
|
});
|
|
111
111
|
test('should not have visual regressions with shaped outline', async ({ page }) => {
|
|
112
112
|
await page.setContent(`
|
|
@@ -121,7 +121,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
121
121
|
></ion-input>
|
|
122
122
|
`, config);
|
|
123
123
|
const input = page.locator('ion-input');
|
|
124
|
-
expect(
|
|
124
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-shaped-outline`));
|
|
125
125
|
});
|
|
126
126
|
test('padding and border radius should be customizable', async ({ page }) => {
|
|
127
127
|
await page.setContent(`
|
|
@@ -145,7 +145,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
|
|
|
145
145
|
></ion-input>
|
|
146
146
|
`, config);
|
|
147
147
|
const input = page.locator('ion-input');
|
|
148
|
-
expect(
|
|
148
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-shaped-outline-custom`));
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
151
|
});
|
|
@@ -168,7 +168,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
168
168
|
</ion-input>
|
|
169
169
|
`, config);
|
|
170
170
|
const input = page.locator('ion-input');
|
|
171
|
-
expect(
|
|
171
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-outline-slotted-label`));
|
|
172
172
|
});
|
|
173
173
|
test('should render the notch correctly with a slotted label after the input was originally hidden', async ({ page, }) => {
|
|
174
174
|
await page.setContent(`
|
|
@@ -188,7 +188,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
188
188
|
`, config);
|
|
189
189
|
const input = page.locator('ion-input');
|
|
190
190
|
await input.evaluate((el) => el.style.removeProperty('display'));
|
|
191
|
-
expect(
|
|
191
|
+
await expect(input).toHaveScreenshot(screenshot(`input-fill-outline-hidden-slotted-label`));
|
|
192
192
|
});
|
|
193
193
|
});
|
|
194
194
|
test.describe(title('input: notch cutout'), () => {
|
|
@@ -19,7 +19,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
19
19
|
></ion-input>
|
|
20
20
|
`, config);
|
|
21
21
|
const input = page.locator('ion-input');
|
|
22
|
-
expect(
|
|
22
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-valid`));
|
|
23
23
|
});
|
|
24
24
|
test('should render invalid state correctly', async ({ page }) => {
|
|
25
25
|
await page.setContent(`
|
|
@@ -34,7 +34,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
34
34
|
></ion-input>
|
|
35
35
|
`, config);
|
|
36
36
|
const input = page.locator('ion-input');
|
|
37
|
-
expect(
|
|
37
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-invalid`));
|
|
38
38
|
});
|
|
39
39
|
test('should render focused state correctly', async ({ page }) => {
|
|
40
40
|
await page.setContent(`
|
|
@@ -49,7 +49,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
49
49
|
></ion-input>
|
|
50
50
|
`, config);
|
|
51
51
|
const input = page.locator('ion-input');
|
|
52
|
-
expect(
|
|
52
|
+
await expect(input).toHaveScreenshot(screenshot(`input-no-fill-focus`));
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
test.describe('input: solid', () => {
|
|
@@ -67,7 +67,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
67
67
|
></ion-input>
|
|
68
68
|
`, config);
|
|
69
69
|
const input = page.locator('ion-input');
|
|
70
|
-
expect(
|
|
70
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-valid`));
|
|
71
71
|
});
|
|
72
72
|
test('should render invalid state correctly', async ({ page }) => {
|
|
73
73
|
await page.setContent(`
|
|
@@ -83,7 +83,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
83
83
|
></ion-input>
|
|
84
84
|
`, config);
|
|
85
85
|
const input = page.locator('ion-input');
|
|
86
|
-
expect(
|
|
86
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-invalid`));
|
|
87
87
|
});
|
|
88
88
|
test('should render focused state correctly', async ({ page }) => {
|
|
89
89
|
await page.setContent(`
|
|
@@ -99,7 +99,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
99
99
|
></ion-input>
|
|
100
100
|
`, config);
|
|
101
101
|
const input = page.locator('ion-input');
|
|
102
|
-
expect(
|
|
102
|
+
await expect(input).toHaveScreenshot(screenshot(`input-solid-focus`));
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
test.describe('input: outline', () => {
|
|
@@ -117,7 +117,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
117
117
|
></ion-input>
|
|
118
118
|
`, config);
|
|
119
119
|
const input = page.locator('ion-input');
|
|
120
|
-
expect(
|
|
120
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-valid`));
|
|
121
121
|
});
|
|
122
122
|
test('should render invalid state correctly', async ({ page }) => {
|
|
123
123
|
await page.setContent(`
|
|
@@ -133,7 +133,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
133
133
|
></ion-input>
|
|
134
134
|
`, config);
|
|
135
135
|
const input = page.locator('ion-input');
|
|
136
|
-
expect(
|
|
136
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-invalid`));
|
|
137
137
|
});
|
|
138
138
|
test('should render focused state correctly', async ({ page }) => {
|
|
139
139
|
await page.setContent(`
|
|
@@ -149,7 +149,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
149
149
|
></ion-input>
|
|
150
150
|
`, config);
|
|
151
151
|
const input = page.locator('ion-input');
|
|
152
|
-
expect(
|
|
152
|
+
await expect(input).toHaveScreenshot(screenshot(`input-outline-focus`));
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
155
|
});
|
|
@@ -20,7 +20,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
20
20
|
</ion-list>
|
|
21
21
|
`, config);
|
|
22
22
|
const list = page.locator('ion-list');
|
|
23
|
-
expect(
|
|
23
|
+
await expect(list).toHaveScreenshot(screenshot(`input-list-no-fill`));
|
|
24
24
|
});
|
|
25
25
|
test('should render correctly in inset list with no fill', async ({ page }) => {
|
|
26
26
|
await page.setContent(`
|
|
@@ -37,7 +37,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
37
37
|
</ion-list>
|
|
38
38
|
`, config);
|
|
39
39
|
const list = page.locator('ion-list');
|
|
40
|
-
expect(
|
|
40
|
+
await expect(list).toHaveScreenshot(screenshot(`input-inset-list-no-fill`));
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
});
|