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.
Files changed (56) hide show
  1. package/CHANGELOG.md +321 -227
  2. package/ds-breadcrumb/DSBreadcrumb.visual.spec.js +13 -18
  3. package/ds-button-v3/DSButtonV3CO.js +0 -4
  4. package/ds-controlled-form/ds-combobox/DSCombobox.func.spec.js +0 -1
  5. package/ds-controlled-form/ds-combobox/DSCombobox.smoke.spec.js +56 -4
  6. package/ds-controlled-form/ds-combobox/DSComboboxCO.js +9 -0
  7. package/ds-controlled-form/ds-combobox/creatable/DSCombobox.keyboard-creatable.func.spec.js +0 -3
  8. package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.axe-core.spec.js +1 -0
  9. package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.keyboard.func.spec.js +0 -3
  10. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.keyboard-multi-select.func.spec.js +68 -5
  11. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.mouse-touch-multi-select.func.spec.js +58 -0
  12. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.multi.visual.spec.js +16 -0
  13. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.ten-thousand-options.func.spec.js +22 -2
  14. package/ds-controlled-form/ds-combobox/single-select/DSCombobox.keyboard-single-select.func.spec.js +0 -3
  15. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.DateInput.visual.spec.js +57 -0
  16. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePickerCO.js +2 -54
  17. package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +0 -4
  18. package/ds-controlled-form/ds-controlled-inputgroup/combobox/DSControlledInputGroup.combobox.axe-core.func.spec.js +1 -1
  19. package/ds-data-table-async/DSDataTable.smoke.spec.js +0 -4
  20. package/ds-data-table-async/filters/DSDataTable.filters-creatable.func.spec.js +0 -4
  21. package/ds-data-table-async/select/DSDataTable.select.axe-core.func.spec.js +0 -2
  22. package/ds-form-combobox-multi/DSComboboxMultiCO.js +9 -0
  23. package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +10 -0
  24. package/ds-form-combobox-single/DSComboboxSingleCO.js +9 -0
  25. package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +0 -4
  26. package/ds-menu-button/DSMenuButton.axe-core.func.spec.js +66 -0
  27. package/ds-menu-button/DSMenuButtonCO.js +5 -5
  28. package/ds-menu-button/{activable/DSMenuButton.activableMenuItem.keyboardnav.func.spec.js → basic/DSMenuButton.activableMenuItem.func.spec.js} +26 -1
  29. package/ds-menu-button/{multiselect/DSMenuButton.multiSelectItem.keyboardnav.func.spec.js → basic/DSMenuButton.multiSelectItem.func.spec.js} +29 -0
  30. package/ds-menu-button/{singleSelect/DSMenuButton.singleSelectItem.keyboardnav.func.spec.js → basic/DSMenuButton.singleSelectItem.func.spec.js} +42 -11
  31. package/ds-menu-button/{submenu/DSMenuButton.subMenuItem.keyboardnav.func.spec.js → basic/DSMenuButton.subMenuItem.func.spec.js} +38 -1
  32. package/ds-pills-v2/DSPills.axe-core.func.spec.js +2 -2
  33. package/ds-pills-v2/DSPills.visual.spec.js +1 -1
  34. package/ds-pills-v2/DSPillsV2CO.js +1 -15
  35. package/ds-shuttle-v2/DSShuttleV2CO.js +4 -2
  36. package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +66 -46
  37. package/ds-shuttle-v2/drillingdown/DSShuttleV2.drilldown.kb.func.spec.js +5 -3
  38. package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +7 -1
  39. package/ds-shuttle-v2/globalcheckbox/DSShuttleV2.globalcheckbox.kb.func.spec.js +2 -0
  40. package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +2 -0
  41. package/ds-toggle/DSToggle.func.spec.js +18 -21
  42. package/ds-toggle/DSToggle.visual.spec.js +12 -36
  43. package/package.json +119 -119
  44. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.axe-core.spec.js +0 -85
  45. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.functional.spec.js +0 -242
  46. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.visual.spec.js +0 -115
  47. package/ds-menu-button/activable/DSMenuButton.activableMenuItem.func.spec.js +0 -32
  48. package/ds-menu-button/multiselect/DSMenuButton.axe-core.multiselect.func.spec.js +0 -28
  49. package/ds-menu-button/multiselect/DSMenuButton.multiSelectItem.func.spec.js +0 -34
  50. package/ds-menu-button/singleSelect/DSMenuButton.axe-core.singleSelect.func.spec.js +0 -28
  51. package/ds-menu-button/singleSelect/DSMenuButton.singleSelectItem.func.spec.js +0 -39
  52. package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +0 -20
  53. package/ds-menu-button/submenu/DSMenuButton.subMenuItem.func.spec.js +0 -42
  54. package/ds-pills-v2/selection/DSPills.axe-core.func.spec.js +0 -77
  55. package/ds-pills-v2/selection/DSPills.func.spec.js +0 -155
  56. package/ds-pills-v2/selection/DSPills.visual.spec.js +0 -72
