dimsum-e2e-tests 3.37.0-next.6 → 3.37.0-next.7
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 +6 -0
- package/package.json +120 -120
- package/zzz-eol/InputMask/AlphaNumeric.InputMask.func.spec.js +0 -41
- package/zzz-eol/InputMask/AutoCorrectedDate.InputMask.func.spec.js +0 -18
- package/zzz-eol/InputMask/DSInputMask.visual.spec.js +0 -21
- package/zzz-eol/InputMask/DSInputMaskCO.js +0 -92
- package/zzz-eol/InputMask/Date.InputMask.func.spec.js +0 -48
- package/zzz-eol/InputMask/DateTime.InputMask.func.spec.js +0 -48
- package/zzz-eol/InputMask/Decimal.InputMask.func.spec.js +0 -119
- package/zzz-eol/InputMask/Number.InputMask.func.spec.js +0 -98
- package/zzz-eol/InputMask/Percent.InputMask.func.spec.js +0 -54
- package/zzz-eol/InputMask/Phone.InputMask.func.spec.js +0 -48
- package/zzz-eol/InputMask/PhoneInternational.InputMask.func.spec.js +0 -60
- package/zzz-eol/InputMask/Ssn.InputMask.func.spec.js +0 -60
- package/zzz-eol/InputMask/UsZipCode.InputMask.func.spec.js +0 -46
- package/zzz-eol/ds-button-group/DSButtonGropu.visual.spec.js +0 -16
- package/zzz-eol/ds-button-group/DSButtonGroupCO.js +0 -20
- package/zzz-eol/ds-button-v1/DSButton.func.spec.js +0 -23
- package/zzz-eol/ds-button-v1/DSButton.visual.spec.js +0 -16
- package/zzz-eol/ds-button-v1/DSButtonCO.js +0 -38
- package/zzz-eol/ds-button-v2/DSButtonV2.axe-core.func.spec.js +0 -22
- package/zzz-eol/ds-button-v2/DSButtonV2.func.spec.js +0 -139
- package/zzz-eol/ds-button-v2/DSButtonV2.visual.spec.js +0 -153
- package/zzz-eol/ds-button-v2/DSButtonV2CO.js +0 -43
- package/zzz-eol/ds-date-picker/DSDatePicker.func.spec.js +0 -272
- package/zzz-eol/ds-date-picker/DSDatePickerCO.js +0 -104
- package/zzz-eol/ds-date-range-picker/DSDateRangePicker.func.spec.js +0 -115
- package/zzz-eol/ds-date-range-picker/DSDateRangePicker.visual.spec.js +0 -14
- package/zzz-eol/ds-date-range-picker/DSDateRangePickerCO.js +0 -99
- package/zzz-eol/ds-date-range-selector/DSDateRangeSelector.axe-core.func.spec.js +0 -48
- package/zzz-eol/ds-date-range-selector/DSDateRangeSelector.func.spec.js +0 -22
- package/zzz-eol/ds-date-range-selector/DSDateRangeSelector.visual.spec.js +0 -115
- package/zzz-eol/ds-date-range-selector/DSDateRangeSelectorCO.js +0 -44
- package/zzz-eol/ds-date-time-picker/DSDateTimePicker.func.spec.js +0 -210
- package/zzz-eol/ds-date-time-picker/DateTimePickerCO.js +0 -140
- package/zzz-eol/ds-dropdownmenu/DSDropddownMenu-loading.visual.spec.js +0 -31
- package/zzz-eol/ds-dropdownmenu/DSDropddownMenu.func.spec.js +0 -38
- package/zzz-eol/ds-dropdownmenu/DSDropdownMenu-basic.visual.spec.js +0 -30
- package/zzz-eol/ds-dropdownmenu/DSDropdownMenu-withselect.visual.spec.js +0 -24
- package/zzz-eol/ds-dropdownmenu/DropdownMenuCO.js +0 -61
- package/zzz-eol/ds-filterbar/DSFilterBar-basic.axe-core.func.spec.js +0 -88
- package/zzz-eol/ds-filterbar/DSFilterBar-basic.func.spec.js +0 -15
- package/zzz-eol/ds-filterbar/DSFilterBar-basic.visual.spec.js +0 -92
- package/zzz-eol/ds-filterbar/DSFilterBar-dropdown-multipill.visual.spec.js +0 -55
- package/zzz-eol/ds-filterbar/FilterbarCO.js +0 -65
- package/zzz-eol/ds-form/Checkbox/DSCheckbox.func.spec.js +0 -69
- package/zzz-eol/ds-form/Checkbox/DSCheckbox.keyboard.navigation.func.spec.js +0 -64
- package/zzz-eol/ds-form/Checkbox/DSCheckbox.visual.spec.js +0 -37
- package/zzz-eol/ds-form/Checkbox/DSCheckboxCO.js +0 -60
- package/zzz-eol/ds-form/Combobox/DSCombobox.accessibility.func.spec.js +0 -150
- package/zzz-eol/ds-form/Combobox/DSCombobox.basic.func.spec.js +0 -238
- package/zzz-eol/ds-form/Combobox/DSCombobox.freesolo.func.spec.js +0 -97
- package/zzz-eol/ds-form/Combobox/DSCombobox.freesolo.visual.spec.js +0 -25
- package/zzz-eol/ds-form/Combobox/DSCombobox.multi.func.spec.js +0 -121
- package/zzz-eol/ds-form/Combobox/DSCombobox.multi.visual.spec.js +0 -55
- package/zzz-eol/ds-form/Combobox/DSCombobox.tablet.func.spec.js +0 -30
- package/zzz-eol/ds-form/Combobox/DSCombobox.visual.spec.js +0 -93
- package/zzz-eol/ds-form/Combobox/DSComboboxCO.js +0 -210
- package/zzz-eol/ds-form/DateInput/DSDateInputCO.js +0 -51
- package/zzz-eol/ds-form/DateInput/DateInput.func.spec.js +0 -217
- package/zzz-eol/ds-form/DateInput/DateInput.states.func.spec.js +0 -55
- package/zzz-eol/ds-form/FormatItemLayout/FormItemLayout.func.spec.js +0 -46
- package/zzz-eol/ds-form/FormatItemLayout/FormatItemLayout.js +0 -56
- package/zzz-eol/ds-form/FormatItemLayout/FormatItemLayout.visual.spec.js +0 -94
- package/zzz-eol/ds-form/InputGroup/DSInputGroup.visual.spec.js +0 -15
- package/zzz-eol/ds-form/InputGroup/DSInputGroupCO.js +0 -19
- package/zzz-eol/ds-form/InputProtected/DSInputProtected.func.spec.js +0 -18
- package/zzz-eol/ds-form/InputProtected/DSInputProtected.visual.spec.js +0 -18
- package/zzz-eol/ds-form/InputProtected/DSInputProtectedCO.js +0 -45
- package/zzz-eol/ds-form/LargeInputText/DSLargeInputText.func.spec.js +0 -37
- package/zzz-eol/ds-form/LargeInputText/DSLargeInputText.visual.spec.js +0 -18
- package/zzz-eol/ds-form/LargeInputText/DSLargeInputTextCO.js +0 -45
- package/zzz-eol/ds-form/Radio/DSRadio.func.spec.js +0 -13
- package/zzz-eol/ds-form/Radio/DSRadio.visual.spec.js +0 -39
- package/zzz-eol/ds-form/Radio/DSRadioCO.js +0 -49
- package/zzz-eol/ds-form/SearchBox/DSSearchBox.func.spec.js +0 -90
- package/zzz-eol/ds-form/SearchBox/DSSearchBox.visual.spec.js +0 -96
- package/zzz-eol/ds-form/SearchBox/DSSearchBoxCO.js +0 -80
- package/zzz-eol/ds-form/Toggle/DSToggle.func.spec.js +0 -70
- package/zzz-eol/ds-form/Toggle/DSToggle.visual.spec.js +0 -21
- package/zzz-eol/ds-form/Toggle/DSToggleCO.js +0 -45
- package/zzz-eol/ds-group-box/DSGroupBox.axe-core.func.spec.js +0 -30
- package/zzz-eol/ds-group-box/DSGroupBox.visual.spec.js +0 -44
- package/zzz-eol/ds-group-box/DSGroupBoxCO.js +0 -29
- package/zzz-eol/ds-mini-toolbar/MiniToolbal.axe-core.func.spec.js +0 -26
- package/zzz-eol/ds-mini-toolbar/MiniToolbal.func.spec.js +0 -82
- package/zzz-eol/ds-mini-toolbar/MiniToolbal.visual.spec.js +0 -34
- package/zzz-eol/ds-mini-toolbar/MiniToolbarCO.js +0 -45
- package/zzz-eol/ds-modal/Modal.func.spec.js +0 -35
- package/zzz-eol/ds-modal/Modal.visual.spec.js +0 -84
- package/zzz-eol/ds-modal/ModalCO.js +0 -43
- package/zzz-eol/ds-number-range-field/NumberRangeField.func.spec.js +0 -75
- package/zzz-eol/ds-number-range-field/NumberRangeField.visual.spec.js +0 -30
- package/zzz-eol/ds-number-range-field/NumberRangeFieldCO.js +0 -31
- package/zzz-eol/ds-page-number/DSPageNumber.func.spec.js +0 -37
- package/zzz-eol/ds-page-number/DSPageNumber.visual.spec.js +0 -39
- package/zzz-eol/ds-page-number/DSPageNumberCO.js +0 -42
- package/zzz-eol/ds-pills/DSLabeledDropdownSinglePill.visual.spec.js +0 -19
- package/zzz-eol/ds-pills/DSPills.func.spec.js +0 -126
- package/zzz-eol/ds-pills/DSPills.visual.spec.js +0 -74
- package/zzz-eol/ds-pills/DSPillsCO.js +0 -110
- package/zzz-eol/ds-search-field/SearchField.func.spec.js +0 -109
- package/zzz-eol/ds-search-field/SearchField.visual.spec.js +0 -77
- package/zzz-eol/ds-search-field/SearchFieldCO.js +0 -117
- package/zzz-eol/ds-shuttle/DSShuttle-infinite-scroll.func.spec.js +0 -64
- package/zzz-eol/ds-shuttle/DSShuttle-infinite-scroll.visual.spec.js +0 -63
- package/zzz-eol/ds-shuttle/DSShuttle-truncate-option.visual.spec.js +0 -24
- package/zzz-eol/ds-shuttle/DSShuttle.func.spec.js +0 -139
- package/zzz-eol/ds-shuttle/DSShuttleCO.js +0 -193
- package/zzz-eol/ds-slider/DSSlider.func.spec.js +0 -17
- package/zzz-eol/ds-slider/DSSlider.visual.spec.js +0 -51
- package/zzz-eol/ds-slider/DSSliderCO.js +0 -37
- package/zzz-eol/ds-spinner/DSSpinner.axe-core.spec.js +0 -22
- package/zzz-eol/ds-spinner/DSSpinnerCO.js +0 -17
- package/zzz-eol/ds-text-box/DSTextBox.func.spec.js +0 -40
- package/zzz-eol/ds-text-box/DSTextBox.visual.spec.js +0 -51
- package/zzz-eol/ds-text-box/DSTextBoxCO.js +0 -40
- package/zzz-eol/ds-time-picker/DSTimePicker.func.spec.js +0 -48
- package/zzz-eol/ds-time-picker/DSTimePickerCO.js +0 -113
- package/zzz-eol/ds-toolbar/Toolbar.func.spec.js +0 -26
- package/zzz-eol/ds-toolbar/ToolbarCO.js +0 -23
- package/zzz-eol/ds-tooltip/DSTooltip.func.spec.js +0 -86
- package/zzz-eol/ds-tooltip/DSTooltip.visual.spec.js +0 -19
- package/zzz-eol/ds-tooltip/DSTooltipCO.js +0 -38
- package/zzz-eol/ds-uploader/Uploader.func.spec.js +0 -29
- package/zzz-eol/ds-uploader/Uploader.visual.spec.js +0 -64
- package/zzz-eol/ds-uploader/UploaderCO.js +0 -33
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
|
-
import { Key } from 'webdriverio';
|
|
3
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
4
|
-
|
|
5
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
-
describe('PUI-5907 - InputMask, decimal number - add and delete numbers', () => {
|
|
7
|
-
beforeEach('loading page', async () => {
|
|
8
|
-
const errorOnGo = await DSInputMaskCO.decimalURL.go();
|
|
9
|
-
if (errorOnGo) throw errorOnGo;
|
|
10
|
-
});
|
|
11
|
-
it('should add numbers properly - ArrowRight', async () => {
|
|
12
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
13
|
-
await DSInputMaskCO.type('12345678');
|
|
14
|
-
await browser.keys(Key.ArrowRight);
|
|
15
|
-
await DSInputMaskCO.type('90');
|
|
16
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
17
|
-
await expect(inputValue).toEqual('12345678.90');
|
|
18
|
-
});
|
|
19
|
-
it('should add numbers properly - point', async () => {
|
|
20
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
21
|
-
await DSInputMaskCO.type('12345678.90');
|
|
22
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
23
|
-
await expect(inputValue).toEqual('12345678.90');
|
|
24
|
-
});
|
|
25
|
-
it('should add numbers properly - arrowRight and arrowLeft', async () => {
|
|
26
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
27
|
-
await DSInputMaskCO.type('1234567');
|
|
28
|
-
await browser.keys(Key.ArrowRight);
|
|
29
|
-
await DSInputMaskCO.type('89');
|
|
30
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
31
|
-
await expect(inputValue).toEqual('1234567.89');
|
|
32
|
-
await DSInputMaskCO.triggerArrowLeft(3);
|
|
33
|
-
await DSInputMaskCO.type('00');
|
|
34
|
-
const inputValue2 = await (await DSInputMaskCO.getInput()).getValue();
|
|
35
|
-
await expect(inputValue2).toEqual('123456700.89');
|
|
36
|
-
await browser.keys(Key.ArrowRight);
|
|
37
|
-
await DSInputMaskCO.type('0');
|
|
38
|
-
const inputValue3 = await (await DSInputMaskCO.getInput()).getValue();
|
|
39
|
-
await expect(inputValue3).toEqual('123456700.08');
|
|
40
|
-
});
|
|
41
|
-
it('should delete numbers properly', async () => {
|
|
42
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
43
|
-
await DSInputMaskCO.type('12345678');
|
|
44
|
-
await browser.keys(Key.ArrowRight);
|
|
45
|
-
await DSInputMaskCO.type('90');
|
|
46
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
47
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
48
|
-
await expect(inputValue).toEqual('12345678.');
|
|
49
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
50
|
-
const inputValue2 = await (await DSInputMaskCO.getInput()).getValue();
|
|
51
|
-
await expect(inputValue2).toEqual('1234567.');
|
|
52
|
-
});
|
|
53
|
-
it('should delete all properly', async () => {
|
|
54
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
55
|
-
await DSInputMaskCO.type('1234567');
|
|
56
|
-
await browser.keys(Key.ArrowRight);
|
|
57
|
-
await DSInputMaskCO.type('89');
|
|
58
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
59
|
-
await expect(inputValue).toEqual('1234567.89');
|
|
60
|
-
await DSInputMaskCO.triggerBackspace(10);
|
|
61
|
-
const inputValue2 = await (await DSInputMaskCO.getInput()).getValue();
|
|
62
|
-
await expect(inputValue2).toEqual('');
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('PUI-5768 - InputMask, Decimal - Caret remains in the right position after inserting a number', () => {
|
|
66
|
-
beforeEach('loading page', async () => {
|
|
67
|
-
const errorOnGo = await DSInputMaskCO.decimalNumber.go();
|
|
68
|
-
if (errorOnGo) throw errorOnGo;
|
|
69
|
-
});
|
|
70
|
-
it('should add the numbers in the correct position after moving caret', async () => {
|
|
71
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
72
|
-
await DSInputMask.waitForDisplayed({ timeout: 5000 });
|
|
73
|
-
await DSInputMask.click();
|
|
74
|
-
await DSInputMaskCO.type('11.5');
|
|
75
|
-
await DSInputMaskCO.triggerArrowLeft(3);
|
|
76
|
-
await DSInputMaskCO.type('aaa11');
|
|
77
|
-
const inputValue = await DSInputMask.getValue();
|
|
78
|
-
await expect(inputValue).toEqual('1111.5');
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('PUI-6134 - InputMask, Complete decimals on blur', () => {
|
|
82
|
-
before('loading page', async () => {
|
|
83
|
-
const errorOnGo = await DSInputMaskCO.decimalNumber.go();
|
|
84
|
-
if (errorOnGo) throw errorOnGo;
|
|
85
|
-
});
|
|
86
|
-
it('should not add any value to the input', async () => {
|
|
87
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
88
|
-
await DSInputMask.waitForDisplayed({ timeout: 5000 });
|
|
89
|
-
await DSInputMask.click();
|
|
90
|
-
await DSInputMaskCO.blur();
|
|
91
|
-
const inputValue = await DSInputMask.getValue();
|
|
92
|
-
await expect(inputValue).toEqual('');
|
|
93
|
-
});
|
|
94
|
-
it('should add 00 at the end', async () => {
|
|
95
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
96
|
-
await DSInputMaskCO.clearValue(DSInputMask);
|
|
97
|
-
await DSInputMaskCO.type('123');
|
|
98
|
-
await DSInputMaskCO.blur();
|
|
99
|
-
const inputValue = await DSInputMask.getValue();
|
|
100
|
-
await expect(inputValue).toEqual('123.00');
|
|
101
|
-
});
|
|
102
|
-
it('should add 0 at the end', async () => {
|
|
103
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
104
|
-
await DSInputMaskCO.clearValue(DSInputMask);
|
|
105
|
-
await DSInputMaskCO.type('123.1');
|
|
106
|
-
await DSInputMaskCO.blur();
|
|
107
|
-
const inputValue = await DSInputMask.getValue();
|
|
108
|
-
await expect(inputValue).toEqual('123.10');
|
|
109
|
-
});
|
|
110
|
-
it("shouldn't add zeroes at the end", async () => {
|
|
111
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
112
|
-
await DSInputMaskCO.clearValue(DSInputMask);
|
|
113
|
-
await DSInputMaskCO.type('123.12');
|
|
114
|
-
await DSInputMaskCO.blur();
|
|
115
|
-
const inputValue = await DSInputMask.getValue();
|
|
116
|
-
await expect(inputValue).toEqual('123.12');
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5910 - InputMask - number, add and delete numbers', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.numberURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).waitForDisplayed({ timeout: 5000 });
|
|
11
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
12
|
-
await DSInputMaskCO.type('123456.50');
|
|
13
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
14
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
15
|
-
await expect(inputValue).toEqual('$123,456');
|
|
16
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
17
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
18
|
-
await expect(inputValue).toEqual('$123');
|
|
19
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
20
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
21
|
-
await expect(inputValue).toEqual('');
|
|
22
|
-
});
|
|
23
|
-
it('should add numbers properly', async () => {
|
|
24
|
-
await (await DSInputMaskCO.getInput()).waitForDisplayed({ timeout: 5000 });
|
|
25
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
26
|
-
await DSInputMaskCO.type('12345678');
|
|
27
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
28
|
-
await expect(inputValue).toEqual('$12,345,678');
|
|
29
|
-
await DSInputMaskCO.type('.50');
|
|
30
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
31
|
-
await expect(inputValue).toEqual('$12,345,678.50');
|
|
32
|
-
await DSInputMaskCO.triggerArrowLeft(4);
|
|
33
|
-
await DSInputMaskCO.type('123');
|
|
34
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
35
|
-
await expect(inputValue).toEqual('$12,345,671.23');
|
|
36
|
-
});
|
|
37
|
-
it('delete all properly', async () => {
|
|
38
|
-
await (await DSInputMaskCO.getInput(1)).click();
|
|
39
|
-
await DSInputMaskCO.type('12345678.50');
|
|
40
|
-
let inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
41
|
-
await expect(inputValue).toEqual('$12,345,678.50');
|
|
42
|
-
await DSInputMaskCO.triggerBackspace(10);
|
|
43
|
-
inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
44
|
-
await expect(inputValue).toEqual('');
|
|
45
|
-
});
|
|
46
|
-
it('negative numbers, add numbers properly', async () => {
|
|
47
|
-
await (await DSInputMaskCO.getInput(1)).click();
|
|
48
|
-
await DSInputMaskCO.type('12345678');
|
|
49
|
-
let inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
50
|
-
await expect(inputValue).toEqual('$12,345,678');
|
|
51
|
-
await DSInputMaskCO.type('.50');
|
|
52
|
-
inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
53
|
-
await expect(inputValue).toEqual('$12,345,678.50');
|
|
54
|
-
await DSInputMaskCO.triggerArrowLeft(4);
|
|
55
|
-
await DSInputMaskCO.type('123');
|
|
56
|
-
inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
57
|
-
await expect(inputValue).toEqual('$12,345,671.23');
|
|
58
|
-
});
|
|
59
|
-
it('negative numbers, delete numbers properly', async () => {
|
|
60
|
-
await (await DSInputMaskCO.getInput(1)).click();
|
|
61
|
-
await DSInputMaskCO.type('-12345678');
|
|
62
|
-
let inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
63
|
-
await expect(inputValue).toEqual('-$12,345,678');
|
|
64
|
-
await DSInputMaskCO.type('.50');
|
|
65
|
-
inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
66
|
-
await expect(inputValue).toEqual('-$12,345,678.50');
|
|
67
|
-
await DSInputMaskCO.triggerArrowLeft(4);
|
|
68
|
-
await DSInputMaskCO.type('123');
|
|
69
|
-
inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
70
|
-
await expect(inputValue).toEqual('-$12,345,671.23');
|
|
71
|
-
});
|
|
72
|
-
it('negative numbers, delete all properly', async () => {
|
|
73
|
-
await (await DSInputMaskCO.getInput(1)).click();
|
|
74
|
-
await DSInputMaskCO.type('-12345678.50');
|
|
75
|
-
const inputValue = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
76
|
-
await expect(inputValue).toEqual('-$12,345,678.50');
|
|
77
|
-
await DSInputMaskCO.triggerBackspace(10);
|
|
78
|
-
const inputValue2 = await (await DSInputMaskCO.getInput(1)).getValue();
|
|
79
|
-
await expect(inputValue2).toEqual('');
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
describe('PUI-6055 - InputMask, Number - Caret remains in the right position after inserting a number', () => {
|
|
84
|
-
beforeEach('loading page', async () => {
|
|
85
|
-
const errorOnGo = await DSInputMaskCO.numberURL.go();
|
|
86
|
-
if (errorOnGo) throw errorOnGo;
|
|
87
|
-
});
|
|
88
|
-
it('should not move caret to last position', async () => {
|
|
89
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
90
|
-
await DSInputMask.click();
|
|
91
|
-
await DSInputMaskCO.type('12345');
|
|
92
|
-
await DSInputMaskCO.triggerArrowLeft(3);
|
|
93
|
-
await DSInputMaskCO.type('aabbcc678');
|
|
94
|
-
const inputValue = await DSInputMask.getValue();
|
|
95
|
-
await expect(inputValue).toEqual('$12,678,345');
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5911 - InputMask - percent, add and delete numbers', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.percentURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).waitForDisplayed({ timeout: 5000 });
|
|
11
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
12
|
-
await DSInputMaskCO.type('1234.50');
|
|
13
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
14
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
15
|
-
await expect(inputValue).toEqual('1,234%');
|
|
16
|
-
await DSInputMaskCO.triggerBackspace(1);
|
|
17
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
18
|
-
await expect(inputValue).toEqual('123%');
|
|
19
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
20
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
21
|
-
await expect(inputValue).toEqual('');
|
|
22
|
-
});
|
|
23
|
-
it('should add numbers properly', async () => {
|
|
24
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
25
|
-
await DSInputMaskCO.type('1234');
|
|
26
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
27
|
-
await expect(inputValue).toEqual('1,234%');
|
|
28
|
-
await DSInputMaskCO.type('.50');
|
|
29
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
30
|
-
await expect(inputValue).toEqual('1,234.50%');
|
|
31
|
-
await DSInputMaskCO.triggerArrowLeft(4);
|
|
32
|
-
await DSInputMaskCO.type('678');
|
|
33
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
34
|
-
await expect(inputValue).toEqual('1,236.78%');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
describe('PUI-6056 - InputMask, Percent - Caret remains in the right position after inserting a number', () => {
|
|
39
|
-
beforeEach('loading page', async () => {
|
|
40
|
-
const errorOnGo = await DSInputMaskCO.percentURL.go();
|
|
41
|
-
if (errorOnGo) throw errorOnGo;
|
|
42
|
-
});
|
|
43
|
-
it('should not move caret to last position', async () => {
|
|
44
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
45
|
-
await DSInputMask.waitForDisplayed({ timeout: 5000 });
|
|
46
|
-
await DSInputMask.click();
|
|
47
|
-
await DSInputMaskCO.type('1234');
|
|
48
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
49
|
-
await DSInputMaskCO.type('aabbcc678');
|
|
50
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
51
|
-
await expect(inputValue).toEqual('1,267%');
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-3850 - InputMask, Phone mask', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.phoneURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
11
|
-
await DSInputMaskCO.type('123456');
|
|
12
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
13
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
14
|
-
await expect(inputValue).toEqual('(123) 4');
|
|
15
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
16
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
17
|
-
await expect(inputValue).toEqual('(1');
|
|
18
|
-
});
|
|
19
|
-
it('should add numbers properly', async () => {
|
|
20
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
21
|
-
await DSInputMaskCO.type('1234567');
|
|
22
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
23
|
-
await expect(inputValue).toEqual('(123) 456-7');
|
|
24
|
-
await DSInputMaskCO.triggerArrowLeft(3);
|
|
25
|
-
await DSInputMaskCO.type('89');
|
|
26
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
27
|
-
await expect(inputValue).toEqual('(123) 458-967');
|
|
28
|
-
await DSInputMaskCO.type('123');
|
|
29
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
30
|
-
await expect(inputValue).toEqual('(123) 458-9123');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe('PUI-6057 - InputMask, Phone - Caret remains in the right position after inserting a number', () => {
|
|
34
|
-
beforeEach('loading page', async () => {
|
|
35
|
-
const errorOnGo = await DSInputMaskCO.phoneURL.go();
|
|
36
|
-
if (errorOnGo) throw errorOnGo;
|
|
37
|
-
});
|
|
38
|
-
it('should not move caret to last position', async () => {
|
|
39
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
40
|
-
await DSInputMask.click();
|
|
41
|
-
await DSInputMaskCO.type('1234567890');
|
|
42
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
43
|
-
await DSInputMaskCO.type('aabbcc12');
|
|
44
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
45
|
-
await expect(inputValue).toEqual('(123) 456-7812');
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5922 - InputMask - phone international, add and delete values', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.phoneInternationalURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
11
|
-
await DSInputMaskCO.type('123456');
|
|
12
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
13
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
14
|
-
await expect(inputValue).toEqual('+1 (123) 4');
|
|
15
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
16
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
17
|
-
await expect(inputValue).toEqual('+1 (1');
|
|
18
|
-
});
|
|
19
|
-
it('should add numbers properly', async () => {
|
|
20
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
21
|
-
await DSInputMaskCO.type('1234567');
|
|
22
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
23
|
-
await expect(inputValue).toEqual('+1 (123) 456-7');
|
|
24
|
-
await DSInputMaskCO.triggerArrowLeft(3);
|
|
25
|
-
await DSInputMaskCO.type('89');
|
|
26
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
27
|
-
await expect(inputValue).toEqual('+1 (123) 458-967');
|
|
28
|
-
await DSInputMaskCO.type('123');
|
|
29
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
30
|
-
await expect(inputValue).toEqual('+1 (123) 458-9123');
|
|
31
|
-
});
|
|
32
|
-
it('should delete all properly', async () => {
|
|
33
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
34
|
-
await DSInputMaskCO.type('1234589123');
|
|
35
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
36
|
-
await expect(inputValue).toEqual('+1 (123) 458-9123');
|
|
37
|
-
await DSInputMaskCO.triggerBackspace(10);
|
|
38
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
39
|
-
await expect(inputValue).toEqual('');
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line max-len
|
|
44
|
-
describe('PUI-6058 - InputMask, PhoneInternational - Caret remains in the right position after inserting a number', () => {
|
|
45
|
-
beforeEach('loading page', async () => {
|
|
46
|
-
const errorOnGo = await DSInputMaskCO.phoneInternationalURL.go();
|
|
47
|
-
if (errorOnGo) throw errorOnGo;
|
|
48
|
-
});
|
|
49
|
-
it('should not move caret to last position', async () => {
|
|
50
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
51
|
-
await DSInputMask.waitForDisplayed({ timeout: 5000 });
|
|
52
|
-
await DSInputMask.click();
|
|
53
|
-
await DSInputMaskCO.type('1234567890');
|
|
54
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
55
|
-
await DSInputMaskCO.type('aabbcc12');
|
|
56
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
57
|
-
await expect(inputValue).toEqual('+1 (123) 456-7812');
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5923 - InputMask - SSN, add and delete numbers', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.ssnUrl.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
11
|
-
await DSInputMaskCO.type('1234567');
|
|
12
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
13
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
14
|
-
await expect(inputValue).toEqual('123-45');
|
|
15
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
16
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
17
|
-
await expect(inputValue).toEqual('123');
|
|
18
|
-
});
|
|
19
|
-
it('should add numbers properly', async () => {
|
|
20
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
21
|
-
await DSInputMaskCO.type('1234567');
|
|
22
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
23
|
-
await expect(inputValue).toEqual('123-45-67');
|
|
24
|
-
await DSInputMaskCO.triggerArrowLeft(4);
|
|
25
|
-
await DSInputMaskCO.type('89');
|
|
26
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
27
|
-
await expect(inputValue).toEqual('123-48-9567');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
describe('PUI-5915 - InputMask - SSN with tooltip', () => {
|
|
31
|
-
before('loading page', async () => {
|
|
32
|
-
const errorOnGo = await DSInputMaskCO.ssnWithTooltip.go();
|
|
33
|
-
if (errorOnGo) throw errorOnGo;
|
|
34
|
-
});
|
|
35
|
-
it('should display tooltip', async () => {
|
|
36
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
37
|
-
await DSInputMaskCO.type('123456789');
|
|
38
|
-
await $('body').click();
|
|
39
|
-
await (await DSInputMaskCO.getInput()).moveTo();
|
|
40
|
-
const tooltip = await DSInputMaskCO.getTooltip();
|
|
41
|
-
await expect(tooltip).toHaveTextContaining('123-45-6789');
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
describe('PUI-6059 - InputMask, SSN - Caret remains in the right position after inserting a number', () => {
|
|
46
|
-
before('loading page', async () => {
|
|
47
|
-
const errorOnGo = await DSInputMaskCO.ssnUrl.go();
|
|
48
|
-
if (errorOnGo) throw errorOnGo;
|
|
49
|
-
});
|
|
50
|
-
it('should not move caret to last position', async () => {
|
|
51
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
52
|
-
await DSInputMask.click();
|
|
53
|
-
await DSInputMaskCO.type('123456789');
|
|
54
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
55
|
-
await DSInputMaskCO.type('aabbcc01');
|
|
56
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
57
|
-
await expect(inputValue).toEqual('123-45-6701');
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import DSInputMaskCO from './DSInputMaskCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5924 - InputMask - US zip code, add and delete numbers', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSInputMaskCO.usZipCodeUrl.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should delete numbers properly', async () => {
|
|
10
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
11
|
-
await DSInputMaskCO.type('12345');
|
|
12
|
-
await DSInputMaskCO.triggerBackspace(3);
|
|
13
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
14
|
-
await expect(inputValue).toEqual('12');
|
|
15
|
-
await DSInputMaskCO.triggerBackspace(2);
|
|
16
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
17
|
-
await expect(inputValue).toEqual('');
|
|
18
|
-
});
|
|
19
|
-
it('should add numbers properly', async () => {
|
|
20
|
-
await (await DSInputMaskCO.getInput()).click();
|
|
21
|
-
await DSInputMaskCO.type('1234567');
|
|
22
|
-
let inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
23
|
-
await expect(inputValue).toEqual('12345');
|
|
24
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
25
|
-
await DSInputMaskCO.type('89');
|
|
26
|
-
inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
27
|
-
await expect(inputValue).toEqual('12389');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
describe('PUI-6060 - InputMask, USZipCode - Caret remains in the right position after inserting a number', () => {
|
|
32
|
-
beforeEach('loading page', async () => {
|
|
33
|
-
const errorOnGo = await DSInputMaskCO.usZipCodeUrl.go();
|
|
34
|
-
if (errorOnGo) throw errorOnGo;
|
|
35
|
-
});
|
|
36
|
-
it('should not move caret to last position', async () => {
|
|
37
|
-
const DSInputMask = await DSInputMaskCO.getInput();
|
|
38
|
-
await DSInputMask.click();
|
|
39
|
-
await DSInputMaskCO.type('12345');
|
|
40
|
-
await DSInputMaskCO.triggerArrowLeft(2);
|
|
41
|
-
await DSInputMaskCO.type('aabbcc01');
|
|
42
|
-
const inputValue = await (await DSInputMaskCO.getInput()).getValue();
|
|
43
|
-
await expect(inputValue).toEqual('12301');
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import DSButtonGroupCO from './DSButtonGroupCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-5602 - ButtonGroup- visual tests', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSButtonGroupCO.showcaseURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('button group showcase', async () => {
|
|
10
|
-
const button = await DSButtonGroupCO.getButtons(0);
|
|
11
|
-
await button.waitForDisplayed({ timeout: 10000 });
|
|
12
|
-
const snapshot = await browser.checkSnapshot(DSButtonGroupCO.snapshotPath('button-group-showcase'));
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PATH_END_OF_LIFE_BUTTON_GROUP } from '../../../environments/storybook/paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../../helpers';
|
|
3
|
-
|
|
4
|
-
export default class DSButtonCO extends PageObject {
|
|
5
|
-
// Atomic
|
|
6
|
-
static showcaseURL = new Urlbuilder(PATH_END_OF_LIFE_BUTTON_GROUP, 'showcase');
|
|
7
|
-
|
|
8
|
-
// Snapshot
|
|
9
|
-
static snapshotPath(example = 'basic') {
|
|
10
|
-
return PageObject.getSnapshotPathBuilder('ButtonGroup', example);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// selectors
|
|
14
|
-
static async getButtons(index) {
|
|
15
|
-
return $$('[data-testid="button-wrapper"]')[index];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// actions
|
|
19
|
-
// utils
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import DSButtonCO from './DSButtonCO';
|
|
2
|
-
import { mouseOver } from '../../helpers';
|
|
3
|
-
|
|
4
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
-
describe('PUI-6229 - Button enabled/disabled - should show tooltip', () => {
|
|
6
|
-
before('loading page', async () => {
|
|
7
|
-
const errorOnGo = await DSButtonCO.tooltipURL.go();
|
|
8
|
-
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
});
|
|
10
|
-
it('with disabled state having a wrapper', async () => {
|
|
11
|
-
const target = await DSButtonCO.getDisabledButton();
|
|
12
|
-
await mouseOver(target, 75, 14);
|
|
13
|
-
const tooltip = await DSButtonCO.getTooltip1();
|
|
14
|
-
await expect(tooltip).toBeDisplayed();
|
|
15
|
-
});
|
|
16
|
-
it('with enabled state', async () => {
|
|
17
|
-
const target = await DSButtonCO.getEnabledButton();
|
|
18
|
-
await mouseOver(target, 75, 14);
|
|
19
|
-
const tooltip = await DSButtonCO.getTooltip2();
|
|
20
|
-
await expect(tooltip).toBeDisplayed();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import DSButtonCO from './DSButtonCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
-
describe('PUI-3479 - Button - visual tests', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSButtonCO.showcaseURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('button showcase', async () => {
|
|
10
|
-
const button = await DSButtonCO.getButtons(0);
|
|
11
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
12
|
-
const snapshot = await browser.checkSnapshot(DSButtonCO.snapshotPath('button-showcase'));
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PATH_END_OF_LIFE_BUTTON, PATH_E2E_BUTTON } from '../../../environments/storybook/paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../../helpers';
|
|
3
|
-
export default class DSButtonCO extends PageObject {
|
|
4
|
-
// Atomic
|
|
5
|
-
static showcaseURL = new Urlbuilder(PATH_END_OF_LIFE_BUTTON, 'showcase');
|
|
6
|
-
|
|
7
|
-
// use case
|
|
8
|
-
static tooltipURL = new Urlbuilder(PATH_E2E_BUTTON, 'button-with-tooltip');
|
|
9
|
-
|
|
10
|
-
// Snapshot
|
|
11
|
-
static snapshotPath(example = 'basic') {
|
|
12
|
-
return PageObject.getSnapshotPathBuilder('Button', example);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// selectors
|
|
16
|
-
static async getButtons(index) {
|
|
17
|
-
return $$('[data-testid="button-wrapper"]')[index];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static async getEnabledButton() {
|
|
21
|
-
return $('[data-testid="button-enable"]');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static async getDisabledButton() {
|
|
25
|
-
return $('[data-testid="disabled-wrapper"]');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static async getTooltip1() {
|
|
29
|
-
return $('[data-testid="tooltip-1"]');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static async getTooltip2() {
|
|
33
|
-
return $('[data-testid="tooltip-2"]');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// actions
|
|
37
|
-
// utils
|
|
38
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { axeCoreCheck } from '../../helpers';
|
|
2
|
-
import DSButtonV2CO from './DSButtonV2CO';
|
|
3
|
-
|
|
4
|
-
if (
|
|
5
|
-
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
-
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
-
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
-
browser.capabilities.browserName === 'Chrome'
|
|
9
|
-
) {
|
|
10
|
-
describe('PUI-10223 - ButtonV2 - axe core', () => {
|
|
11
|
-
before('loading page', async () => {
|
|
12
|
-
const errorOnGo = await DSButtonV2CO.interactionStates.go();
|
|
13
|
-
if (errorOnGo) throw errorOnGo;
|
|
14
|
-
});
|
|
15
|
-
it('01: Evaluate checkbox accessibility with axe-core', async () => {
|
|
16
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
17
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
18
|
-
const result = await axeCoreCheck();
|
|
19
|
-
expect(result.length).toBe(0);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
}
|