dimsum-e2e-tests 3.51.0-next.2 → 3.51.0-next.4

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 (84) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/ds-breadcrumb/DSBreadcrumb.axe-core.func.spec.js +21 -6
  3. package/ds-breadcrumb/DSBreadcrumb.func.spec.js +23 -2
  4. package/ds-breadcrumb/DSBreadcrumb.visual.spec.js +20 -15
  5. package/ds-breadcrumb/DSBreadcrumbCO.js +17 -1
  6. package/ds-button-v3/DSButtonV3CO.js +4 -0
  7. package/ds-controlled-form/ds-combobox/DSCombobox.func.spec.js +1 -0
  8. package/ds-controlled-form/ds-combobox/DSCombobox.smoke.spec.js +4 -56
  9. package/ds-controlled-form/ds-combobox/DSComboboxCO.js +0 -9
  10. package/ds-controlled-form/ds-combobox/creatable/DSCombobox.keyboard-creatable.func.spec.js +3 -0
  11. package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.axe-core.spec.js +0 -1
  12. package/ds-controlled-form/ds-combobox/inline/DSCombobox.inline.keyboard.func.spec.js +5 -0
  13. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.keyboard-multi-select.func.spec.js +6 -68
  14. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.mouse-touch-multi-select.func.spec.js +0 -58
  15. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.multi.visual.spec.js +0 -16
  16. package/ds-controlled-form/ds-combobox/multi-select/DSCombobox.ten-thousand-options.func.spec.js +2 -22
  17. package/ds-controlled-form/ds-combobox/single-select/DSCombobox.keyboard-single-select.func.spec.js +4 -0
  18. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.axe-core.spec.js +85 -0
  19. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.functional.spec.js +242 -0
  20. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.visual.spec.js +115 -0
  21. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePickerCO.js +54 -2
  22. package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +4 -0
  23. package/ds-controlled-form/ds-controlled-inputgroup/autocomplete/DSControlledInputGroup.autocomplete.axe-core.func.spec.js +1 -0
  24. package/ds-controlled-form/ds-controlled-inputgroup/combobox/DSControlledInputGroup.combobox.axe-core.func.spec.js +1 -1
  25. package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.axe-core.func.spec.js +1 -1
  26. package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.func.spec.js +36 -0
  27. package/ds-controlled-form/ds-controlled-large-input-text/read-only/DSLargeInputText.read-only.visual.spec.js +12 -1
  28. package/ds-controlled-form/ds-input-text/DSInputText.func.spec.js +14 -12
  29. package/ds-controlled-form/react-hook-form/ReactHook.visual.spec.js +1 -0
  30. package/ds-data-table-async/DSDataTable.smoke.spec.js +4 -0
  31. package/ds-data-table-async/basic/DSDataTable.usecases.func.spec.js +5 -4
  32. package/ds-data-table-async/basic/DSDataTable.usecases.visual.spec.js +1 -0
  33. package/ds-data-table-async/components/RowCO.js +4 -0
  34. package/ds-data-table-async/dnd/DSDataTable.dnd.visual.spec.js +1 -1
  35. package/ds-data-table-async/filters/DSDataTable.filters-creatable.func.spec.js +4 -0
  36. package/ds-data-table-async/filters/DSDataTable.text-filters.func.spec.js +1 -0
  37. package/ds-data-table-async/select/DSDataTable.select.axe-core.func.spec.js +2 -0
  38. package/ds-data-table-async/select/DSDataTable.select.func.spec.js +2 -86
  39. package/ds-data-table-async/select/DSDataTable.select.shift.func.spec.js +126 -0
  40. package/ds-data-table-async/vissibility/DSDataTable.vissibility.visual.spec.js +6 -0
  41. package/ds-form-combobox-multi/DSComboboxMultiCO.js +2 -9
  42. package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +2 -11
  43. package/ds-form-combobox-multi/read-only/DSComboboxMulti.read-only.axe-core.func.spec.js +26 -0
  44. package/ds-form-combobox-multi/read-only/DSComboboxMulti.read-only.visual.spec.js +39 -0
  45. package/ds-form-combobox-single/DSComboboxSingleCO.js +2 -9
  46. package/ds-form-combobox-single/read-only/DSComboboxSingle.read-only.axe-core.func.spec.js +26 -0
  47. package/ds-form-combobox-single/read-only/DSComboboxSingle.read-only.visual.spec.js +39 -0
  48. package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +4 -0
  49. package/ds-menu-button/DSMenuButtonCO.js +9 -5
  50. package/ds-menu-button/activable/DSMenuButton.activableMenuItem.func.spec.js +32 -0
  51. package/ds-menu-button/{basic/DSMenuButton.activableMenuItem.func.spec.js → activable/DSMenuButton.activableMenuItem.keyboardnav.func.spec.js} +1 -26
  52. package/ds-menu-button/disabled/DSMenuButton.axe-core.disabled.func.spec.js +20 -0
  53. package/ds-menu-button/disabled/DSMenuButton.disabled.func.spec.js +28 -0
  54. package/ds-menu-button/leftdecorations/DSMenuButton.axe-core.leftDecor.func.spec.js +20 -0
  55. package/ds-menu-button/multiselect/DSMenuButton.axe-core.multiselect.func.spec.js +28 -0
  56. package/ds-menu-button/multiselect/DSMenuButton.multiSelectItem.func.spec.js +34 -0
  57. package/ds-menu-button/{basic/DSMenuButton.multiSelectItem.func.spec.js → multiselect/DSMenuButton.multiSelectItem.keyboardnav.func.spec.js} +0 -29
  58. package/ds-menu-button/singleSelect/DSMenuButton.axe-core.singleSelect.func.spec.js +28 -0
  59. package/ds-menu-button/singleSelect/DSMenuButton.singleSelectItem.func.spec.js +39 -0
  60. package/ds-menu-button/{basic/DSMenuButton.singleSelectItem.func.spec.js → singleSelect/DSMenuButton.singleSelectItem.keyboardnav.func.spec.js} +11 -42
  61. package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +20 -0
  62. package/ds-menu-button/submenu/DSMenuButton.subMenuItem.func.spec.js +42 -0
  63. package/ds-menu-button/{basic/DSMenuButton.subMenuItem.func.spec.js → submenu/DSMenuButton.subMenuItem.keyboardnav.func.spec.js} +1 -38
  64. package/ds-pills-v2/DSPills.axe-core.func.spec.js +2 -2
  65. package/ds-pills-v2/DSPills.func.spec.js +26 -0
  66. package/ds-pills-v2/DSPills.visual.spec.js +1 -1
  67. package/ds-pills-v2/DSPillsV2CO.js +19 -1
  68. package/ds-pills-v2/selection/DSPills.axe-core.func.spec.js +77 -0
  69. package/ds-pills-v2/selection/DSPills.func.spec.js +155 -0
  70. package/ds-pills-v2/selection/DSPills.visual.spec.js +72 -0
  71. package/ds-query-builder/DSQueryBuilder.visual.spec.js +2 -1
  72. package/ds-query-builder/DSQueryBuilderCO.js +0 -5
  73. package/ds-shuttle-v2/DSShuttleV2CO.js +2 -4
  74. package/ds-shuttle-v2/Dnd/DSShuttleV2.DnD.visual.spec.js +0 -5
  75. package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +46 -66
  76. package/ds-shuttle-v2/drillingdown/DSShuttleV2.drilldown.kb.func.spec.js +3 -5
  77. package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +1 -7
  78. package/ds-shuttle-v2/globalcheckbox/DSShuttleV2.globalcheckbox.kb.func.spec.js +0 -2
  79. package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +0 -2
  80. package/ds-toggle/DSToggle.func.spec.js +21 -18
  81. package/ds-toggle/DSToggle.visual.spec.js +56 -12
  82. package/package.json +119 -119
  83. package/ds-controlled-form/ds-controlled-date-range-picker/DSControlledDateRangePicker.DateInput.visual.spec.js +0 -57
  84. package/ds-menu-button/DSMenuButton.axe-core.func.spec.js +0 -66