@@ -1,115 +0,0 @@
1
- import { Key } from 'webdriverio';
2
- import DSControlledDateRangePickerCO from './DSControlledDateRangePickerCO';
3
- import { type } from '../../helpers';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
- describe('PUI-9219 - DSControlledDateRangePicker:: Basic -Visual', () => {
7
- before('loading page', async () => {
8
- const errorOnGo = await DSControlledDateRangePickerCO.basic.go();
9
- if (errorOnGo) throw errorOnGo;
10
- });
11
- it('01: should display contr. date range picker empty and closed', async () => {
12
- await browser.eyesOpen();
13
- const snapshot = await browser.eyesCheckSnapshot(
14
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-empty'),
15
- );
16
- await expect(snapshot).toEqual(0);
17
- });
18
- it('02: should display contr. date range picker open and with 1 date selected', async () => {
19
- await browser.eyesOpen();
20
- const openDatePicker = await DSControlledDateRangePickerCO.getPickerBtn();
21
- await openDatePicker.click();
22
- const day = await DSControlledDateRangePickerCO.getDayOnCalendarByIndex(10);
23
- await day.click();
24
- const snapshot = await browser.eyesCheckSnapshot(
25
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-one-date'),
26
- );
27
- await expect(snapshot).toEqual(0);
28
- });
29
- it('03: should display contr. date range picker open and with 2 dates selected', async () => {
30
- await browser.eyesOpen();
31
- const day = await DSControlledDateRangePickerCO.getDayOnCalendarByIndex(20);
32
- await day.click();
33
- const snapshot = await browser.eyesCheckSnapshot(
34
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-two-date'),
35
- );
36
- await expect(snapshot).toEqual(0);
37
- });
38
- it('04: should display contr. date range picker open and with long range end', async () => {
39
- await browser.eyesOpen();
40
- const nextMonthArrow = await DSControlledDateRangePickerCO.getNextMonthBtn();
41
- await nextMonthArrow.click();
42
- const day = await DSControlledDateRangePickerCO.getDayOnCalendarByIndex(10);
43
- await day.click();
44
- const snapshot = await browser.eyesCheckSnapshot(
45
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-long-end'),
46
- );
47
- await expect(snapshot).toEqual(0);
48
- });
49
- it('05: should display contr. date range picker open and with long range start', async () => {
50
- await browser.eyesOpen();
51
- const prevMonthArrow = await DSControlledDateRangePickerCO.getPrevMonthBtn();
52
- await prevMonthArrow.click();
53
- const snapshot = await browser.eyesCheckSnapshot(
54
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-long-start'),
55
- );
56
- await expect(snapshot).toEqual(0);
57
- });
58
- });
59
-
60
- describe('PUI-14859 - DSControlledDateRangePicker:: Invalid selection -Visual', () => {
61
- before('loading page', async () => {
62
- const errorOnGo = await DSControlledDateRangePickerCO.invalidSelection.go();
63
- if (errorOnGo) throw errorOnGo;
64
- });
65
- it('01: should display invalid date range picker with closed calendar matching baseline', async () => {
66
- const calendarTrigger = await DSControlledDateRangePickerCO.getPickerBtn();
67
- await calendarTrigger.waitForDisplayed();
68
- const snapshot = await browser.eyesCheckSnapshot(
69
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-invalid-close'),
70
- );
71
- await expect(snapshot).toEqual(0);
72
- });
73
- it('02: should display invalid date range picker with expanded calendar matching baseline', async () => {
74
- const calendarTrigger = await DSControlledDateRangePickerCO.getPickerBtn();
75
- await calendarTrigger.click();
76
- const snapshot = await browser.eyesCheckSnapshot(
77
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-invalid-open'),
78
- );
79
- await expect(snapshot).toEqual(0);
80
- });
81
- });
82
-
83
- describe('PUI-14858 - DSControlledDateRangePicker:: Disabled -Visual', () => {
84
- before('loading page', async () => {
85
- const errorOnGo = await DSControlledDateRangePickerCO.disabled.go();
86
- if (errorOnGo) throw errorOnGo;
87
- });
88
- it('01: should display disabled date range picker and matching baseline', async () => {
89
- const calendarTrigger = await DSControlledDateRangePickerCO.getPickerBtn();
90
- await calendarTrigger.waitForDisplayed();
91
- const snapshot = await browser.eyesCheckSnapshot(
92
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-disabled'),
93
- );
94
- await expect(snapshot).toEqual(0);
95
- });
96
- });
97
-
98
- describe('PUI-14857 - DSControlledDateRangePicker:: Clearable -Visual', () => {
99
- before('loading page', async () => {
100
- const errorOnGo = await DSControlledDateRangePickerCO.clearable.go();
101
- if (errorOnGo) throw errorOnGo;
102
- });
103
- it('01: should display two clearable inputs. One populated, one empty', async () => {
104
- const calendarTrigger = await DSControlledDateRangePickerCO.getPickerBtn();
105
- await calendarTrigger.waitForDisplayed();
106
- await browser.keys(Key.Tab);
107
- await browser.keys(Key.Tab);
108
- await type('02032020');
109
- const snapshot = await browser.eyesCheckSnapshot(
110
- DSControlledDateRangePickerCO.snapshotPath('date-range-picker-clearable'),
111
- );
112
- await expect(snapshot).toEqual(0);
113
- });
114
- });
115
- }
@@ -1,32 +0,0 @@
1
- /* eslint-disable max-statements */
2
- import { Key } from 'webdriverio';
3
- import DSMenuButtonCO from '../DSMenuButtonCO';
4
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
5
- import DSDialog from '../../ds-dialog/DSDialogCO';
6
- import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
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.getButtonByLabel('Actions example');
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.getButtonByLabel('Actions example');
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
- }
@@ -1,28 +0,0 @@
1
- import { axeCoreCheck } from '../../helpers';
2
- import DSMenuButtonCO from '../DSMenuButtonCO';
3
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
- describe('PUI-14642 - DSMenuButton:: Multi Select Menu Item - AxeCore', () => {
7
- before('loading page', async () => {
8
- const errorOnGo = await DSMenuButtonCO.multipleSelectMenuItem.go();
9
- if (errorOnGo) throw errorOnGo;
10
- });
11
- it('01: should have untriggered menubutton and pass axe-core scan', async () => {
12
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('Multiple selection example');
13
- await menuTrigger.waitForDisplayed();
14
- const result = await axeCoreCheck({ selector: "[data-testid='ds-card-v3-root']" });
15
- expect(result.length).toBe(0);
16
- });
17
- it('02: should have multi select menu with multiple opts selected and pass axe-core scan', async () => {
18
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('Multiple selection example');
19
- await menuTrigger.click();
20
- const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
21
- await menuItem1.click();
22
- const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
23
- await menuItem2.click();
24
- const result = await axeCoreCheck({ selector: "[data-testid='ds-card-v3-root']" });
25
- expect(result.length).toBe(0);
26
- });
27
- });
28
- }
@@ -1,34 +0,0 @@
1
- /* eslint-disable max-statements */
2
- import DSMenuButtonCO from '../DSMenuButtonCO';
3
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
4
- import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
5
-
6
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
- describe('PUI-14647 - DSMenuButton:: Multi Select Menu Item: Mouse - Func', () => {
8
- before('loading page', async () => {
9
- const errorOnGo = await DSMenuButtonCO.multipleSelectMenuItem.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should select two items with MOUSE and have two cards (as produced changes)', async () => {
13
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('Multiple selection example');
14
- await menuTrigger.click();
15
- const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
16
- await menuItem1.click();
17
- const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
18
- await menuItem2.click();
19
- const triggeredCards = (await DSCardV3CO.getCards()).length;
20
- await expect(triggeredCards).toEqual(3); // One card is already on this story containing the trigger (+1).
21
- await expect(menuItem1).toHaveAttribute('aria-checked', 'true');
22
- await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
23
- });
24
- it('02: should deselect an item with MOUSE and have one less card (as produced changes)', async () => {
25
- const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
26
- await menuItem1.click();
27
- const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
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
- await expect(menuItem1).toHaveAttribute('aria-checked', 'false');
31
- await expect(menuItem2).toHaveAttribute('aria-checked', 'true');
32
- });
33
- });
34
- }
@@ -1,28 +0,0 @@
1
- import { axeCoreCheck } from '../../helpers';
2
- import DSMenuButtonCO from '../DSMenuButtonCO';
3
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
- describe('PUI-14643 - DSMenuButton:: Single Select Menu Item - AxeCore', () => {
7
- before('loading page', async () => {
8
- const errorOnGo = await DSMenuButtonCO.singleSelectMenuItem.go();
9
- if (errorOnGo) throw errorOnGo;
10
- });
11
- it('01: should have single menu (unselected) and pass axe-core scan', async () => {
12
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('(multiple) Single selection example');
13
- await menuTrigger.click();
14
- const result = await axeCoreCheck({ selector: "[data-testid='ds-card-v3-root']" });
15
- expect(result.length).toBe(0);
16
- });
17
- it('02: should have single menu (opt selected) and pass axe-core scan', async () => {
18
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('(multiple) Single selection example');
19
- await menuTrigger.click();
20
- const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1');
21
- await menuItem1.click();
22
- const menuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('2');
23
- await menuItem2.click();
24
- const result = await axeCoreCheck({ selector: "[data-testid='ds-card-v3-root']" });
25
- expect(result.length).toBe(0);
26
- });
27
- });
28
- }
@@ -1,39 +0,0 @@
1
- /* eslint-disable max-statements */
2
- import { Key } from 'webdriverio';
3
- import DSMenuButtonCO from '../DSMenuButtonCO';
4
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
5
- import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
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.getButtonByLabel('(multiple) Single selection example');
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
- }
@@ -1,20 +0,0 @@
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-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
8
- before('loading page', async () => {
9
- const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should have menu with submenus and action menu items and pass axe-core scan', async () => {
13
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('Submenus example');
14
- await menuTrigger.click();
15
- await browser.keys(Key.ArrowRight);
16
- const result = await axeCoreCheck({ selector: "[data-testid='ds-card-v3-root']" });
17
- expect(result.length).toBe(0);
18
- });
19
- });
20
- }
@@ -1,42 +0,0 @@
1
- /* eslint-disable max-statements */
2
- import DSMenuButtonCO from '../DSMenuButtonCO';
3
- import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
4
- import DSDialog from '../../ds-dialog/DSDialogCO';
5
- import { mouseOver } from '../../helpers';
6
-
7
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
8
- describe('PUI-14651 - DSMenuButton:: Submenu Menu Item - Func', () => {
9
- before('loading page', async () => {
10
- const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
11
- if (errorOnGo) throw errorOnGo;
12
- });
13
- it('01: should trigger menu and have first option focused first submenu expanded', async () => {
14
- const menuTrigger = await DSButtonV3CO.getButtonByLabel('Submenus example');
15
- await menuTrigger.click();
16
- const subMenuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('1.1');
17
- const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('1.2');
18
- const subMenuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('1.3');
19
- await expect(subMenuItem1).toBeDisplayed();
20
- await expect(subMenuItem2).toBeDisplayed();
21
- await expect(subMenuItem3).toBeDisplayed();
22
- });
23
- it('02: should hover third option with MOUSE to have third submenu expanded', async () => {
24
- const menuItem = await DSMenuButtonCO.getMenuItemOptByIndex('3');
25
- await mouseOver(menuItem);
26
- const subMenuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex('3.1');
27
- const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('3.2');
28
- const subMenuItem3 = await DSMenuButtonCO.getMenuItemOptByIndex('3.3');
29
- const subMenuItemPrevious = await DSMenuButtonCO.getMenuItemOptByIndex('1.1');
30
- await expect(subMenuItemPrevious).not.toBeDisplayed();
31
- await expect(subMenuItem1).toBeDisplayed();
32
- await expect(subMenuItem2).toBeDisplayed();
33
- await expect(subMenuItem3).toBeDisplayed();
34
- });
35
- it('03: should trigger a submenu action with mouse', async () => {
36
- const subMenuItem2 = await DSMenuButtonCO.getMenuItemOptByIndex('3.1');
37
- await subMenuItem2.click();
38
- const triggeredDialog = DSDialog.getDialog();
39
- await expect(triggeredDialog).toBeDisplayed();
40
- });
41
- });
42
- }
@@ -1,77 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { Key } from 'webdriverio';
3
- import DSPillsV2CO from '../DSPillsV2CO';
4
- import { axeCoreCheck } from '../../helpers';
5
-
6
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
- describe('PUI-14708 - PillsV2 Selection: Single Select -AxeCore', () => {
8
- before('loading page', async () => {
9
- const errorOnGo = await DSPillsV2CO.singleSelectMB.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should have a pill with expanded single select menu, unselected, and pass axe-core scan', async () => {
13
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
14
- await menuTrigger.click();
15
- const result = await axeCoreCheck();
16
- expect(result.length).toBe(0);
17
- });
18
- it('02: should have a pill with expanded single select menu, selected, and pass axe-core scan', async () => {
19
- await browser.keys(Key.ArrowDown);
20
- await browser.keys(Key.Space);
21
- const result = await axeCoreCheck();
22
- expect(result.length).toBe(0);
23
- });
24
- });
25
-
26
- describe('PUI-14713 - PillsV2 Selection: Required Select -AxeCore', () => {
27
- before('loading page', async () => {
28
- const errorOnGo = await DSPillsV2CO.requiredSelectMB.go();
29
- if (errorOnGo) throw errorOnGo;
30
- });
31
- it('01: should have a pill with one required option selected (single) and pass axe-core scan', async () => {
32
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
33
- await menuTrigger.click();
34
- const result = await axeCoreCheck();
35
- expect(result.length).toBe(0);
36
- });
37
- it('02: should have a pill with one required option selected (multi) and pass axe-core scan', async () => {
38
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(1);
39
- await menuTrigger.click();
40
- const result = await axeCoreCheck();
41
- expect(result.length).toBe(0);
42
- });
43
- it('03: should have a pill with two optional options selected and pass axe-core scan', async () => {
44
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(1);
45
- await menuTrigger.click();
46
- await browser.keys(Key.ArrowDown);
47
- await browser.keys(Key.Space);
48
- await browser.keys(Key.ArrowDown);
49
- await browser.keys(Key.Space);
50
- await browser.keys(Key.ArrowDown);
51
- await browser.keys(Key.Space);
52
- const result = await axeCoreCheck();
53
- expect(result.length).toBe(0);
54
- });
55
- });
56
-
57
- describe('PUI-14710 - PillsV2 Selection: Multi Selec -AxeCore', () => {
58
- before('loading page', async () => {
59
- const errorOnGo = await DSPillsV2CO.multiSelectMB.go();
60
- if (errorOnGo) throw errorOnGo;
61
- });
62
- it('01: should have a pill with multi select menu, unselected, and pass axe-core scan', async () => {
63
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
64
- await menuTrigger.click();
65
- const result = await axeCoreCheck();
66
- expect(result.length).toBe(0);
67
- });
68
- it('02: should have a pill with multi select menu, multi opts selected, and pass axe-core scan', async () => {
69
- await browser.keys(Key.ArrowDown);
70
- await browser.keys(Key.Space);
71
- await browser.keys(Key.ArrowDown);
72
- await browser.keys(Key.Space);
73
- const result = await axeCoreCheck();
74
- expect(result.length).toBe(0);
75
- });
76
- });
77
- }
@@ -1,155 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { Key } from 'webdriverio';
3
- import DSPillsV2CO from '../DSPillsV2CO';
4
- import DSMenuButtonCO from '../../ds-menu-button/DSMenuButtonCO';
5
-
6
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
- describe('PUI-14703 - Pills v2: Selection: KB, multi', () => {
8
- before('loading page', async () => {
9
- const errorOnGo = await DSPillsV2CO.multiSelectMB.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should have multi select expanded, no selection, no minipill', async () => {
13
- await browser.keys(Key.Tab);
14
- await browser.keys(Key.Return);
15
- const pills = await DSPillsV2CO.getPills();
16
- const howManyPills = pills.length;
17
- const menu = await DSMenuButtonCO.getMenuRoot();
18
- await expect(menu).toBeDisplayedInViewport();
19
- await expect(howManyPills).toEqual(1); // The selection pill, no values pills displayed
20
- });
21
- it('02: should have multi select with two options selected, expanded, with two minipills', async () => {
22
- await browser.keys(Key.ArrowDown);
23
- await browser.keys(Key.Space);
24
- await browser.keys(Key.ArrowDown);
25
- await browser.keys(Key.Space);
26
- const pills = await DSPillsV2CO.getPills();
27
- const howManyPills = pills.length;
28
- const menu = await DSMenuButtonCO.getMenuRoot();
29
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
30
- const minipillLabel2 = await (await DSPillsV2CO.getPillsTextByIndex(2)).getText();
31
- await expect(minipillLabel1).toEqual('Bold');
32
- await expect(minipillLabel2).toEqual('Underlined');
33
- await expect(menu).toBeDisplayedInViewport();
34
- await expect(howManyPills).toEqual(3);
35
- });
36
- });
37
-
38
- describe('PUI-14702 - Pills v2: Selection: MOUSE, single', () => {
39
- before('loading page', async () => {
40
- const errorOnGo = await DSPillsV2CO.singleSelectMB.go();
41
- if (errorOnGo) throw errorOnGo;
42
- });
43
- it('01: should have single select menu expanded, no options selected, no minipills', async () => {
44
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
45
- await menuTrigger.click();
46
- const pills = await DSPillsV2CO.getPills();
47
- const howManyPills = pills.length;
48
- const menu = await DSMenuButtonCO.getMenuRoot();
49
- await expect(menu).toBeDisplayedInViewport();
50
- await expect(howManyPills).toEqual(1); //
51
- });
52
- it('02: should select one option, and get its minipill. Menu stays open', async () => {
53
- const optionRed = await DSMenuButtonCO.getMenuItemWrapper(0);
54
- await optionRed.click();
55
- const pills = await DSPillsV2CO.getPills();
56
- const howManyPills = pills.length;
57
- const menu = await DSMenuButtonCO.getMenuRoot();
58
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
59
- await expect(optionRed).toHaveAttribute('aria-checked', 'true');
60
- await expect(minipillLabel1).toEqual('Red');
61
- await expect(menu).toBeDisplayedInViewport();
62
- await expect(howManyPills).toEqual(2);
63
- });
64
- });
65
-
66
- describe('PUI-14707 - Pills v2: Selection: REQUIRED, single', () => {
67
- before('loading page', async () => {
68
- const errorOnGo = await DSPillsV2CO.requiredSelectMB.go();
69
- if (errorOnGo) throw errorOnGo;
70
- });
71
- it('01: should expand required single select and have one option select by default', async () => {
72
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
73
- await menuTrigger.click();
74
- const optionBlack = await DSMenuButtonCO.getMenuItemWrapper(0);
75
- const pills = await DSPillsV2CO.getPills();
76
- const howManyPills = pills.length;
77
- const menu = await DSMenuButtonCO.getMenuRoot();
78
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
79
- await expect(optionBlack).toHaveAttribute('aria-checked', 'true');
80
- await expect(minipillLabel1).toEqual('Black');
81
- await expect(menu).toBeDisplayedInViewport();
82
- await expect(howManyPills).toEqual(4);
83
- });
84
- it('02: should select antoher option, unselecting the first one and changing the minipill', async () => {
85
- const optionBlack = await DSMenuButtonCO.getMenuItemWrapper(0);
86
- const optionRed = await DSMenuButtonCO.getMenuItemWrapper(1);
87
- await optionRed.click();
88
- const pills = await DSPillsV2CO.getPills();
89
- const howManyPills = pills.length;
90
- const menu = await DSMenuButtonCO.getMenuRoot();
91
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
92
- await expect(optionBlack).toHaveAttribute('aria-checked', 'false');
93
- await expect(optionRed).toHaveAttribute('aria-checked', 'true');
94
- await expect(minipillLabel1).toEqual('Red');
95
- await expect(menu).toBeDisplayedInViewport();
96
- await expect(howManyPills).toEqual(4);
97
- });
98
- it('03: should NOT be able to unselect an option without selecting another one', async () => {
99
- const optionRed = await DSMenuButtonCO.getMenuItemWrapper(1);
100
- await optionRed.click();
101
- await expect(optionRed).toHaveAttribute('aria-checked', 'true');
102
- });
103
- });
104
-
105
- describe('PUI-14705 - Pills v2: Selection: REQUIRED, multi', () => {
106
- before('loading page', async () => {
107
- const errorOnGo = await DSPillsV2CO.requiredSelectMB.go();
108
- if (errorOnGo) throw errorOnGo;
109
- });
110
- it('01: should not be able to unselect the only selected option by default', async () => {
111
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(1);
112
- await menuTrigger.click();
113
- const optionItalic = await DSMenuButtonCO.getMenuItemWrapper(0);
114
- await browser.keys(Key.Space); // tries to unselect
115
- const pills = await DSPillsV2CO.getPills();
116
- const howManyPills = pills.length;
117
- const menu = await DSMenuButtonCO.getMenuRoot();
118
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(3)).getText();
119
- await expect(optionItalic).toHaveAttribute('aria-checked', 'true');
120
- await expect(minipillLabel1).toEqual('Italic');
121
- await expect(menu).toBeDisplayedInViewport();
122
- await expect(howManyPills).toEqual(4);
123
- });
124
- it('02: should be able to select another option keeping the first one selected', async () => {
125
- const optionBold = await DSMenuButtonCO.getMenuItemWrapper(1);
126
- await optionBold.click();
127
- const optionItalic = await DSMenuButtonCO.getMenuItemWrapper(0);
128
- const pills = await DSPillsV2CO.getPills();
129
- const howManyPills = pills.length;
130
- const menu = await DSMenuButtonCO.getMenuRoot();
131
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(3)).getText();
132
- const minipillLabel2 = await (await DSPillsV2CO.getPillsTextByIndex(4)).getText();
133
- await expect(optionItalic).toHaveAttribute('aria-checked', 'true');
134
- await expect(optionBold).toHaveAttribute('aria-checked', 'true');
135
- await expect(minipillLabel1).toEqual('Italic');
136
- await expect(minipillLabel2).toEqual('Bold');
137
- await expect(menu).toBeDisplayedInViewport();
138
- await expect(howManyPills).toEqual(5);
139
- });
140
- it('03: should now be able to unselect the first option', async () => {
141
- const optionBold = await DSMenuButtonCO.getMenuItemWrapper(1);
142
- const optionItalic = await DSMenuButtonCO.getMenuItemWrapper(0);
143
- await optionItalic.click();
144
- const pills = await DSPillsV2CO.getPills();
145
- const howManyPills = pills.length;
146
- const menu = await DSMenuButtonCO.getMenuRoot();
147
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(3)).getText();
148
- await expect(optionItalic).toHaveAttribute('aria-checked', 'false');
149
- await expect(optionBold).toHaveAttribute('aria-checked', 'true');
150
- await expect(minipillLabel1).toEqual('Bold');
151
- await expect(menu).toBeDisplayedInViewport();
152
- await expect(howManyPills).toEqual(4);
153
- });
154
- });
155
- }
@@ -1,72 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { Key } from 'webdriverio';
3
- import DSPillsV2CO from '../DSPillsV2CO';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
- describe('PUI-14709 - PillsV2 Selection: Single Select -Visual', () => {
7
- before('loading page', async () => {
8
- const errorOnGo = await DSPillsV2CO.singleSelectMB.go();
9
- if (errorOnGo) throw errorOnGo;
10
- });
11
- it('01: should have a pill with expanded single select menu, unselected, matching baseline', async () => {
12
- await browser.eyesOpen();
13
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
14
- await menuTrigger.click();
15
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-single-unsel'));
16
- await expect(snapshot).toEqual(0);
17
- });
18
- it('02: should have a pill with expanded single select menu, selected, matching baseline', async () => {
19
- await browser.eyesOpen();
20
- await browser.keys(Key.ArrowDown);
21
- await browser.keys(Key.Space);
22
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-single-sel'));
23
- await expect(snapshot).toEqual(0);
24
- });
25
- });
26
-
27
- describe('PUI-14712 - PillsV2 Selection: Required Select -Visual', () => {
28
- before('loading page', async () => {
29
- const errorOnGo = await DSPillsV2CO.requiredSelectMB.go();
30
- if (errorOnGo) throw errorOnGo;
31
- });
32
- it('01: should have a pill with expanded single select menu, required, matching baseline', async () => {
33
- await browser.eyesOpen();
34
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
35
- await menuTrigger.click();
36
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-req-single'));
37
- await expect(snapshot).toEqual(0);
38
- });
39
- it('02: should have a pill with expanded multi select menu, required, matching baseline', async () => {
40
- await browser.eyesOpen();
41
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(1);
42
- await menuTrigger.click();
43
- await browser.keys(Key.ArrowDown);
44
- await browser.keys(Key.Space);
45
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-req-multi'));
46
- await expect(snapshot).toEqual(0);
47
- });
48
- });
49
-
50
- describe('PUI-14711 - PillsV2 Selection: Multi Select -Visual', () => {
51
- before('loading page', async () => {
52
- const errorOnGo = await DSPillsV2CO.multiSelectMB.go();
53
- if (errorOnGo) throw errorOnGo;
54
- });
55
- it('01: should have a pill with multi select menu, unselected, matching baseline', async () => {
56
- await browser.eyesOpen();
57
- const menuTrigger = await DSPillsV2CO.getMBChevronByIndex(0);
58
- await menuTrigger.click();
59
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-multi-unsel'));
60
- await expect(snapshot).toEqual(0);
61
- });
62
- it('02: should have a pill with multi select menu, multi opts selected, and pass axe-core scan', async () => {
63
- await browser.eyesOpen();
64
- await browser.keys(Key.ArrowDown);
65
- await browser.keys(Key.Space);
66
- await browser.keys(Key.ArrowDown);
67
- await browser.keys(Key.Space);
68
- const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pillsv2-multi-sel'));
69
- await expect(snapshot).toEqual(0);
70
- });
71
- });
72
- }