dimsum-e2e-tests 3.49.0-rc.4 → 3.50.0-next.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 +321 -227
- package/ds-breadcrumb/DSBreadcrumb.visual.spec.js +13 -18
- package/ds-button-v3/DSButtonV3CO.js +0 -4
- package/ds-controlled-form/ds-combobox/DSCombobox.func.spec.js +0 -1
- package/ds-controlled-form/ds-combobox/DSCombobox.smoke.spec.js +56 -4
- package/ds-controlled-form/ds-combobox/DSComboboxCO.js +9 -0
- package/ds-controlled-form/ds-combobox/creatable/DSCombobox.keyboard-creatable.func.spec.js +0 -3
- package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.axe-core.spec.js +1 -0
- package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.keyboard.func.spec.js +0 -3
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.keyboard-multi-select.func.spec.js +68 -5
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.mouse-touch-multi-select.func.spec.js +58 -0
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.multi.visual.spec.js +16 -0
- package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.ten-thousand-options.func.spec.js +22 -2
- package/ds-controlled-form/ds-combobox/single-select/DSCombobox.keyboard-single-select.func.spec.js +0 -3
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.DateInput.visual.spec.js +57 -0
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePickerCO.js +2 -54
- package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +0 -4
- package/ds-controlled-form/ds-controlled-inputgroup/combobox/DSControlledInputGroup.combobox.axe-core.func.spec.js +1 -1
- package/ds-data-table-async/DSDataTable.smoke.spec.js +0 -4
- package/ds-data-table-async/filters/DSDataTable.filters-creatable.func.spec.js +0 -4
- package/ds-data-table-async/select/DSDataTable.select.axe-core.func.spec.js +0 -2
- package/ds-form-combobox-multi/DSComboboxMultiCO.js +9 -0
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +10 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +9 -0
- package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +0 -4
- package/ds-menu-button/DSMenuButton.axe-core.func.spec.js +66 -0
- package/ds-menu-button/DSMenuButtonCO.js +5 -5
- package/ds-menu-button/{activable/DSMenuButton.activableMenuItem.keyboardnav.func.spec.js → basic/DSMenuButton.activableMenuItem.func.spec.js} +26 -1
- package/ds-menu-button/{multiselect/DSMenuButton.multiSelectItem.keyboardnav.func.spec.js → basic/DSMenuButton.multiSelectItem.func.spec.js} +29 -0
- package/ds-menu-button/{singleSelect/DSMenuButton.singleSelectItem.keyboardnav.func.spec.js → basic/DSMenuButton.singleSelectItem.func.spec.js} +42 -11
- package/ds-menu-button/{submenu/DSMenuButton.subMenuItem.keyboardnav.func.spec.js → basic/DSMenuButton.subMenuItem.func.spec.js} +38 -1
- package/ds-pills-v2/DSPills.axe-core.func.spec.js +2 -2
- package/ds-pills-v2/DSPills.visual.spec.js +1 -1
- package/ds-pills-v2/DSPillsV2CO.js +1 -15
- package/ds-shuttle-v2/DSShuttleV2CO.js +4 -2
- package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +66 -46
- package/ds-shuttle-v2/drillingdown/DSShuttleV2.drilldown.kb.func.spec.js +5 -3
- package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +7 -1
- package/ds-shuttle-v2/globalcheckbox/DSShuttleV2.globalcheckbox.kb.func.spec.js +2 -0
- package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +2 -0
- package/ds-toggle/DSToggle.func.spec.js +18 -21
- package/ds-toggle/DSToggle.visual.spec.js +12 -36
- package/package.json +119 -119
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.axe-core.spec.js +0 -85
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.functional.spec.js +0 -242
- package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.visual.spec.js +0 -115
- package/ds-menu-button/activable/DSMenuButton.activableMenuItem.func.spec.js +0 -32
- package/ds-menu-button/multiselect/DSMenuButton.axe-core.multiselect.func.spec.js +0 -28
- package/ds-menu-button/multiselect/DSMenuButton.multiSelectItem.func.spec.js +0 -34
- package/ds-menu-button/singleSelect/DSMenuButton.axe-core.singleSelect.func.spec.js +0 -28
- package/ds-menu-button/singleSelect/DSMenuButton.singleSelectItem.func.spec.js +0 -39
- package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +0 -20
- package/ds-menu-button/submenu/DSMenuButton.subMenuItem.func.spec.js +0 -42
- package/ds-pills-v2/selection/DSPills.axe-core.func.spec.js +0 -77
- package/ds-pills-v2/selection/DSPills.func.spec.js +0 -155
- package/ds-pills-v2/selection/DSPills.visual.spec.js +0 -72
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/no-relative-packages */
|
|
2
2
|
/* eslint-disable max-lines */
|
|
3
|
-
import {
|
|
3
|
+
import { PATH_E2E_CONTROLLEDFORM } from '../../../environments/storybook/paths';
|
|
4
4
|
import { PageObject, Urlbuilder, getElementByIndex } from '../../helpers';
|
|
5
5
|
|
|
6
6
|
export default class DSControlledDateRangePickerCO extends PageObject {
|
|
7
|
-
static basic = new Urlbuilder(
|
|
8
|
-
|
|
9
|
-
static clearable = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'clearable-test');
|
|
10
|
-
|
|
11
|
-
static invalidSelection = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'invalid-selection-test');
|
|
12
|
-
|
|
13
|
-
static fullFeatures = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'full-features-test');
|
|
14
|
-
|
|
15
|
-
static disabled = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'disabled-test');
|
|
16
|
-
|
|
17
|
-
static withValidation = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'example-with-validation-test');
|
|
7
|
+
static basic = new Urlbuilder(PATH_E2E_CONTROLLEDFORM, 'basic-date-range');
|
|
18
8
|
|
|
19
9
|
// Story elements
|
|
20
10
|
|
|
@@ -22,10 +12,6 @@ export default class DSControlledDateRangePickerCO extends PageObject {
|
|
|
22
12
|
|
|
23
13
|
static getPrevMonthBtn = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-prev-month"]');
|
|
24
14
|
|
|
25
|
-
static getNextYearBtn = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-next-year"]');
|
|
26
|
-
|
|
27
|
-
static getPrevYearBtn = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-prev-year"]');
|
|
28
|
-
|
|
29
15
|
// DateInput
|
|
30
16
|
static getMonthInput = async () => $('[data-testid="ds-controlled-date-time-picker-month-input"]');
|
|
31
17
|
|
|
@@ -33,20 +19,6 @@ export default class DSControlledDateRangePickerCO extends PageObject {
|
|
|
33
19
|
|
|
34
20
|
static getYearInput = async () => $('[data-testid="ds-controlled-date-time-picker-year-input"]');
|
|
35
21
|
|
|
36
|
-
static getMonthInputByIndex = async (index = 0) =>
|
|
37
|
-
$$('[data-testid="ds-controlled-date-time-picker-month-input"]')[index];
|
|
38
|
-
|
|
39
|
-
static getDayInputByIndex = async (index = 0) =>
|
|
40
|
-
$$('[data-testid="ds-controlled-date-time-picker-day-input"]')[index];
|
|
41
|
-
|
|
42
|
-
static getYearInputByIndex = async (index = 0) =>
|
|
43
|
-
$$('[data-testid="ds-controlled-date-time-picker-year-input"]')[index];
|
|
44
|
-
|
|
45
|
-
static getClearableBtns = async () => $$(`[data-testid="ds-controlled-date-time-picker-clear-btn"]`);
|
|
46
|
-
|
|
47
|
-
static getClearableByIndex = async (index = 0) =>
|
|
48
|
-
$$(`[data-testid="ds-controlled-date-time-picker-clear-btn"]`)[index];
|
|
49
|
-
|
|
50
22
|
// TimeInput
|
|
51
23
|
static getHourInput = async () => $('[data-testid="ds-controlled-date-time-picker-hour-input"]');
|
|
52
24
|
|
|
@@ -58,9 +30,6 @@ export default class DSControlledDateRangePickerCO extends PageObject {
|
|
|
58
30
|
|
|
59
31
|
static getDayOnCalendarByIndex = async (index) => getElementByIndex(this.getDaysOnCalendar, index);
|
|
60
32
|
|
|
61
|
-
static getInRangeDayByIndex = async (index = 0) =>
|
|
62
|
-
$$('[data-testid="ds-controlled-date-time-picker-calendar-in-range-day"]')[index];
|
|
63
|
-
|
|
64
33
|
// Picker
|
|
65
34
|
static getPickerBtn = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-trigger-icon"]');
|
|
66
35
|
|
|
@@ -75,28 +44,7 @@ export default class DSControlledDateRangePickerCO extends PageObject {
|
|
|
75
44
|
return $(`[data-testid="ds-controlled-date-time-picker-timewheel-minute"]=${value}`);
|
|
76
45
|
}
|
|
77
46
|
|
|
78
|
-
static async getRangeStartDay() {
|
|
79
|
-
return $(`[data-testid="ds-controlled-date-time-picker-calendar-start-range-day"]`);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
static async getRangeEndDay() {
|
|
83
|
-
return $(`[data-testid="ds-controlled-date-time-picker-calendar-end-range-day"]`);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
static async getFocusedDay() {
|
|
87
|
-
return $(`[data-testid="ds-controlled-date-time-picker-calendar-focused-day"]`);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
47
|
// Calendar
|
|
91
|
-
|
|
92
|
-
static async getDayOnCalendarWrapper() {
|
|
93
|
-
return $(`[data-testid="ds-controlled-date-time-picker-calendar-context-content-wrapper"]`);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
static async getCalendarHeaderLabel() {
|
|
97
|
-
return $(`[data-testid="ds-controlled-date-time-picker-calendar-header-label"]`);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
48
|
// Time Wheel
|
|
101
49
|
// Screenshots
|
|
102
50
|
static snapshotPath(example = 'basic') {
|
|
@@ -72,10 +72,6 @@ export default class DSControlledInputGroupCO extends PageObject {
|
|
|
72
72
|
return $$('[data-testid="combobox-option"]')[index];
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
static async getComboboxWrapper() {
|
|
76
|
-
return $('[data-testid="combobox-controls-wrapper"]');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
75
|
static snapshotPath(example = 'basic') {
|
|
80
76
|
return PageObject.getSnapshotPathBuilder('DSControlledInputGroup', example, 'ds-controlled-inputgroup');
|
|
81
77
|
}
|
|
@@ -30,7 +30,7 @@ if (
|
|
|
30
30
|
expect(result.length).toBe(0);
|
|
31
31
|
});
|
|
32
32
|
it('03: should pass axe-core scan without violations after select an option', async () => {
|
|
33
|
-
const input = await DSControlledInputGroupCO.
|
|
33
|
+
const input = await DSControlledInputGroupCO.getComboboxInput();
|
|
34
34
|
await input.waitForDisplayed();
|
|
35
35
|
await input.click();
|
|
36
36
|
const menuList = await DSControlledInputGroupCO.getMenuList();
|
|
@@ -124,7 +124,6 @@ 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);
|
|
128
127
|
await browser.keys(Key.Enter);
|
|
129
128
|
const pill = await FilterBarCO.getPillByText('JOHN');
|
|
130
129
|
await expect(pill).toBeDisplayedInViewport();
|
|
@@ -134,7 +133,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
134
133
|
await pillCloseBtn.click();
|
|
135
134
|
await FiltersCO.openFilterPopperByColumnName('name', 0);
|
|
136
135
|
await type('John');
|
|
137
|
-
await browser.keys(Key.ArrowDown);
|
|
138
136
|
await browser.keys(Key.Enter);
|
|
139
137
|
const results = await RowCO.getRows();
|
|
140
138
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 1);
|
|
@@ -165,7 +163,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
165
163
|
});
|
|
166
164
|
it('03: should create a new option', async () => {
|
|
167
165
|
await type('act');
|
|
168
|
-
await browser.keys(Key.ArrowDown);
|
|
169
166
|
await browser.keys(Key.Enter);
|
|
170
167
|
const pill = await FilterBarCO.getPillByText('React');
|
|
171
168
|
const menuItems = await FiltersCO.getFilterMultiSelectMenuItems();
|
|
@@ -175,7 +172,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
175
172
|
});
|
|
176
173
|
it('04: type a valid value', async () => {
|
|
177
174
|
await type('React dev');
|
|
178
|
-
await browser.keys(Key.ArrowDown);
|
|
179
175
|
await browser.keys(Key.Enter);
|
|
180
176
|
const results = await RowCO.getRows();
|
|
181
177
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 2);
|
|
@@ -29,7 +29,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
29
29
|
});
|
|
30
30
|
it('03: should create a new option', async () => {
|
|
31
31
|
await type('OHN');
|
|
32
|
-
await browser.keys(Key.ArrowDown);
|
|
33
32
|
await browser.keys(Key.Enter);
|
|
34
33
|
const pill = await FilterBarCO.getPillByText('JOHN');
|
|
35
34
|
await expect(pill).toBeDisplayedInViewport();
|
|
@@ -39,7 +38,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
39
38
|
await pillCloseBtn.click();
|
|
40
39
|
await FiltersCO.openFilterPopperByColumnName('name', 0);
|
|
41
40
|
await type('John');
|
|
42
|
-
await browser.keys(Key.ArrowDown);
|
|
43
41
|
await browser.keys(Key.Enter);
|
|
44
42
|
const results = await RowCO.getRows();
|
|
45
43
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 1);
|
|
@@ -70,7 +68,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
70
68
|
});
|
|
71
69
|
it('03: should create a new option', async () => {
|
|
72
70
|
await type('act');
|
|
73
|
-
await browser.keys(Key.ArrowDown);
|
|
74
71
|
await browser.keys(Key.Enter);
|
|
75
72
|
const pill = await FilterBarCO.getPillByText('React');
|
|
76
73
|
const menuItems = await FiltersCO.getFilterMultiSelectMenuItems();
|
|
@@ -80,7 +77,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
80
77
|
});
|
|
81
78
|
it('04: type a valid value', async () => {
|
|
82
79
|
await type('React dev');
|
|
83
|
-
await browser.keys(Key.ArrowDown);
|
|
84
80
|
await browser.keys(Key.Enter);
|
|
85
81
|
const results = await RowCO.getRows();
|
|
86
82
|
const filteredNames = await DSDataTableCO.getAllColumnResults(results, 2);
|
|
@@ -67,8 +67,6 @@ if (
|
|
|
67
67
|
});
|
|
68
68
|
it('02: should scroll to last row and pass axe-core', async () => {
|
|
69
69
|
await browser.keys(Key.End);
|
|
70
|
-
const lastRow = await RowCO.getRowAriaIndex(99);
|
|
71
|
-
await lastRow.waitForDisplayed();
|
|
72
70
|
const result = await axeCoreCheck();
|
|
73
71
|
await expect(result.length).toBe(0);
|
|
74
72
|
});
|
|
@@ -43,6 +43,15 @@ export default class DSComboboxMultiCO extends PageObject {
|
|
|
43
43
|
return $('[data-testid="combobox-ally-selected-values"]');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// MENU
|
|
47
|
+
static async getSelectAllCheckbox() {
|
|
48
|
+
return $('#select-all-checkbox');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static async getSelectedOptionsToggle() {
|
|
52
|
+
return $('[data-testid="combobox-selected-options-toggle"]');
|
|
53
|
+
}
|
|
54
|
+
|
|
46
55
|
static async getMenuList() {
|
|
47
56
|
return $('[data-testid="combobox-menu-list"]');
|
|
48
57
|
}
|
|
@@ -29,6 +29,16 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
29
29
|
);
|
|
30
30
|
await expect(snapshot).toEqual(0);
|
|
31
31
|
});
|
|
32
|
+
// eslint-disable-next-line max-len
|
|
33
|
+
it('03: After select-all, only enabled options are selected; pre-selected disabled/aria-disabled retain selection', async () => {
|
|
34
|
+
await browser.eyesOpen();
|
|
35
|
+
const selectAllBtn = await DSComboboxMultiCO.getSelectAllCheckbox();
|
|
36
|
+
await selectAllBtn.click();
|
|
37
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
38
|
+
DSComboboxMultiCO.snapshotPath('combobox-multi-aria-disabled-select-all-kb-nav'),
|
|
39
|
+
);
|
|
40
|
+
await expect(snapshot).toEqual(0);
|
|
41
|
+
});
|
|
32
42
|
it('04: first aria-disabled combobox should be focused', async () => {
|
|
33
43
|
await browser.eyesOpen();
|
|
34
44
|
await browser.keys(Key.Escape);
|
|
@@ -43,6 +43,15 @@ export default class DSComboboxSingleCO extends PageObject {
|
|
|
43
43
|
return $('[data-testid="combobox-ally-selected-values"]');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// MENU
|
|
47
|
+
static async getSelectAllCheckbox() {
|
|
48
|
+
return $('#select-all-checkbox');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static async getSelectedOptionsToggle() {
|
|
52
|
+
return $('[data-testid="combobox-selected-options-toggle"]');
|
|
53
|
+
}
|
|
54
|
+
|
|
46
55
|
static async getMenuList() {
|
|
47
56
|
return $('[data-testid="combobox-menu-list"]');
|
|
48
57
|
}
|
|
@@ -92,10 +92,6 @@ export default class DSFormLayoutBlockItemCO extends PageObject {
|
|
|
92
92
|
return $('[data-testid="ds-form-layout-block-item-error-message"]');
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
static async getFeedbackMessage() {
|
|
96
|
-
return $('[data-testid="ds-form-layout-block-item-message"]');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
95
|
static async getBlockContainersByIndex(index = 0) {
|
|
100
96
|
return $$('[data-testid="ds-form-layout-block-item-container"]')[index];
|
|
101
97
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import { axeCoreCheck } from '../helpers';
|
|
3
|
+
import DSMenuButtonCO from './DSMenuButtonCO';
|
|
4
|
+
import DSButtonV3CO from '../ds-button-v3/DSButtonV3CO';
|
|
5
|
+
|
|
6
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
7
|
+
describe('PUI-14642 - DSMenuButton:: Multi Select Menu Item - AxeCore', () => {
|
|
8
|
+
before('loading page', async () => {
|
|
9
|
+
const errorOnGo = await DSMenuButtonCO.multipleSelectMenuItem.go();
|
|
10
|
+
if (errorOnGo) throw errorOnGo;
|
|
11
|
+
});
|
|
12
|
+
it('01: should have untriggered menubutton and pass axe-core scan', async () => {
|
|
13
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
14
|
+
await menuTrigger.waitForDisplayed();
|
|
15
|
+
const result = await axeCoreCheck();
|
|
16
|
+
expect(result.length).toBe(0);
|
|
17
|
+
});
|
|
18
|
+
it('02: should have multi select menu with multiple opts selected and pass axe-core scan', async () => {
|
|
19
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
20
|
+
await menuTrigger.click();
|
|
21
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
22
|
+
await menuItem1.click();
|
|
23
|
+
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
24
|
+
await menuItem2.click();
|
|
25
|
+
const result = await axeCoreCheck();
|
|
26
|
+
expect(result.length).toBe(0);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe('PUI-14643 - DSMenuButton:: Single Select Menu Item - AxeCore', () => {
|
|
31
|
+
before('loading page', async () => {
|
|
32
|
+
const errorOnGo = await DSMenuButtonCO.singleSelectMenuItem.go();
|
|
33
|
+
if (errorOnGo) throw errorOnGo;
|
|
34
|
+
});
|
|
35
|
+
it('01: should have single menu (unselected) and pass axe-core scan', async () => {
|
|
36
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
37
|
+
await menuTrigger.click();
|
|
38
|
+
const result = await axeCoreCheck();
|
|
39
|
+
expect(result.length).toBe(0);
|
|
40
|
+
});
|
|
41
|
+
it('02: should have single menu (opt selected) and pass axe-core scan', async () => {
|
|
42
|
+
const menuTrigger = await DSButtonV3CO.getButton(); // axe-core scan closes the menu
|
|
43
|
+
await menuTrigger.click();
|
|
44
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
45
|
+
await menuItem1.click();
|
|
46
|
+
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
47
|
+
await menuItem2.click();
|
|
48
|
+
const result = await axeCoreCheck();
|
|
49
|
+
expect(result.length).toBe(0);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe('PUI-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
|
|
54
|
+
before('loading page', async () => {
|
|
55
|
+
const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
|
|
56
|
+
if (errorOnGo) throw errorOnGo;
|
|
57
|
+
});
|
|
58
|
+
it('01: should have menu with submenus and action menu items and pass axe-core scan', async () => {
|
|
59
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
60
|
+
await menuTrigger.click();
|
|
61
|
+
await browser.keys(Key.ArrowRight);
|
|
62
|
+
const result = await axeCoreCheck();
|
|
63
|
+
expect(result.length).toBe(0);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PATH_MENU_BUTTON } from '../../environments/storybook/paths';
|
|
2
2
|
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
3
|
|
|
4
4
|
export default class DSMenuButtonCO extends PageObject {
|
|
5
5
|
// Current supported examples: POC
|
|
6
|
-
static activableMenuItem = new Urlbuilder(
|
|
6
|
+
static activableMenuItem = new Urlbuilder(PATH_MENU_BUTTON, 'activable-menu-item');
|
|
7
7
|
|
|
8
|
-
static multipleSelectMenuItem = new Urlbuilder(
|
|
8
|
+
static multipleSelectMenuItem = new Urlbuilder(PATH_MENU_BUTTON, 'multiple-select-menu-item');
|
|
9
9
|
|
|
10
|
-
static singleSelectMenuItem = new Urlbuilder(
|
|
10
|
+
static singleSelectMenuItem = new Urlbuilder(PATH_MENU_BUTTON, 'single-select-menu-item');
|
|
11
11
|
|
|
12
|
-
static withSubmenuMenuItem = new Urlbuilder(
|
|
12
|
+
static withSubmenuMenuItem = new Urlbuilder(PATH_MENU_BUTTON, 'with-submenu-menu-item');
|
|
13
13
|
|
|
14
14
|
static async getMenuRoots() {
|
|
15
15
|
return $$('[data-testid="ds-flyout-menu-root"]');
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSMenuButtonCO from '../DSMenuButtonCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
4
5
|
import DSDialog from '../../ds-dialog/DSDialogCO';
|
|
5
6
|
import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
|
|
6
7
|
|
|
7
8
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
9
|
+
describe('PUI-14645 - DSMenuButton:: Activable Menu Item: Basic Mouse - Func', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSMenuButtonCO.activableMenuItem.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: should trigger first menuItem with MOUSE and have a dialog', async () => {
|
|
15
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
16
|
+
await menuTrigger.click();
|
|
17
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemByID('1');
|
|
18
|
+
await menuItem1.click();
|
|
19
|
+
const triggeredDialog = DSDialog.getDialog();
|
|
20
|
+
await expect(triggeredDialog).toBeDisplayed();
|
|
21
|
+
});
|
|
22
|
+
it('02: should trigger third menuItem with MOUSE and have a card', async () => {
|
|
23
|
+
await browser.keys(Key.Escape); // Closes dialog
|
|
24
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
25
|
+
await menuTrigger.click();
|
|
26
|
+
const menuItem3 = await DSMenuButtonCO.getMenuItemByID('3');
|
|
27
|
+
await menuItem3.click();
|
|
28
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
29
|
+
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
8
33
|
describe('PUI-14646 - DSMenuButton:: Activable Menu Item: Basic Keyboard - Func', () => {
|
|
9
34
|
before('loading page', async () => {
|
|
10
35
|
const errorOnGo = await DSMenuButtonCO.activableMenuItem.go();
|
|
@@ -17,7 +42,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
17
42
|
await browser.keys(Key.ArrowDown);
|
|
18
43
|
await browser.keys(Key.ArrowDown); // Iterated the focustrap
|
|
19
44
|
await browser.keys(Key.Return);
|
|
20
|
-
const triggeredDialog =
|
|
45
|
+
const triggeredDialog = DSDialog.getDialog();
|
|
21
46
|
const menu = await DSMenuButtonCO.getMenuRoot();
|
|
22
47
|
await expect(menu).not.toBeDisplayedInViewport();
|
|
23
48
|
await expect(triggeredDialog).toBeDisplayed();
|
|
@@ -1,9 +1,38 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSMenuButtonCO from '../DSMenuButtonCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
4
5
|
import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
|
|
5
6
|
|
|
6
7
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-14647 - DSMenuButton:: Multi Select Menu Item: Mouse - Func', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSMenuButtonCO.multipleSelectMenuItem.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
it('01: should select two items with MOUSE and have two cards (as produced changes)', async () => {
|
|
14
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
15
|
+
await menuTrigger.click();
|
|
16
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
17
|
+
await menuItem1.click();
|
|
18
|
+
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
19
|
+
await menuItem2.click();
|
|
20
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
21
|
+
await expect(triggeredCards).toEqual(3); // One card is already on this story containing the trigger (+1).
|
|
22
|
+
await expect(menuItem1).toHaveAttribute('aria-checked', 'true');
|
|
23
|
+
await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
|
|
24
|
+
});
|
|
25
|
+
it('02: should deselect an item with MOUSE and have one less card (as produced changes)', async () => {
|
|
26
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
27
|
+
await menuItem1.click();
|
|
28
|
+
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
29
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
30
|
+
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
31
|
+
await expect(menuItem1).toHaveAttribute('aria-checked', 'false');
|
|
32
|
+
await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
7
36
|
describe('PUI-14648 - DSMenuButton:: Multi Select Menu Item: Keyboard - Func', () => {
|
|
8
37
|
before('loading page', async () => {
|
|
9
38
|
const errorOnGo = await DSMenuButtonCO.multipleSelectMenuItem.go();
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSMenuButtonCO from '../DSMenuButtonCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
4
5
|
import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
|
|
5
6
|
|
|
6
7
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-14650 - DSMenuButton:: Single Select Menu Item: Mouse - Func', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSMenuButtonCO.singleSelectMenuItem.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
it('01: should select two items with MOUSE and have only last opt selected', async () => {
|
|
14
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
15
|
+
await menuTrigger.click();
|
|
16
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
17
|
+
await menuItem1.click();
|
|
18
|
+
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
19
|
+
await menuItem2.click();
|
|
20
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
21
|
+
const cardActiveFromOption = await (await DSCardV3CO.getHByLevel(2)).getText();
|
|
22
|
+
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
23
|
+
await expect(menuItem1).toHaveAttribute('aria-checked', 'false');
|
|
24
|
+
await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
|
|
25
|
+
await expect(cardActiveFromOption).toBe('Option 2');
|
|
26
|
+
});
|
|
27
|
+
it('02: should be able to pick two single options from different sections with MOUSE', async () => {
|
|
28
|
+
const menuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('3');
|
|
29
|
+
await menuItem3.click();
|
|
30
|
+
const menuItem4 = await DSMenuButtonCO.getMenuItemOptByIndex('4');
|
|
31
|
+
await browser.keys(Key.ArrowDown);
|
|
32
|
+
await browser.keys(Key.Space);
|
|
33
|
+
const menu = await DSMenuButtonCO.getMenuRoot();
|
|
34
|
+
await expect(menu).toBeDisplayedInViewport();
|
|
35
|
+
await expect(menuItem3).toHaveAttribute('aria-checked', 'true');
|
|
36
|
+
await expect(menuItem4).toHaveAttribute('aria-checked', 'true');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
7
40
|
describe('PUI-14649 - DSMenuButton:: Single Select Menu Item: Keyboard - Func', () => {
|
|
8
41
|
before('loading page', async () => {
|
|
9
42
|
const errorOnGo = await DSMenuButtonCO.singleSelectMenuItem.go();
|
|
@@ -11,40 +44,38 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
11
44
|
});
|
|
12
45
|
it('01: should select two options with KEYBOARD (space) and have only last opt selected', async () => {
|
|
13
46
|
await browser.keys(Key.Tab);
|
|
14
|
-
await browser.keys(Key.
|
|
15
|
-
|
|
16
|
-
await menu.waitForDisplayed();
|
|
47
|
+
await browser.keys(Key.Return);
|
|
48
|
+
await browser.keys(Key.Space);
|
|
17
49
|
await browser.keys(Key.ArrowDown);
|
|
18
50
|
await browser.keys(Key.Space);
|
|
19
51
|
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
20
52
|
const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
|
|
21
53
|
const menuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('3');
|
|
54
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
55
|
+
const cardActiveFromOption = await (await DSCardV3CO.getHByLevel(2)).getText();
|
|
56
|
+
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
22
57
|
await expect(menuItem1).toHaveAttribute('aria-checked', 'false');
|
|
23
58
|
await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
|
|
24
59
|
await expect(menuItem3).toHaveAttribute('aria-checked', 'false');
|
|
25
|
-
const triggeredCards = await (await DSCardV3CO.getCards()).length;
|
|
26
|
-
const cardActiveFromOption = await (await DSCardV3CO.getHByLevel(2)).getText();
|
|
27
|
-
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
28
60
|
await expect(cardActiveFromOption).toBe('Option 2');
|
|
29
61
|
});
|
|
30
62
|
it('02: should trigger option with KEYBOARD (return) and have only last opt selected (closed menu)', async () => {
|
|
31
|
-
await browser.keys(Key.
|
|
63
|
+
await browser.keys(Key.ArrowUp);
|
|
32
64
|
await browser.keys(Key.Return);
|
|
33
|
-
const triggeredCards =
|
|
65
|
+
const triggeredCards = (await DSCardV3CO.getCards()).length;
|
|
34
66
|
const cardsActiveFromOption = await (await DSCardV3CO.getHByLevel(2)).getText();
|
|
35
67
|
const menu = await DSMenuButtonCO.getMenuRoot();
|
|
36
68
|
await expect(menu).not.toBeDisplayedInViewport();
|
|
37
69
|
await expect(triggeredCards).toEqual(2); // One card is already on this story containing the trigger (+1).
|
|
38
|
-
await expect(cardsActiveFromOption).toBe('Option
|
|
70
|
+
await expect(cardsActiveFromOption).toBe('Option 1');
|
|
39
71
|
});
|
|
40
72
|
it('03: should be able to pick two single options from different sections with KEYBOARD', async () => {
|
|
73
|
+
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
41
74
|
await browser.keys(Key.Return);
|
|
42
|
-
await browser.keys(Key.Space);
|
|
43
75
|
await browser.keys(Key.ArrowDown);
|
|
44
76
|
await browser.keys(Key.ArrowDown);
|
|
45
77
|
await browser.keys(Key.ArrowDown);
|
|
46
78
|
await browser.keys(Key.Space);
|
|
47
|
-
const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
|
|
48
79
|
const menuItem4 = await DSMenuButtonCO.getMenuItemOptByIndex('4');
|
|
49
80
|
const menu = await DSMenuButtonCO.getMenuRoot();
|
|
50
81
|
await expect(menu).toBeDisplayedInViewport();
|
|
@@ -2,9 +2,46 @@
|
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSMenuButtonCO from '../DSMenuButtonCO';
|
|
4
4
|
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
5
|
+
import DSDialog from '../../ds-dialog/DSDialogCO';
|
|
5
6
|
import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
|
|
7
|
+
import { mouseOver } from '../../helpers';
|
|
6
8
|
|
|
7
9
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
10
|
+
describe('PUI-14651 - DSMenuButton:: Submenu Menu Item - Func', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: should trigger menu and have first option focused first submenu expanded', async () => {
|
|
16
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
17
|
+
await menuTrigger.click();
|
|
18
|
+
const subMenuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1.1');
|
|
19
|
+
const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('1.2');
|
|
20
|
+
const subMenuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('1.3');
|
|
21
|
+
await expect(subMenuItem1).toBeDisplayed();
|
|
22
|
+
await expect(subMenuItem2).toBeDisplayed();
|
|
23
|
+
await expect(subMenuItem3).toBeDisplayed();
|
|
24
|
+
});
|
|
25
|
+
it('02: should hover third option with MOUSE to have third submenu expanded', async () => {
|
|
26
|
+
const menuItem = await DSMenuButtonCO.getMenuItemOptByIndex('3');
|
|
27
|
+
await mouseOver(menuItem);
|
|
28
|
+
const subMenuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('3.1');
|
|
29
|
+
const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('3.2');
|
|
30
|
+
const subMenuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('3.3');
|
|
31
|
+
const subMenuItemPrevious = await DSMenuButtonCO.getMenuItemOptByIndex('1.1');
|
|
32
|
+
await expect(subMenuItemPrevious).not.toBeDisplayed();
|
|
33
|
+
await expect(subMenuItem1).toBeDisplayed();
|
|
34
|
+
await expect(subMenuItem2).toBeDisplayed();
|
|
35
|
+
await expect(subMenuItem3).toBeDisplayed();
|
|
36
|
+
});
|
|
37
|
+
it('03: should trigger a submenu action with mouse', async () => {
|
|
38
|
+
const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('3.1');
|
|
39
|
+
await subMenuItem2.click();
|
|
40
|
+
const triggeredDialog = DSDialog.getDialog();
|
|
41
|
+
await expect(triggeredDialog).toBeDisplayed();
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
8
45
|
describe('PUI-14652 - DSMenuButton:: Submenu Menu Item: Keyboard - Func', () => {
|
|
9
46
|
before('loading page', async () => {
|
|
10
47
|
const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
|
|
@@ -43,7 +80,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
43
80
|
beforeEach('loading page', async () => {
|
|
44
81
|
const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
|
|
45
82
|
if (errorOnGo) throw errorOnGo;
|
|
46
|
-
const menuTrigger = await DSButtonV3CO.
|
|
83
|
+
const menuTrigger = await DSButtonV3CO.getButton();
|
|
47
84
|
await menuTrigger.waitForDisplayed();
|
|
48
85
|
await browser.keys(Key.Tab);
|
|
49
86
|
await browser.keys(Key.Return);
|
|
@@ -15,13 +15,13 @@ if (
|
|
|
15
15
|
if (errorOnGo) throw errorOnGo;
|
|
16
16
|
});
|
|
17
17
|
it('01: Evaluate dropdown pills accessibility with axe-core', async () => {
|
|
18
|
-
const dropDownTrigger = await DSPillsV2CO.
|
|
18
|
+
const dropDownTrigger = await DSPillsV2CO.getChevronbyIndex(1);
|
|
19
19
|
await dropDownTrigger.waitForDisplayed();
|
|
20
20
|
const result = await axeCoreCheck();
|
|
21
21
|
expect(result.length).toBe(0);
|
|
22
22
|
});
|
|
23
23
|
it('02: Evaluate dropdown pills accessibility with axe-core - dropdown menu opened', async () => {
|
|
24
|
-
const dropDownTrigger = await DSPillsV2CO.
|
|
24
|
+
const dropDownTrigger = await DSPillsV2CO.getChevronbyIndex(1);
|
|
25
25
|
await dropDownTrigger.click();
|
|
26
26
|
const dropDownMenu = await DSPillsV2CO.dropDownMenu();
|
|
27
27
|
await dropDownMenu.waitForDisplayed();
|
|
@@ -11,7 +11,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
11
11
|
if (errorOnGo) throw errorOnGo;
|
|
12
12
|
});
|
|
13
13
|
it('should correctly display the dropdown pills', async () => {
|
|
14
|
-
const dropDownTrigger = await DSPillsV2CO.
|
|
14
|
+
const dropDownTrigger = await DSPillsV2CO.getChevronbyIndex(1);
|
|
15
15
|
await dropDownTrigger.click();
|
|
16
16
|
const snapshot = await browser.checkSnapshot(DSPillsV2CO.snapshotPath('pills-v2-dropdown'));
|
|
17
17
|
await expect(snapshot).toEqual(0);
|
|
@@ -21,12 +21,6 @@ export default class DSPillsV2CO extends PageObject {
|
|
|
21
21
|
|
|
22
22
|
static applyTooltipOverflowWrap = new Urlbuilder(PATH_E2E_PILLS_V2, 'pui-14447-tooltip-overflow');
|
|
23
23
|
|
|
24
|
-
static requiredSelectMB = new Urlbuilder(PATH_E2E_PILLS_V2, 'required-select-menu-button-test');
|
|
25
|
-
|
|
26
|
-
static singleSelectMB = new Urlbuilder(PATH_E2E_PILLS_V2, 'single-select-menu-button-test');
|
|
27
|
-
|
|
28
|
-
static multiSelectMB = new Urlbuilder(PATH_E2E_PILLS_V2, 'multi-select-menu-button-test');
|
|
29
|
-
|
|
30
24
|
static getUrl(component = 'basic') {
|
|
31
25
|
return PageObject.getUrl(PATH_E2E_PILLS_V2, component);
|
|
32
26
|
}
|
|
@@ -41,11 +35,7 @@ export default class DSPillsV2CO extends PageObject {
|
|
|
41
35
|
return $$('[data-testid="ds-pill-dropdown-chevron"]');
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
static
|
|
45
|
-
|
|
46
|
-
static async getMBChevronByIndex(index = 0) {
|
|
47
|
-
return $$('[data-testid="ds-pill-menu-button-chevron"]')[index];
|
|
48
|
-
}
|
|
38
|
+
static getChevronbyIndex = async (index) => getElementByIndex(this.getDDChevrons, index);
|
|
49
39
|
|
|
50
40
|
static async getInputs() {
|
|
51
41
|
return $$('[data-testid="ds-pill-input"]');
|
|
@@ -65,10 +55,6 @@ export default class DSPillsV2CO extends PageObject {
|
|
|
65
55
|
|
|
66
56
|
static getPillByIndex = async (index) => getElementByIndex(this.getPills, index);
|
|
67
57
|
|
|
68
|
-
static async getPillsTextByIndex(index = 0) {
|
|
69
|
-
return $$('[data-testid="ds-pill-wrapper"] [data-testid="DS-SimpleTruncateText"]')[index];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
58
|
static async getResetBtn() {
|
|
73
59
|
return $('[data-testid="ds-button"]');
|
|
74
60
|
}
|