@@ -0,0 +1,42 @@
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
+ }
@@ -2,46 +2,9 @@
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';
6
5
  import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
7
- import { mouseOver } from '../../helpers';
8
6
 
9
7
  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
-
45
8
  describe('PUI-14652 - DSMenuButton:: Submenu Menu Item: Keyboard - Func', () => {
46
9
  before('loading page', async () => {
47
10
  const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
@@ -80,7 +43,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
80
43
  beforeEach('loading page', async () => {
81
44
  const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
82
45
  if (errorOnGo) throw errorOnGo;
83
- const menuTrigger = await DSButtonV3CO.getButton();
46
+ const menuTrigger = await DSButtonV3CO.getButtonByLabel('Submenus example');
84
47
  await menuTrigger.waitForDisplayed();
85
48
  await browser.keys(Key.Tab);
86
49
  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.getChevronbyIndex(1);
18
+ const dropDownTrigger = await DSPillsV2CO.getDDChevronbyIndex(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.getChevronbyIndex(1);
24
+ const dropDownTrigger = await DSPillsV2CO.getDDChevronbyIndex(1);
25
25
  await dropDownTrigger.click();
26
26
  const dropDownMenu = await DSPillsV2CO.dropDownMenu();
27
27
  await dropDownMenu.waitForDisplayed();
@@ -43,4 +43,30 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
43
43
  await expect(howManyPills).toEqual(4);
44
44
  });
45
45
  });
46
+ describe('PUI-14923 - Pills v2:: Dropdown Pills, Basic -Func', () => {
47
+ before('loading page', async () => {
48
+ const errorOnGo = await DSPillsV2CO.requiredSelectMB.go();
49
+ if (errorOnGo) throw errorOnGo;
50
+ });
51
+ it('01: should have collapsed ddmenu by default (reflected on aria-expanded)', async () => {
52
+ const ddMenuChevron = await DSPillsV2CO.getMBChevronByIndex(0);
53
+ const menu = await DSPillsV2CO.getFloatingWrapper();
54
+ await expect(menu).not.toBeDisplayed();
55
+ await expect(ddMenuChevron).toHaveAttribute('aria-expanded', 'false');
56
+ });
57
+ it('02: should have expanded ddmenu after trigger (reflected on aria-expanded)', async () => {
58
+ const ddMenuChevron = await DSPillsV2CO.getMBChevronByIndex(0);
59
+ await ddMenuChevron.click();
60
+ const menu = await DSPillsV2CO.getFloatingWrapper();
61
+ await expect(menu).toBeDisplayed();
62
+ await expect(ddMenuChevron).toHaveAttribute('aria-expanded', 'true');
63
+ });
64
+ it('03: should collapse dd menu and have it reflected on aria-expanded', async () => {
65
+ await browser.keys(Key.Escape);
66
+ const ddMenuChevron = await DSPillsV2CO.getMBChevronByIndex(0);
67
+ const menu = await DSPillsV2CO.getFloatingWrapper();
68
+ await expect(menu).not.toBeDisplayed();
69
+ await expect(ddMenuChevron).toHaveAttribute('aria-expanded', 'false');
70
+ });
71
+ });
46
72
  }
@@ -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.getChevronbyIndex(1);
14
+ const dropDownTrigger = await DSPillsV2CO.getDDChevronbyIndex(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,6 +21,12 @@ 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
+
24
30
  static getUrl(component = 'basic') {
25
31
  return PageObject.getUrl(PATH_E2E_PILLS_V2, component);
26
32
  }
@@ -35,7 +41,11 @@ export default class DSPillsV2CO extends PageObject {
35
41
  return $$('[data-testid="ds-pill-dropdown-chevron"]');
36
42
  }
37
43
 
38
- static getChevronbyIndex = async (index) => getElementByIndex(this.getDDChevrons, index);
44
+ static getDDChevronbyIndex = async (index) => getElementByIndex(this.getDDChevrons, index);
45
+
46
+ static async getMBChevronByIndex(index = 0) {
47
+ return $$('[data-testid="ds-pill-menu-button-chevron"]')[index];
48
+ }
39
49
 
40
50
  static async getInputs() {
41
51
  return $$('[data-testid="ds-pill-input"]');
@@ -53,8 +63,16 @@ export default class DSPillsV2CO extends PageObject {
53
63
  return $$(' [data-testid="ds-pill-wrapper"]');
54
64
  }
55
65
 
66
+ static async getFloatingWrapper() {
67
+ return $('[data-testid="ds-floating-wrapper-root"]');
68
+ }
69
+
56
70
  static getPillByIndex = async (index) => getElementByIndex(this.getPills, index);
57
71
 
72
+ static async getPillsTextByIndex(index = 0) {
73
+ return $$('[data-testid="ds-pill-wrapper"] [data-testid="DS-SimpleTruncateText"]')[index];
74
+ }
75
+
58
76
  static async getResetBtn() {
59
77
  return $('[data-testid="ds-button"]');
60
78
  }
@@ -0,0 +1,77 @@
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
+ }
@@ -0,0 +1,155 @@
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
+ }
@@ -0,0 +1,72 @@
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
+ }
@@ -1,3 +1,4 @@
1
+ import { Key } from 'webdriverio';
1
2
  import DSQueryBuilderCO from './DSQueryBuilderCO';
2
3
  import { mouseOver, type } from '../helpers';
3
4
 
@@ -57,7 +58,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
57
58
  });
