dimsum-e2e-tests 3.50.0-next.2 → 3.50.0-rc.2
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/CHANGELOG.md +337 -258
- package/ds-apppicker/DSAppPickerCO.js +2 -6
- package/ds-apppicker/basic/DSAppPicker.basic.axe-core.spec.js +2 -2
- package/ds-apppicker/basic/DSAppPicker.basic.func.spec.js +3 -3
- package/ds-apppicker/basic/DSAppPicker.basic.keyboard-nav.func.spec.js +2 -2
- package/ds-apppicker/basic/DSAppPicker.basic.visual.spec.js +6 -3
- package/ds-apppicker/closeAfterSelection/DSAppPicker.closeAfterSelection.axe-core.spec.js +2 -2
- package/ds-apppicker/closeAfterSelection/DSAppPicker.closeAfterSelection.func.spec.js +2 -2
- package/ds-apppicker/maxHeight/DSAppPicker.max-height.visual.spec.js +2 -2
- package/ds-apppicker/minHeight/DSAppPicker.minHeight.visual.spec.js +1 -1
- package/ds-autocomplete/DSAutocomplete.func.spec.js +5 -4
- package/ds-autocomplete/DSAutocompleteCO.js +1 -8
- package/ds-banner/DSBanner.func.spec.js +55 -0
- package/ds-banner/DSBanner.visual.spec.js +14 -0
- package/ds-banner/DSBannerCO.js +30 -0
- package/ds-breadcrumb/DSBreadcrumb.axe-core.func.spec.js +21 -6
- package/ds-breadcrumb/DSBreadcrumb.func.spec.js +69 -40
- package/ds-breadcrumb/DSBreadcrumb.visual.spec.js +20 -15
- package/ds-breadcrumb/DSBreadcrumbCO.js +19 -3
- package/ds-button-v3/DSButtonV3.func.spec.js +22 -0
- package/ds-button-v3/DSButtonV3.visual.spec.js +8 -2
- package/ds-button-v3/DSButtonV3CO.js +14 -0
- package/ds-card-v3/DSCardV3CO.js +10 -10
- package/ds-card-v3/global-attributes/DSCardV3.global-attributes.func.spec.js +4 -4
- package/ds-comments-card/DSComments.visual.spec.js +3 -4
- package/ds-comments-card/DSCommentsCO.js +3 -3
- package/ds-controlled-form/ds-combobox/DSCombobox.func.spec.js +1 -0
- package/ds-controlled-form/ds-combobox/DSCombobox.smoke.spec.js +4 -56
- package/ds-controlled-form/ds-combobox/DSComboboxCO.js +2 -10
- package/ds-controlled-form/ds-combobox/creatable/DSCombobox.keyboard-creatable.func.spec.js +3 -0
- package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.axe-core.spec.js +0 -1
- package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.keyboard.func.spec.js +5 -0
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.keyboard-multi-select.func.spec.js +6 -68
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.mouse-touch-multi-select.func.spec.js +0 -58
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.multi.visual.spec.js +1 -16
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.ten-thousand-options.func.spec.js +2 -22
- package/ds-controlled-form/ds-combobox/single-select/DSCombobox.keyboard-single-select.func.spec.js +4 -0
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.func.spec.js +15 -41
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.keyboard-nav.func.spec.js +51 -0
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.visual.spec.js +14 -16
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.axe-core.spec.js +85 -0
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.functional.spec.js +242 -0
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.visual.spec.js +115 -0
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePickerCO.js +56 -2
- package/ds-controlled-form/ds-controlled-date-range-picker/read-only/DSControlledDateRangePicker.ReadOnly.axe-core.spec.js +17 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/DSControlledDateTimePickerCO.js +12 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/date-full/DateFull.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/date-input/DateInput.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/date-time-full/DateTimeFull.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/date-time-input/DateTimeInput.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/time-full/TimeFull.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-date-time-picker/time-input/TimeInput.axe-core.func.spec.js +27 -0
- package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +4 -14
- package/ds-controlled-form/ds-controlled-inputgroup/autocomplete/DSControlledInputGroup.autocomplete.axe-core.func.spec.js +6 -6
- package/ds-controlled-form/ds-controlled-inputgroup/basic/DSControlledInputGroup.basic.axe-core.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/basic/DSControlledInputGroup.basic.visual.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/combobox/DSControlledInputGroup.combobox.axe-core.func.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-inputgroup/form-item-layout/DSControlledInputGroup.form-item-layout.axe-core.func.spec.js +2 -1
- package/ds-controlled-form/ds-controlled-inputgroup/form-item-layout/DSControlledInputGroup.form-item-layout.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.axe-core.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.func.spec.js +2 -1
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.visual.spec.js +2 -1
- package/ds-controlled-form/ds-controlled-large-input-text/DSLargeInputTextCO.js +5 -5
- package/ds-controlled-form/ds-controlled-large-input-text/aria-disabled/DSLargeInputText.aria-disabled.visual.spec.js +7 -2
- package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.axe-core.func.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.func.spec.js +39 -0
- package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.visual.spec.js +12 -1
- package/ds-controlled-form/ds-input-text/DSInputText.func.spec.js +14 -12
- package/ds-controlled-form/ds-input-text/DSInputTextCO.js +11 -8
- package/ds-controlled-form/ds-input-text/aria-disabled/DSInputText.aria-disabled.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.axe-core.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.visual.spec.js +28 -0
- package/ds-controlled-form/react-hook-form/ReactHook.func.spec.js +2 -1
- package/ds-controlled-form/react-hook-form/ReactHook.visual.spec.js +3 -1
- package/ds-controlled-form/react-hook-form/ReactHookCO.js +0 -10
- package/ds-controlled-form/useMask/Number/UseNumberMask.func.spec.js +47 -46
- package/ds-controlled-form/useMask/Number/UseNumberMask.visual.spec.js +7 -6
- package/ds-controlled-form/useMask/Phone/UsePhoneMask.func.spec.js +9 -8
- package/ds-controlled-form/useMask/Phone/UsePhoneMask.visual.spec.js +4 -3
- package/ds-controlled-form/useMask/ReackHookFormWithMask/ReactHookFormWithMask.func.spec.js +4 -3
- package/ds-controlled-form/useMask/ReackHookFormWithMask/ReactHookFormWithMask.visual.spec.js +5 -4
- package/ds-controlled-form/useMask/RegExp/UseRegExpMask.func.spec.js +6 -5
- package/ds-controlled-form/useMask/SSN/UseSsnMask.func.spec.js +7 -6
- package/ds-controlled-form/useMask/ZipCode/UseZipCodeMask.func.spec.js +6 -5
- package/ds-controlled-form/useMask/useMaskCO.js +1 -11
- package/ds-data-table-async/DSDataTable.smoke.spec.js +4 -0
- package/ds-data-table-async/DSDataTableCO.js +8 -0
- package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +2 -2
- package/ds-data-table-async/basic/DSDataTable.usecases.func.spec.js +5 -4
- package/ds-data-table-async/basic/DSDataTable.usecases.visual.spec.js +1 -0
- package/ds-data-table-async/components/FiltersCOextra.js +1 -1
- package/ds-data-table-async/components/HeaderCO.js +1 -1
- package/ds-data-table-async/components/OnRowClickCO.js +1 -1
- package/ds-data-table-async/components/RowCO.js +6 -0
- package/ds-data-table-async/dnd/DSDataTable.dnd.visual.spec.js +1 -1
- package/ds-data-table-async/filters/DSDataTable.filters-creatable.func.spec.js +4 -0
- package/ds-data-table-async/filters/DSDataTable.text-filters.func.spec.js +1 -0
- package/ds-data-table-async/more/DSDataTable.extraactions.func.spec.js +33 -0
- package/ds-data-table-async/select/DSDataTable.select.axe-core.func.spec.js +2 -0
- package/ds-data-table-async/select/DSDataTable.select.func.spec.js +2 -86
- package/ds-data-table-async/select/DSDataTable.select.shift.func.spec.js +126 -0
- package/ds-data-table-async/toolbar/DSDataTable.Toolbar.visual.spec.js +15 -0
- package/ds-data-table-async/vissibility/DSDataTable.vissibility.visual.spec.js +39 -0
- package/ds-dialog/DSDialog.func.spec.js +14 -14
- package/ds-dialog/DSDialogCO.js +1 -1
- package/ds-dialog/components/DialogFormsCO.js +1 -1
- package/ds-dropdownmenu-v2/DSDDMenuV2.axe-core.func.spec.js +2 -0
- package/ds-dropdownmenu-v2/DSDDMenuV2CO.js +6 -2
- package/ds-floating-context/DSFloatingContext.visual.spec.js +15 -0
- package/ds-floating-context/DSFloatingContextCO.js +2 -0
- package/ds-form-combobox-multi/DSComboboxMultiCO.js +5 -10
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +2 -11
- package/ds-form-combobox-multi/read-only/DSComboboxMulti.read-only.axe-core.func.spec.js +23 -0
- package/ds-form-combobox-multi/read-only/DSComboboxMulti.read-only.keyboard-nav.func.spec.js +27 -0
- package/ds-form-combobox-multi/read-only/DSComboboxMulti.read-only.visual.spec.js +33 -0
- package/ds-form-combobox-multi/virtualization/DSComboboxMulti.virtualization.visual.spec.js +29 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +4 -9
- package/ds-form-combobox-single/read-only/DSComboboxSingle.read-only.axe-core.func.spec.js +23 -0
- package/ds-form-combobox-single/read-only/DSComboboxSingle.read-only.keyboard-nav.func.spec.js +27 -0
- package/ds-form-combobox-single/read-only/DSComboboxSingle.read-only.visual.spec.js +33 -0
- package/ds-form-combobox-single/virtualization/DSComboboxSingle.virtualization.visual.spec.js +30 -0
- package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +11 -7
- package/ds-form-layout-blocks/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.visual.spec.js +1 -1
- package/ds-form-layout-blocks/form-layout-checkbox-group/DSFormLayoutCheckboxGroupCO.js +2 -2
- package/ds-menu-button/DSMenuButtonCO.js +16 -12
- package/ds-menu-button/activable/DSMenuButton.activableMenuItem.func.spec.js +32 -0
- package/ds-menu-button/{basic/DSMenuButton.activableMenuItem.func.spec.js → activable/DSMenuButton.activableMenuItem.keyboardnav.func.spec.js} +1 -26
- package/ds-menu-button/disabled/DSMenuButton.axe-core.disabled.func.spec.js +20 -0
- package/ds-menu-button/disabled/DSMenuButton.disabled.func.spec.js +28 -0
- package/ds-menu-button/leftdecorations/DSMenuButton.axe-core.leftDecor.func.spec.js +20 -0
- package/ds-menu-button/multiselect/DSMenuButton.axe-core.multiselect.func.spec.js +28 -0
- package/ds-menu-button/multiselect/DSMenuButton.multiSelectItem.func.spec.js +34 -0
- package/ds-menu-button/{basic/DSMenuButton.multiSelectItem.func.spec.js → multiselect/DSMenuButton.multiSelectItem.keyboardnav.func.spec.js} +0 -29
- package/ds-menu-button/singleSelect/DSMenuButton.axe-core.singleSelect.func.spec.js +28 -0
- package/ds-menu-button/singleSelect/DSMenuButton.singleSelectItem.func.spec.js +39 -0
- package/ds-menu-button/{basic/DSMenuButton.singleSelectItem.func.spec.js → singleSelect/DSMenuButton.singleSelectItem.keyboardnav.func.spec.js} +11 -42
- package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +20 -0
- package/ds-menu-button/submenu/DSMenuButton.subMenuItem.func.spec.js +42 -0
- package/ds-menu-button/{basic/DSMenuButton.subMenuItem.func.spec.js → submenu/DSMenuButton.subMenuItem.keyboardnav.func.spec.js} +1 -38
- package/ds-menu-item/DSMenuItemsCO.js +2 -0
- package/ds-menu-item/aria-disabled/DSMenuItems.aria-disabled.visual.spec.js +1 -1
- package/ds-menu-item/read-only/DSMenuItems.read-only.axe-core.func.spec.js +35 -0
- package/ds-menu-item/read-only/DSMenuItems.read-only.visual.spec.js +66 -0
- package/ds-mobile/MobileLoadingPage/MobileLoadingPageCO.js +1 -1
- package/ds-notification-badge/DSNotificationBadge.axe-core.func.spec.js +1 -0
- package/ds-pills-v2/DSPills.axe-core.func.spec.js +2 -2
- package/ds-pills-v2/DSPills.func.spec.js +26 -0
- package/ds-pills-v2/DSPills.visual.spec.js +1 -1
- package/ds-pills-v2/DSPillsV2CO.js +19 -1
- package/ds-pills-v2/selection/DSPills.axe-core.func.spec.js +77 -0
- package/ds-pills-v2/selection/DSPills.func.spec.js +155 -0
- package/ds-pills-v2/selection/DSPills.visual.spec.js +72 -0
- package/ds-query-builder/DSQueryBuilder.visual.spec.js +2 -1
- package/ds-query-builder/DSQueryBuilderCO.js +1 -6
- package/ds-shuttle-v2/DSShuttleV2CO.js +4 -4
- package/ds-shuttle-v2/Dnd/DSShuttleV2.DnD.visual.spec.js +0 -5
- package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +46 -66
- package/ds-shuttle-v2/drillingdown/DSShuttleV2.drilldown.kb.func.spec.js +3 -5
- package/ds-shuttle-v2/extra/DSShuttleV2.extra.visual.spec.js +19 -0
- package/ds-shuttle-v2/filtering/DSShuttleV2.filter.func.spec.js +0 -6
- package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +1 -9
- package/ds-shuttle-v2/globalcheckbox/DSShuttleV2.globalcheckbox.kb.func.spec.js +0 -2
- package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +0 -2
- package/ds-shuttle-v2/skipped/DSShuttleV2.filter.axe-core.skipped.js +0 -2
- package/ds-slider-v2/DSSliderV2.axe-core.func.spec.js +14 -0
- package/ds-slider-v2/DSSliderV2.func.spec.js +18 -0
- package/ds-slider-v2/DSSliderV2.visual.spec.js +15 -0
- package/ds-slider-v2/DSSliderV2CO.js +12 -10
- package/ds-toast/DSToast.func.spec.js +2 -2
- package/ds-toast/DSToastCO.js +2 -2
- package/ds-toggle/DSToggle.func.spec.js +21 -18
- package/ds-toggle/DSToggle.visual.spec.js +56 -12
- package/package.json +119 -119
- package/ds-apppicker/DSAppPicker.smoke.spec.js +0 -52
- package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckbox.smoke.spec.js +0 -125
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.DateInput.visual.spec.js +0 -57
- package/ds-menu-button/DSMenuButton.axe-core.func.spec.js +0 -66
- /package/ds-controlled-form/ds-controlled-date-time-picker/{date-time-picker → date-time-full}/DateTimePicker.custom.attributes.spec.js +0 -0
- /package/ds-controlled-form/ds-controlled-date-time-picker/{date-time-picker → date-time-full}/DateTimePicker.func.spec.js +0 -0
- /package/ds-query-builder/{DSQueryBuilder.error-states.spec.js → DSQueryBuilder.error-states.func.spec.js} +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
4
|
import { type } from '../../../helpers';
|
|
5
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
5
6
|
|
|
6
7
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
7
8
|
describe('PUI-8167 - useNumberMask:: Currency', () => {
|
|
@@ -10,29 +11,29 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
10
11
|
if (errorOnGo) throw errorOnGo;
|
|
11
12
|
});
|
|
12
13
|
it('01: should correctly format the currency input accordingly to the mask', async () => {
|
|
13
|
-
const secondInput = await
|
|
14
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
14
15
|
await secondInput.click();
|
|
15
16
|
await type('123a4$bb56.90');
|
|
16
17
|
await expect(secondInput).toHaveValue('$123,456.90');
|
|
17
18
|
});
|
|
18
19
|
it('02: should have initial value', async () => {
|
|
19
|
-
const firstInput = await
|
|
20
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
20
21
|
await expect(firstInput).toHaveValue('$100.50');
|
|
21
22
|
});
|
|
22
23
|
it('03: should correctly clear the input', async () => {
|
|
23
|
-
const firstInput = await
|
|
24
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
24
25
|
await UseMaskCO.clearValue(firstInput);
|
|
25
26
|
await expect(firstInput).toHaveValue('');
|
|
26
27
|
});
|
|
27
28
|
it('04: should correctly format the currency input accordingly to the mask - decimal value', async () => {
|
|
28
|
-
const firstInput = await
|
|
29
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
29
30
|
await firstInput.click();
|
|
30
31
|
await type('.9');
|
|
31
32
|
await expect(firstInput).toHaveValue('$0.9');
|
|
32
33
|
});
|
|
33
34
|
it('05: should correctly clear all the inputs', async () => {
|
|
34
|
-
const firstInput = await
|
|
35
|
-
const secondInput = await
|
|
35
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
36
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
36
37
|
await UseMaskCO.clearValue(firstInput);
|
|
37
38
|
await UseMaskCO.clearValue(secondInput);
|
|
38
39
|
await expect(firstInput).toHaveValue('');
|
|
@@ -45,46 +46,46 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
45
46
|
if (errorOnGo) throw errorOnGo;
|
|
46
47
|
});
|
|
47
48
|
it('01: should correctly format the Number input accordingly to the mask', async () => {
|
|
48
|
-
const fifthInput = await
|
|
49
|
+
const fifthInput = await DSInputTextCO.getInputTextByIndex(4);
|
|
49
50
|
await fifthInput.click();
|
|
50
51
|
await type('123a4$bb56');
|
|
51
52
|
await expect(fifthInput).toHaveValue('123,456');
|
|
52
53
|
});
|
|
53
54
|
it('02: should correctly format the Negative Number Allowed input accordingly to the mask', async () => {
|
|
54
|
-
const sixthInput = await
|
|
55
|
+
const sixthInput = await DSInputTextCO.getInputTextByIndex(5);
|
|
55
56
|
await sixthInput.click();
|
|
56
57
|
await type('-123a4$bb-56');
|
|
57
58
|
await expect(sixthInput).toHaveValue('-123,456');
|
|
58
59
|
});
|
|
59
60
|
it('03: should correctly format the Negative Number Allowed input with decimal', async () => {
|
|
60
|
-
const sixthInput = await
|
|
61
|
+
const sixthInput = await DSInputTextCO.getInputTextByIndex(5);
|
|
61
62
|
await UseMaskCO.clearValue(sixthInput);
|
|
62
63
|
await type('-.08');
|
|
63
64
|
await expect(sixthInput).toHaveValue('-0.08');
|
|
64
65
|
});
|
|
65
66
|
it('04: should correctly format the No Thousands Separator input accordingly to the mask', async () => {
|
|
66
|
-
const sevenhtInput = await
|
|
67
|
+
const sevenhtInput = await DSInputTextCO.getInputTextByIndex(6);
|
|
67
68
|
await sevenhtInput.click();
|
|
68
69
|
await type('123a4$bb56');
|
|
69
70
|
await expect(sevenhtInput).toHaveValue('123456');
|
|
70
71
|
});
|
|
71
72
|
it('05: should correctly format the Decimal Required input accordingly to the mask', async () => {
|
|
72
|
-
const eightInput = await
|
|
73
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
73
74
|
await eightInput.click();
|
|
74
75
|
await type('123a4$bb56.1');
|
|
75
76
|
await expect(eightInput).toHaveValue('123,456.1');
|
|
76
77
|
});
|
|
77
78
|
it('06: should correctly format the Decimal Required with its decimals completed', async () => {
|
|
78
|
-
const eightInput = await
|
|
79
|
-
const sevenhtInput = await
|
|
79
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
80
|
+
const sevenhtInput = await DSInputTextCO.getInputTextByIndex(6);
|
|
80
81
|
await sevenhtInput.click();
|
|
81
82
|
await expect(eightInput).toHaveValue('123,456.100');
|
|
82
83
|
});
|
|
83
84
|
it('07: should correctly clear all the inputs', async () => {
|
|
84
|
-
const fifthInput = await
|
|
85
|
-
const sixthInput = await
|
|
86
|
-
const sevenhtInput = await
|
|
87
|
-
const eightInput = await
|
|
85
|
+
const fifthInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
86
|
+
const sixthInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
87
|
+
const sevenhtInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
88
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
88
89
|
await UseMaskCO.clearValue(fifthInput);
|
|
89
90
|
await UseMaskCO.clearValue(sixthInput);
|
|
90
91
|
await UseMaskCO.clearValue(sevenhtInput);
|
|
@@ -101,20 +102,20 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
101
102
|
if (errorOnGo) throw errorOnGo;
|
|
102
103
|
});
|
|
103
104
|
it('01: all initial values should be displayed', async () => {
|
|
104
|
-
const firstInput = await
|
|
105
|
-
const secondInput = await
|
|
106
|
-
const thirdInput = await
|
|
107
|
-
const fourthInput = await
|
|
105
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
106
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
107
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
108
|
+
const fourthInput = await DSInputTextCO.getInputTextByIndex(3);
|
|
108
109
|
await expect(firstInput).toHaveValue('20,030');
|
|
109
110
|
await expect(secondInput).toHaveValue('-0.30');
|
|
110
111
|
await expect(thirdInput).toHaveValue('10000000');
|
|
111
112
|
await expect(fourthInput).toHaveValue('1,000.0');
|
|
112
113
|
});
|
|
113
114
|
it('02: should correctly clear all inputs', async () => {
|
|
114
|
-
const firstInput = await
|
|
115
|
-
const secondInput = await
|
|
116
|
-
const thirdInput = await
|
|
117
|
-
const fourthInput = await
|
|
115
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
116
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
117
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
118
|
+
const fourthInput = await DSInputTextCO.getInputTextByIndex(3);
|
|
118
119
|
await UseMaskCO.clearValue(firstInput);
|
|
119
120
|
await UseMaskCO.clearValue(secondInput);
|
|
120
121
|
await UseMaskCO.clearValue(thirdInput);
|
|
@@ -125,25 +126,25 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
125
126
|
await expect(fourthInput).toHaveValue('');
|
|
126
127
|
});
|
|
127
128
|
it('03: should correctly format the No decimal allowed input', async () => {
|
|
128
|
-
const firstInput = await
|
|
129
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(4);
|
|
129
130
|
await firstInput.click();
|
|
130
131
|
await type('-123a4$bb56.0');
|
|
131
132
|
await expect(firstInput).toHaveValue('1,234,560');
|
|
132
133
|
});
|
|
133
134
|
it('04: should correctly format the Negative Number Allowed input with decimal', async () => {
|
|
134
|
-
const secondInput = await
|
|
135
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(5);
|
|
135
136
|
await UseMaskCO.clearValue(secondInput);
|
|
136
137
|
await type('-12345678.09');
|
|
137
138
|
await expect(secondInput).toHaveValue('-12,345,678.09');
|
|
138
139
|
});
|
|
139
140
|
it('05: should correctly format the No Thousands Separator input accordingly to the mask', async () => {
|
|
140
|
-
const thirdInput = await
|
|
141
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(6);
|
|
141
142
|
await thirdInput.click();
|
|
142
143
|
await type('-1,23a4$,bb5.6');
|
|
143
144
|
await expect(thirdInput).toHaveValue('-12345.6');
|
|
144
145
|
});
|
|
145
146
|
it('06: should correctly format the Decimal Required input accordingly to the mask', async () => {
|
|
146
|
-
const fourthInput = await
|
|
147
|
+
const fourthInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
147
148
|
await fourthInput.click();
|
|
148
149
|
await type('.323952345');
|
|
149
150
|
await expect(fourthInput).toHaveValue('0.323');
|
|
@@ -155,34 +156,34 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
155
156
|
if (errorOnGo) throw errorOnGo;
|
|
156
157
|
});
|
|
157
158
|
it('01: should correctly format the input accordingly to the mask and add decimal dot', async () => {
|
|
158
|
-
const secondInput = await
|
|
159
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
159
160
|
await secondInput.click();
|
|
160
161
|
await type('123a4$bb56');
|
|
161
162
|
await expect(secondInput).toHaveValue('123,456.%');
|
|
162
163
|
});
|
|
163
164
|
it('02: should correctly format the input accordingly to the mask with decimals', async () => {
|
|
164
|
-
const secondInput = await
|
|
165
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
165
166
|
await secondInput.click();
|
|
166
167
|
await type('.a25');
|
|
167
168
|
await expect(secondInput).toHaveValue('123,456.25%');
|
|
168
169
|
});
|
|
169
170
|
it('03: should correctly clear inputs', async () => {
|
|
170
|
-
const firstInput = await
|
|
171
|
-
const secondInput = await
|
|
171
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
172
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
172
173
|
await UseMaskCO.clearValue(firstInput);
|
|
173
174
|
await UseMaskCO.clearValue(secondInput);
|
|
174
175
|
await expect(firstInput).toHaveValue('');
|
|
175
176
|
await expect(secondInput).toHaveValue('');
|
|
176
177
|
});
|
|
177
178
|
it('04: should correctly format the first input', async () => {
|
|
178
|
-
const firstInput = await
|
|
179
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
179
180
|
await firstInput.click();
|
|
180
181
|
await type('%-$90,242.0010');
|
|
181
182
|
await expect(firstInput).toHaveValue('90,242.00%');
|
|
182
183
|
});
|
|
183
184
|
it('05: should correctly format the second input', async () => {
|
|
184
|
-
const firstInput = await
|
|
185
|
-
const secondInput = await
|
|
185
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
186
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
186
187
|
await secondInput.click();
|
|
187
188
|
await type('.30');
|
|
188
189
|
await expect(secondInput).toHaveValue('0.30%');
|
|
@@ -197,16 +198,16 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
197
198
|
if (errorOnGo) throw errorOnGo;
|
|
198
199
|
});
|
|
199
200
|
it('01: should allow max value 500', async () => {
|
|
200
|
-
const ninthinput = await
|
|
201
|
-
const eightInput = await
|
|
201
|
+
const ninthinput = await DSInputTextCO.getInputTextByIndex(8);
|
|
202
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
202
203
|
await ninthinput.click();
|
|
203
204
|
await type('500');
|
|
204
205
|
await eightInput.click();
|
|
205
206
|
await expect(ninthinput).toHaveValue('500');
|
|
206
207
|
});
|
|
207
208
|
it('02: should allow min value -500', async () => {
|
|
208
|
-
const ninthinput = await
|
|
209
|
-
const eightInput = await
|
|
209
|
+
const ninthinput = await DSInputTextCO.getInputTextByIndex(8);
|
|
210
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
210
211
|
await browser.keys(Key.Tab);
|
|
211
212
|
await browser.keys(Key.Backspace);
|
|
212
213
|
await type('-500');
|
|
@@ -214,8 +215,8 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
214
215
|
await expect(ninthinput).toHaveValue('-500');
|
|
215
216
|
});
|
|
216
217
|
it('03: should not allow a value lower than -500', async () => {
|
|
217
|
-
const ninthinput = await
|
|
218
|
-
const eightInput = await
|
|
218
|
+
const ninthinput = await DSInputTextCO.getInputTextByIndex(8);
|
|
219
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
219
220
|
await browser.keys(Key.Tab);
|
|
220
221
|
await browser.keys(Key.Backspace);
|
|
221
222
|
await type('-600');
|
|
@@ -223,8 +224,8 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
223
224
|
await expect(ninthinput).toHaveValue('-500');
|
|
224
225
|
});
|
|
225
226
|
it('04: should not allow a value greater than 500', async () => {
|
|
226
|
-
const ninthinput = await
|
|
227
|
-
const eightInput = await
|
|
227
|
+
const ninthinput = await DSInputTextCO.getInputTextByIndex(8);
|
|
228
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
228
229
|
await browser.keys(Key.Tab);
|
|
229
230
|
await browser.keys(Key.Backspace);
|
|
230
231
|
await type('600');
|
|
@@ -232,8 +233,8 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
232
233
|
await expect(ninthinput).toHaveValue('500');
|
|
233
234
|
});
|
|
234
235
|
it('05: should allow a value in between of -500 and 500', async () => {
|
|
235
|
-
const ninthinput = await
|
|
236
|
-
const eightInput = await
|
|
236
|
+
const ninthinput = await DSInputTextCO.getInputTextByIndex(8);
|
|
237
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
237
238
|
await browser.keys(Key.Tab);
|
|
238
239
|
await browser.keys(Key.Backspace);
|
|
239
240
|
await type('10');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type } from '../../../helpers';
|
|
2
2
|
import UseMaskCO from '../useMaskCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-8175: UseNumberMask - visual', () => {
|
|
@@ -8,23 +9,23 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
10
|
});
|
|
10
11
|
it('01: Input should be correctly formatted according to the specified mask - initial values', async () => {
|
|
11
|
-
const firstInput = await
|
|
12
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
12
13
|
await firstInput.waitForDisplayed();
|
|
13
14
|
const snapshot = await browser.checkSnapshot(UseMaskCO.snapshotPath('useMask-numbers-initial-value'));
|
|
14
15
|
await expect(snapshot).toEqual(0);
|
|
15
16
|
});
|
|
16
17
|
it('02: Input should be correctly formatted according to the specified mask - all inputs completed', async () => {
|
|
17
|
-
const firstInput = await
|
|
18
|
-
const fifthInput = await
|
|
18
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
19
|
+
const fifthInput = await DSInputTextCO.getInputTextByIndex(4);
|
|
19
20
|
await fifthInput.click();
|
|
20
21
|
await type('123a4$bb56');
|
|
21
|
-
const sixthInput = await
|
|
22
|
+
const sixthInput = await DSInputTextCO.getInputTextByIndex(5);
|
|
22
23
|
await sixthInput.click();
|
|
23
24
|
await type('-123a4$bb56');
|
|
24
|
-
const sevenhtInput = await
|
|
25
|
+
const sevenhtInput = await DSInputTextCO.getInputTextByIndex(6);
|
|
25
26
|
await sevenhtInput.click();
|
|
26
27
|
await type('123a4$bb56');
|
|
27
|
-
const eightInput = await
|
|
28
|
+
const eightInput = await DSInputTextCO.getInputTextByIndex(7);
|
|
28
29
|
await eightInput.click();
|
|
29
30
|
await type('123a4$bb56.1');
|
|
30
31
|
await firstInput.click();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type } from '../../../helpers';
|
|
2
2
|
import UseMaskCO from '../useMaskCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-8170 - usePhoneMask:: Phone', () => {
|
|
@@ -8,22 +9,22 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
10
|
});
|
|
10
11
|
it('01: should correctly format the National Phone input accordingly to the mask', async () => {
|
|
11
|
-
const input = await
|
|
12
|
+
const input = await DSInputTextCO.getInputTextByIndex(2);
|
|
12
13
|
await input.click();
|
|
13
14
|
await type('123a4$bb5678910');
|
|
14
15
|
await expect(input).toHaveValue('(123) 456 - 7891');
|
|
15
16
|
});
|
|
16
17
|
it('02: should correctly format the International Phone input accordingly to the mask', async () => {
|
|
17
|
-
const input = await
|
|
18
|
+
const input = await DSInputTextCO.getInputTextByIndex(3);
|
|
18
19
|
await input.click();
|
|
19
20
|
await type('123a4$bb5678-910');
|
|
20
21
|
await expect(input).toHaveValue('+1 (123) 456 - 7891');
|
|
21
22
|
});
|
|
22
23
|
it('03: should clear all correctly', async () => {
|
|
23
|
-
const firstInput = await
|
|
24
|
-
const secondInput = await
|
|
25
|
-
const thirdInput = await
|
|
26
|
-
const fourthInput = await
|
|
24
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
25
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
26
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
27
|
+
const fourthInput = await DSInputTextCO.getInputTextByIndex(3);
|
|
27
28
|
await UseMaskCO.clearValue(firstInput);
|
|
28
29
|
await UseMaskCO.clearValue(secondInput);
|
|
29
30
|
await UseMaskCO.clearValue(thirdInput);
|
|
@@ -34,13 +35,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
34
35
|
await expect(fourthInput).toHaveValue('');
|
|
35
36
|
});
|
|
36
37
|
it('04: should correctly format the National Phone input - initial value', async () => {
|
|
37
|
-
const firstInput = await
|
|
38
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
38
39
|
await firstInput.click();
|
|
39
40
|
await type('((123%a4$bb56-+78910');
|
|
40
41
|
await expect(firstInput).toHaveValue('(123) 456 - 7891');
|
|
41
42
|
});
|
|
42
43
|
it('05: should correctly format the International Phone input - initial value', async () => {
|
|
43
|
-
const secondInput = await
|
|
44
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
44
45
|
await secondInput.click();
|
|
45
46
|
await type('(12-+3a4$bb56)78-910');
|
|
46
47
|
await expect(secondInput).toHaveValue('+1 (123) 456 - 7891');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import UseMaskCO from '../useMaskCO';
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-10142 - usePhoneMask:: Phone - visual', () => {
|
|
@@ -9,15 +10,15 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
});
|
|
10
11
|
it('01: Input should be correctly formatted according to the specified mask - initial values', async () => {
|
|
11
12
|
await browser.eyesOpen();
|
|
12
|
-
const thirdInput = await
|
|
13
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
13
14
|
await thirdInput.waitForDisplayed();
|
|
14
15
|
const snapshot = await browser.eyesCheckSnapshot(UseMaskCO.snapshotPath('useMask-phone-initial-value'));
|
|
15
16
|
await expect(snapshot).toEqual(0);
|
|
16
17
|
});
|
|
17
18
|
it('02: should correctly format the International Phone input accordingly to the mask', async () => {
|
|
18
19
|
await browser.eyesOpen();
|
|
19
|
-
const thirdInput = await
|
|
20
|
-
const fourthInput = await
|
|
20
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
21
|
+
const fourthInput = await DSInputTextCO.getInputTextByIndex(3);
|
|
21
22
|
await thirdInput.click();
|
|
22
23
|
await type('((123%a4$bb56-+78910');
|
|
23
24
|
await fourthInput.click();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
|
|
5
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
7
|
describe('PUI-9283 - useRegExpMask:: With React Hook Form', () => {
|
|
@@ -9,21 +10,21 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
if (errorOnGo) throw errorOnGo;
|
|
10
11
|
});
|
|
11
12
|
it('01: should correctly format the input accordingly to the percent mask', async () => {
|
|
12
|
-
const input = await
|
|
13
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
13
14
|
await input.click();
|
|
14
15
|
await type('123a4$bb56');
|
|
15
16
|
const inputValue = await input.getValue();
|
|
16
17
|
await expect(inputValue).toEqual('123,456%');
|
|
17
18
|
});
|
|
18
19
|
it('02: should correctly format the currency input accordingly to the currency mask', async () => {
|
|
19
|
-
const input = await
|
|
20
|
+
const input = await DSInputTextCO.getInputTextByIndex(1);
|
|
20
21
|
await input.click();
|
|
21
22
|
await type('123a4$bb56');
|
|
22
23
|
const inputValue = await input.getValue();
|
|
23
24
|
await expect(inputValue).toEqual('$123,456');
|
|
24
25
|
});
|
|
25
26
|
it('03: should correctly format the International Phone input accordingly to the mask', async () => {
|
|
26
|
-
const input = await
|
|
27
|
+
const input = await DSInputTextCO.getInputTextByIndex(2);
|
|
27
28
|
await input.click();
|
|
28
29
|
await type('123a4$bb5678-910');
|
|
29
30
|
const inputValue = await input.getValue();
|
package/ds-controlled-form/useMask/ReackHookFormWithMask/ReactHookFormWithMask.visual.spec.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
|
|
5
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
7
|
describe('PUI-10170 - useRegExpMask:: With React Hook Form - visual', () => {
|
|
@@ -10,16 +11,16 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
10
11
|
});
|
|
11
12
|
it('01: Should display correctly react hook form with mask - initial values', async () => {
|
|
12
13
|
await browser.eyesOpen();
|
|
13
|
-
const firstInput = await
|
|
14
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
14
15
|
await firstInput.waitForDisplayed();
|
|
15
16
|
const snapshot = await browser.eyesCheckSnapshot(UseMaskCO.snapshotPath('useMask-react-hook-form-initial-value'));
|
|
16
17
|
await expect(snapshot).toEqual(0);
|
|
17
18
|
});
|
|
18
19
|
it('02: Should display correctly react hook form with mask - all completed', async () => {
|
|
19
20
|
await browser.eyesOpen();
|
|
20
|
-
const firstInput = await
|
|
21
|
-
const secondInput = await
|
|
22
|
-
const thirdInput = await
|
|
21
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
22
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
23
|
+
const thirdInput = await DSInputTextCO.getInputTextByIndex(2);
|
|
23
24
|
const checkbox = await UseMaskCO.getCheckbox();
|
|
24
25
|
const toggle = await UseMaskCO.getToggle();
|
|
25
26
|
await firstInput.click();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
|
|
5
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
7
|
describe('PUI-8171 - useRegExpMask:: RegExp', () => {
|
|
@@ -9,26 +10,26 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
if (errorOnGo) throw errorOnGo;
|
|
10
11
|
});
|
|
11
12
|
it('01: first input should have initial value', async () => {
|
|
12
|
-
const firstInput = await
|
|
13
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
13
14
|
await firstInput.click();
|
|
14
15
|
await expect(firstInput).toHaveValue('+(44) 444-44-44');
|
|
15
16
|
});
|
|
16
17
|
it('02: second input should be correctly formated', async () => {
|
|
17
|
-
const secondInput = await
|
|
18
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
18
19
|
await secondInput.click();
|
|
19
20
|
await type('123a4$bb5678-910');
|
|
20
21
|
await expect(secondInput).toHaveValue('+(12) 345-67-89');
|
|
21
22
|
});
|
|
22
23
|
it('03: clear all inputs', async () => {
|
|
23
|
-
const firstInput = await
|
|
24
|
-
const secondInput = await
|
|
24
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
25
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
25
26
|
await UseMaskCO.clearValue(firstInput);
|
|
26
27
|
await UseMaskCO.clearValue(secondInput);
|
|
27
28
|
await expect(firstInput).toHaveValue('');
|
|
28
29
|
await expect(secondInput).toHaveValue('');
|
|
29
30
|
});
|
|
30
31
|
it('04: first input should be correctly formated', async () => {
|
|
31
|
-
const firstInput = await
|
|
32
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
32
33
|
await firstInput.click();
|
|
33
34
|
await type('1(()23))a4$bb56&*(}}}{:"><? 78-9106456');
|
|
34
35
|
await expect(firstInput).toHaveValue('+(12) 345-67-89');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
|
|
5
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
7
|
describe('PUI-8172 - useSSNMask -func', () => {
|
|
@@ -9,26 +10,26 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
if (errorOnGo) throw errorOnGo;
|
|
10
11
|
});
|
|
11
12
|
it('01: first input should have initial value', async () => {
|
|
12
|
-
const firstInput = await
|
|
13
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
13
14
|
await firstInput.waitForDisplayed();
|
|
14
15
|
await expect(firstInput).toHaveValue('111-11-1111');
|
|
15
16
|
});
|
|
16
17
|
it('02: should correctly format the SSN input accordingly to the mask - second input', async () => {
|
|
17
|
-
const secondInput = await
|
|
18
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
18
19
|
await secondInput.click();
|
|
19
20
|
await type('123a4$bb5678-910');
|
|
20
21
|
await expect(secondInput).toHaveValue('123-45-6789');
|
|
21
22
|
});
|
|
22
23
|
it('03: should correctly clear all inputs', async () => {
|
|
23
|
-
const firstInput = await
|
|
24
|
-
const secondInput = await
|
|
24
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
25
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
25
26
|
await UseMaskCO.clearValue(firstInput);
|
|
26
27
|
await UseMaskCO.clearValue(secondInput);
|
|
27
28
|
await expect(firstInput).toHaveValue('');
|
|
28
29
|
await expect(secondInput).toHaveValue('');
|
|
29
30
|
});
|
|
30
31
|
it('04: should correctly format the SSN input accordingly to the mask - first input', async () => {
|
|
31
|
-
const firstInput = await
|
|
32
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
32
33
|
await firstInput.click();
|
|
33
34
|
await type('1-124--+=23a4$bb5678-910');
|
|
34
35
|
await expect(firstInput).toHaveValue('112-42-3456');
|
|
@@ -43,7 +44,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
43
44
|
if (errorOnGo) throw errorOnGo;
|
|
44
45
|
});
|
|
45
46
|
it('01: should correctly format the SSN input even when using only zeros - second input', async () => {
|
|
46
|
-
const secondInput = await
|
|
47
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
47
48
|
await secondInput.click();
|
|
48
49
|
await type('000000000');
|
|
49
50
|
await expect(secondInput).toHaveValue('000-00-0000');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { type } from '../../../helpers';
|
|
3
3
|
import UseMaskCO from '../useMaskCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
|
|
5
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
7
|
describe('PUI-8173 - useZipCodeMask:: ZipCode', () => {
|
|
@@ -9,26 +10,26 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
if (errorOnGo) throw errorOnGo;
|
|
10
11
|
});
|
|
11
12
|
it('01: first input should have initial value', async () => {
|
|
12
|
-
const firstInput = await
|
|
13
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
13
14
|
await firstInput.waitForDisplayed();
|
|
14
15
|
await expect(firstInput).toHaveValue('11111-1111');
|
|
15
16
|
});
|
|
16
17
|
it('02: should correctly format the ZipCode input accordingly to the mask - second input', async () => {
|
|
17
|
-
const secondInput = await
|
|
18
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
18
19
|
await secondInput.click();
|
|
19
20
|
await type('123a4$bb5678-910');
|
|
20
21
|
await expect(secondInput).toHaveValue('12345-6789');
|
|
21
22
|
});
|
|
22
23
|
it('03: should correctly clear all inputs', async () => {
|
|
23
|
-
const firstInput = await
|
|
24
|
-
const secondInput = await
|
|
24
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
25
|
+
const secondInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
25
26
|
await UseMaskCO.clearValue(firstInput);
|
|
26
27
|
await UseMaskCO.clearValue(secondInput);
|
|
27
28
|
await expect(firstInput).toHaveValue('');
|
|
28
29
|
await expect(secondInput).toHaveValue('');
|
|
29
30
|
});
|
|
30
31
|
it('04: should correctly format the ZipCode input accordingly to the mask - first input', async () => {
|
|
31
|
-
const firstInput = await
|
|
32
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(1);
|
|
32
33
|
await firstInput.click();
|
|
33
34
|
await type('1-124--+=23a4$bb5678-910');
|
|
34
35
|
await expect(firstInput).toHaveValue('11242-3456');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable import/no-relative-packages */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import { PATH_E2E_HOOKS_MASKS } from '../../../environments/storybook/paths';
|
|
4
|
-
import { PageObject, Urlbuilder
|
|
4
|
+
import { PageObject, Urlbuilder } from '../../helpers';
|
|
5
5
|
|
|
6
6
|
export default class UseMaskCO extends PageObject {
|
|
7
7
|
static currencyURL = new Urlbuilder(PATH_E2E_HOOKS_MASKS, 'currency-test');
|
|
@@ -20,10 +20,6 @@ export default class UseMaskCO extends PageObject {
|
|
|
20
20
|
|
|
21
21
|
static withReactHookForm = new Urlbuilder(PATH_E2E_HOOKS_MASKS, 'react-hook-form-with-mask-test');
|
|
22
22
|
|
|
23
|
-
static async getInput() {
|
|
24
|
-
return $('[data-testid="ds-input-text-input"]');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
23
|
static async getCheckbox() {
|
|
28
24
|
return $('[data-testid="ds-checkbox"]');
|
|
29
25
|
}
|
|
@@ -32,12 +28,6 @@ export default class UseMaskCO extends PageObject {
|
|
|
32
28
|
return $('[ data-testid="ds-controlled-toggle-checkbox"]');
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
static async getInputs() {
|
|
36
|
-
return $$('[data-testid="ds-input-text-input"]');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static getInputByIndex = async (index) => getElementByIndex(this.getInputs, index);
|
|
40
|
-
|
|
41
31
|
static snapshotPath(example = 'basic') {
|
|
42
32
|
return PageObject.getSnapshotPathBuilder('DSInputMask', example, 'ds-input-mask');
|
|
43
33
|
}
|
|
@@ -124,6 +124,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
124
124
|
});
|
|
125
125
|
it('03: should create a new option', async () => {
|
|
126
126
|
await type('OHN');
|
|
127
|
+
await browser.keys(Key.ArrowDown);
|
|
127
128
|
await browser.keys(Key.Enter);
|
|
128
129
|
const pill = await FilterBarCO.getPillByText('JOHN');
|
|
129
130
|
await expect(pill).toBeDisplayedInViewport();
|
|
@@ -133,6 +134,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
133
134
|
await pillCloseBtn.click();
|
|
134
135
|
await FiltersCO.openFilterPopperByColumnName('name', 0);
|
|
135
136
|
await type('John');
|
|
137
|
+
await browser.keys(Key.ArrowDown);
|
|
136
138
|
await browser.keys(Key.Enter);
|
|
137
139
|
const results = await RowCO.getRows();
|
|
138
140
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 1);
|
|
@@ -163,6 +165,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
163
165
|
});
|
|
164
166
|
it('03: should create a new option', async () => {
|
|
165
167
|
await type('act');
|
|
168
|
+
await browser.keys(Key.ArrowDown);
|
|
166
169
|
await browser.keys(Key.Enter);
|
|
167
170
|
const pill = await FilterBarCO.getPillByText('React');
|
|
168
171
|
const menuItems = await FiltersCO.getFilterMultiSelectMenuItems();
|
|
@@ -172,6 +175,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
172
175
|
});
|
|
173
176
|
it('04: type a valid value', async () => {
|
|
174
177
|
await type('React dev');
|
|
178
|
+
await browser.keys(Key.ArrowDown);
|
|
175
179
|
await browser.keys(Key.Enter);
|
|
176
180
|
const results = await RowCO.getRows();
|
|
177
181
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 2);
|