58
59
  it('02: should display the combobox with all options selected properly opened', async () => {
59
60
  await DSQueryBuilderCO.openComboBox(0);
60
- await DSQueryBuilderCO.selectAllMultiComboOptions();
61
+ await browser.keys([Key.Control, Key.Command, 'a']);
61
62
  const snapshot = await browser.checkSnapshot(DSQueryBuilderCO.snapshotPath('qb-error-combo-multi-all-selected'));
62
63
  await expect(snapshot).toEqual(0);
63
64
  });
@@ -39,11 +39,6 @@ export default class DSQueryBuilderCO extends PageObject {
39
39
  return (await (await this.getComboBox(index)).$('[data-testid="combobox-dropdown-btn"]')).click();
40
40
  }
41
41
 
42
- static async selectAllMultiComboOptions() {
43
- // eslint-disable-next-line no-return-await
44
- return $('[id="select-all-checkbox"]').click();
45
- }
46
-
47
42
  static async getComboBoxes() {
48
43
  return $$('[data-testid="combobox"]');
49
44
  }
@@ -132,16 +132,14 @@ export default class DSShuttleV2CO extends PageObject {
132
132
 
133
133
  static getCheckboxByIndex = async (index = 0) => $$(`[data-testid="ds-checkbox"]`)[index];
134
134
 
135
+ static getBreadcrumbItemContByIndex = async (index = 0) => $$(`[data-testid="breadcrumb-item-content"]`)[index];
136
+
135
137
  static getBreadcrumbByIndex = async (index = 0) => $$(`[data-testid="breadcrumb-item-container"]`)[index];
136
138
 
137
139
  static getBreadcrumbs = async () => $$(`[data-testid="breadcrumb-item-container"]`);
138
140
 
139
- static getFocuseableByBreadcrumb = async (breadcrumb) => breadcrumb.$(`[data-testid="ds-typography-element"]`);
140
-
141
141
  static getSubtitleByItem = async (item) => item.$$(`p`)[1];
142
142
 
143
- static getTypographyByItem = async (item) => item.$(`[data-testid="ds-typography-element"]`);
144
-
145
143
  static getActionButtonByItemAndIndex = async (item, index = 0) =>
146
144
  item.$$(`[data-testid=${DSShuttleV2DataTestIds.ITEM_ACTION_BTN}]`)[index];
147
145
 
@@ -12,7 +12,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
12
12
  await browser.eyesOpen();
13
13
  await browser.keys(Key.Tab);
14
14
  await browser.keys(Key.Tab);
15
- await browser.keys(Key.Tab);
16
15
  await browser.keys(Key.ArrowDown);
17
16
  await browser.keys(Key.ArrowLeft);
18
17
  const snapshot = await browser.eyesCheckSnapshot(DSShuttleV2CO.snapshotPath('shuttle-v2-focus-dnd'));
@@ -22,7 +21,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
22
21
  await browser.eyesOpen();
23
22
  await browser.keys(Key.Tab);
24
23
  await browser.keys(Key.Tab);
25
- await browser.keys(Key.Tab);
26
24
  await browser.keys(Key.ArrowDown);
27
25
  await browser.keys(Key.ArrowLeft);
28
26
  await browser.keys(Key.Space);
@@ -34,7 +32,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
34
32
  await browser.eyesOpen();
35
33
  await browser.keys(Key.Tab);
36
34
  await browser.keys(Key.Tab);
37
- await browser.keys(Key.Tab);
38
35
  await browser.keys(Key.ArrowDown);
39
36
  await browser.keys(Key.ArrowLeft);
40
37
  await browser.keys(Key.Space);
@@ -60,7 +57,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
60
57
  await browser.keys(Key.Tab);
61
58
  await browser.keys(Key.Tab);
62
59
  await browser.keys(Key.Tab);
63
- await browser.keys(Key.Tab);
64
60
  await browser.keys(Key.ArrowDown);
65
61
  await browser.keys(Key.ArrowLeft);
66
62
  await browser.keys(Key.Return);
@@ -76,7 +72,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
76
72
  await browser.keys(Key.Tab);
77
73
  await browser.keys(Key.Tab);
78
74
  await browser.keys(Key.Tab);
79
- await browser.keys(Key.Tab);
80
75
  await browser.keys(Key.ArrowDown);
81
76
  await browser.keys(Key.ArrowLeft);
82
77
  await browser.keys(Key.Return);