dimsum-e2e-tests 3.57.0-next.4 → 3.57.0-next.41

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 (55) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/ds-accordion/DSAccordionCO.js +1 -2
  3. package/ds-accordion/slots/DSAccordion.slots.func.spec.js +12 -0
  4. package/ds-breadcrumb/DSBreadcrumb.func.spec.js +5 -3
  5. package/ds-card-v3/DSCardV3CO.js +20 -0
  6. package/ds-card-v3/slots/DSCardV3.slots.axe-core.spec.js +22 -0
  7. package/ds-card-v3/slots/DSCardV3.slots.func.spec.js +36 -0
  8. package/ds-card-v3/slots/DSCardV3.slots.visual.spec.js +18 -0
  9. package/ds-chip/DSChipCO.js +24 -0
  10. package/ds-chip/slots/DSChip.slots.axe-core.spec.js +17 -0
  11. package/ds-chip/slots/DSChip.slots.func.spec.js +39 -0
  12. package/ds-chip/slots/DSChip.slots.visual.spec.js +17 -0
  13. package/ds-controlled-form/ds-controlled-large-input-text/DSLargeInputTextCO.js +5 -0
  14. package/ds-controlled-form/ds-controlled-large-input-text/aria-disabled/DSLargeInputText.aria-disabled.func.spec.js +19 -0
  15. package/ds-data-table-async/DSDataTableCO.js +6 -1
  16. package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +1 -45
  17. package/ds-data-table-async/components/FilterBarCO.js +8 -0
  18. package/ds-data-table-async/components/FiltersCO.js +8 -0
  19. package/ds-data-table-async/components/HeaderCO.js +5 -0
  20. package/ds-data-table-async/empty-state/DSDataTable.empty-state.visual.spec.js +1 -1
  21. package/ds-data-table-async/filters/DSDataTable.free-text-search.keyboard.func.spec.js +70 -5
  22. package/ds-data-table-async/filters/DSDataTable.text-filters.func.spec.js +3 -3
  23. package/ds-data-table-async/more/DSDataTable.headers.visual.spec.js +0 -63
  24. package/ds-data-table-async/select/DSDataTable.select.func.spec.js +1 -1
  25. package/ds-data-table-async/slots/DSDataTable.slots.func.spec.js +40 -0
  26. package/ds-data-table-async/slots/DSDataTable.slots.visual.spec.js +19 -0
  27. package/ds-data-table-async/sorting/DSDataTable.sorting.visual.spec.js +118 -0
  28. package/ds-dialog/DSDialog.cases.visual.spec.js +0 -1
  29. package/ds-dialog/DSDialog.visual.spec.js +1 -1
  30. package/ds-dialog/DSDialogCO.js +5 -13
  31. package/ds-dialog/axe-core/DSDialog.error.axe-core.func.spec.js +24 -0
  32. package/ds-dialog/axe-core/DSDialog.info.axe-core.func.spec.js +24 -0
  33. package/ds-dialog/axe-core/DSDialog.scroll-body.axe-core.func.spec.js +24 -0
  34. package/ds-dialog/axe-core/DSDialog.success.axe-core.func.spec.js +24 -0
  35. package/ds-dialog/axe-core/DSDialog.warning.axe-core.spec.func.js +24 -0
  36. package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItem.axe-core.func.spec.js +1 -1
  37. package/{ds-toggle → ds-form-toggle}/DSToggle.axe-core.func.spec.js +6 -2
  38. package/{ds-toggle → ds-form-toggle}/DSToggle.func.spec.js +13 -8
  39. package/{ds-toggle → ds-form-toggle}/DSToggle.visual.spec.js +2 -2
  40. package/{ds-toggle → ds-form-toggle}/DSToggleCO.js +1 -1
  41. package/ds-menu-button/DSMenuButtonCO.js +2 -0
  42. package/ds-menu-button/basic/DSMenuButton.basic.func.spec.js +28 -0
  43. package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +1 -2
  44. package/ds-pagination/DSPagination.axe-core.func.spec.js +64 -0
  45. package/ds-pagination/DSPaginationCO.js +12 -0
  46. package/ds-read-more/DSReadMore.width-change.visual.spec.js +85 -0
  47. package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +0 -95
  48. package/ds-shuttle-v2/filtering/DSShuttleV2.filter.func.spec.js +8 -3
  49. package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +43 -0
  50. package/ds-shuttle-v2/items/DSShuttleV2.items.func.spec.js +1 -1
  51. package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +1 -1
  52. package/ds-shuttle-v2/load-more/DSShuttleV2.load-more.keyboard.func.spec.js +61 -0
  53. package/package.json +193 -189
  54. package/paths.js +1 -0
  55. package/ds-dialog/DSDialog.smoke.spec.js +0 -133
@@ -13,7 +13,7 @@ if (
13
13
  ) {
14
14
  describe('PUI-11929 - DSControlledToggle - Axe-Core - showcase', () => {
15
15
  before('loading page', async () => {
16
- const errorOnGo = await DSToggleCO.showOffURL.go();
16
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
17
17
  if (errorOnGo) throw errorOnGo;
18
18
  });
19
19
  it('01: should pass axe-core check for showcase example', async () => {
@@ -27,10 +27,14 @@ if (
27
27
  expect(result.length).toBe(0);
28
28
  });
29
29
  it('03: should pass axe-core check for showcase example - readOnly interaction', async () => {
30
- await tabStops(6);
30
+ await tabStops(3);
31
31
  const result = await axeCoreCheck();
32
32
  expect(result.length).toBe(0);
33
33
  });
34
+ it('04: all toggles should have role switch', async () => {
35
+ const toggleRoles = await $$('button[role="switch"]');
36
+ expect(toggleRoles.length).toBe(32);
37
+ });
34
38
  });
35
39
  describe('PUI-14182 - [Toggle] applyAriaDisabled prop - axe-core test', () => {
36
40
  before('loading page', async () => {
@@ -100,23 +100,28 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
100
100
  });
101
101
  describe('PUI-8814 - DSControlledToggle:: Tabbing', () => {
102
102
  before('loading page', async () => {
103
- const errorOnGo = await DSToggleCO.showOffURL.go();
103
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
104
104
  if (errorOnGo) throw errorOnGo;
105
105
  await (await DSToggleCO.getToggle()).waitForExist();
106
106
  });
107
107
  it('01: should tab through the basic toggles to the last basic toggle', async () => {
108
- await tabStops(6);
109
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(4);
108
+ await tabStops(2);
109
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(1);
110
110
  await expect(toggle).toBeFocused();
111
111
  });
112
- it('02: should tab and skip all three disabled toggles to the first enabled toggle, next row', async () => {
113
- await browser.keys(Key.Tab);
114
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(11);
112
+ it('02: should tab and skip all disabled toggles to the first enabled toggle, next row', async () => {
113
+ await tabStops(5);
114
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(8);
115
115
  await expect(toggle).toBeFocused();
116
116
  });
117
117
  it('03: should tab through the readonly toggles to the last readonly toggle', async () => {
118
- await tabStops(5);
119
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(16);
118
+ await tabStops(3);
119
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(11);
120
+ await expect(toggle).toBeFocused();
121
+ });
122
+ it('04: should tab through the aria-disabled toggles to the last aria-disabled toggle', async () => {
123
+ await tabStops(2);
124
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(13);
120
125
  await expect(toggle).toBeFocused();
121
126
  });
122
127
  });
@@ -4,12 +4,12 @@ import DSToggleCO from './DSToggleCO';
4
4
  if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
5
  describe('PUI-6757 - DSControlledToggle - Visual Test - showcase', () => {
6
6
  before('loading page', async () => {
7
- const errorOnGo = await DSToggleCO.showOffURL.go();
7
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
8
8
  if (errorOnGo) throw errorOnGo;
9
9
  });
10
10
  it('01: should display all DSControlledToggle styles correctly', async () => {
11
11
  await (await DSToggleCO.getToggleByIndex(0)).waitForExist();
12
- const snapshot = await browser.checkSnapshot(DSToggleCO.snapshotPath('show-off'));
12
+ const snapshot = await browser.checkSnapshot(DSToggleCO.snapshotPath('full-showcase'));
13
13
  await expect(snapshot).toEqual(0);
14
14
  });
15
15
  });
@@ -2,7 +2,7 @@ import { PATH_E2E_TOGGLE } from '../paths';
2
2
  import { PageObject, Urlbuilder } from '../helpers';
3
3
 
4
4
  export default class DSToggleCO extends PageObject {
5
- static showOffURL = new Urlbuilder(PATH_E2E_TOGGLE, 'show-off-test');
5
+ static fullShowcase = new Urlbuilder(PATH_E2E_TOGGLE, 'full-showcase-test');
6
6
 
7
7
  static basicURL = new Urlbuilder(PATH_E2E_TOGGLE, 'basic-test');
8
8
 
@@ -7,6 +7,8 @@ export default class DSMenuButtonCO extends PageObject {
7
7
 
8
8
  static multipleSelectMenuItem = new Urlbuilder(PATH_E2E_MENU_BUTTON, 'multiple-select-menu-item');
9
9
 
10
+ static nextTabstopTest = new Urlbuilder(PATH_E2E_MENU_BUTTON, 'next-tabstop-test');
11
+
10
12
  static singleSelectMenuItem = new Urlbuilder(PATH_E2E_MENU_BUTTON, 'single-select-menu-item');
11
13
 
12
14
  static withSubmenuMenuItem = new Urlbuilder(PATH_E2E_MENU_BUTTON, 'with-submenu-menu-item');
@@ -0,0 +1,28 @@
1
+ /* eslint-disable max-statements */
2
+ import { Key } from 'webdriverio';
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-17414 - DSMenuButton:: Tab with expanded menu - Func', () => {
8
+ before('loading page', async () => {
9
+ const errorOnGo = await DSMenuButtonCO.nextTabstopTest.go();
10
+ if (errorOnGo) throw errorOnGo;
11
+ });
12
+ it('01: should trigger menuButton and have it displayed and focused', async () => {
13
+ const menuTrigger = await DSButtonV3CO.getButtonByLabel('MenuButton');
14
+ await menuTrigger.click();
15
+ const menuFlyOut = await DSMenuButtonCO.getMenuRoot();
16
+ const menuItem1 = await DSMenuButtonCO.getMenuItemOptByIndex(1);
17
+ await expect(menuItem1).toBeFocused();
18
+ await expect(menuFlyOut).toBeDisplayed();
19
+ });
20
+ it('02: should tab and go to the next IE after trigger', async () => {
21
+ const menuFlyOut = await DSMenuButtonCO.getMenuRoot();
22
+ await browser.keys(Key.Tab);
23
+ const normalButton = await DSButtonV3CO.getButtonByIndex(1);
24
+ await expect(menuFlyOut).not.toBeDisplayed();
25
+ await expect(normalButton).toBeFocused();
26
+ });
27
+ });
28
+ }
@@ -9,8 +9,7 @@ if (
9
9
  browser.capabilities.browserName === 'Chrome') ||
10
10
  browser.capabilities.browserName === 'chrome'
11
11
  ) {
12
- // unskip after PUI-16416 is fixed
13
- describe.skip('PUI-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
12
+ describe('PUI-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
14
13
  before('loading page', async () => {
15
14
  const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
16
15
  if (errorOnGo) throw errorOnGo;
@@ -0,0 +1,64 @@
1
+ import DSPaginationCO from './DSPaginationCO';
2
+ import { axeCoreCheck } from '../helpers';
3
+
4
+ if (
5
+ (!browser.capabilities['ice:options'].isPhone &&
6
+ !browser.capabilities['ice:options'].isTablet &&
7
+ browser.capabilities.browserName === 'chrome') ||
8
+ browser.capabilities.browserName === 'Chrome'
9
+ ) {
10
+ describe('PUI-17494: Pagination basic -AxeCore', () => {
11
+ beforeEach('loading page', async () => {
12
+ const errorOnGo = await DSPaginationCO.basicTest.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('01: should display the basic pagination closed and pass axe-core', async () => {
16
+ const result = await axeCoreCheck();
17
+ expect(result.length).toBe(0);
18
+ });
19
+ it('02: should display the dropdown menu open and pass axe-core', async () => {
20
+ const ddMenuButton = await DSPaginationCO.getDropDownMenuBtn();
21
+ await ddMenuButton.click();
22
+ const listbox = await DSPaginationCO.getDropDownMenu();
23
+ await listbox.waitForDisplayed();
24
+ const result = await axeCoreCheck();
25
+ expect(result.length).toBe(0);
26
+ });
27
+ });
28
+ describe('PUI-17495: Pagination Segmented -AxeCore', () => {
29
+ beforeEach('loading page', async () => {
30
+ const errorOnGo = await DSPaginationCO.segmentedPaginatorTest.go();
31
+ if (errorOnGo) throw errorOnGo;
32
+ });
33
+ it('01: should display the segmented pagination closed and pass axe-core', async () => {
34
+ const result = await axeCoreCheck();
35
+ expect(result.length).toBe(0);
36
+ });
37
+ it('02: should display the dropdown menu open and pass axe-core', async () => {
38
+ const ddMenuButton = await DSPaginationCO.getDropDownMenuBtn();
39
+ await ddMenuButton.click();
40
+ const listbox = await DSPaginationCO.getDropDownMenu();
41
+ await listbox.waitForDisplayed();
42
+ const result = await axeCoreCheck();
43
+ expect(result.length).toBe(0);
44
+ });
45
+ });
46
+ describe('PUI-: Pagination Per Page Selector -AxeCore', () => {
47
+ beforeEach('loading page', async () => {
48
+ const errorOnGo = await DSPaginationCO.perPageSelectorWithOptionsTest.go();
49
+ if (errorOnGo) throw errorOnGo;
50
+ });
51
+ it('01: should display the per page selector pagination closed and pass axe-core', async () => {
52
+ const result = await axeCoreCheck();
53
+ expect(result.length).toBe(0);
54
+ });
55
+ it('02: should display the dropdown menu open and pass axe-core', async () => {
56
+ const ddMenuButton = await DSPaginationCO.getPerPageSelector();
57
+ await ddMenuButton.click();
58
+ const listbox = await DSPaginationCO.getDropDownMenu();
59
+ await listbox.waitForDisplayed();
60
+ const result = await axeCoreCheck();
61
+ expect(result.length).toBe(0);
62
+ });
63
+ });
64
+ }
@@ -5,6 +5,14 @@ export default class DSPaginationCO extends PageObject {
5
5
  // Desktop
6
6
  static customPageSizeComponentTest = new Urlbuilder(PATH_E2E_PAGINATION, 'custom-page-size-test');
7
7
 
8
+ static segmentedPaginatorTest = new Urlbuilder(PATH_E2E_PAGINATION, 'segmented-paginator-test');
9
+
10
+ static basicTest = new Urlbuilder(PATH_E2E_PAGINATION, 'basic-test');
11
+
12
+ static perPageSelectorWithOptionsTest = new Urlbuilder(PATH_E2E_PAGINATION, 'per-page-selector-with-options-test');
13
+
14
+ static perPageSelectorWithStepTest = new Urlbuilder(PATH_E2E_PAGINATION, 'per-page-selector-with-step-test');
15
+
8
16
  static getUrl(component = 'custom-page-size-test') {
9
17
  return PageObject.getUrl(PATH_E2E_PAGINATION, component);
10
18
  }
@@ -33,6 +41,10 @@ export default class DSPaginationCO extends PageObject {
33
41
 
34
42
  static getCustomLegend = async () => $('[data-testid="custom-legend"]');
35
43
 
44
+ static getDropDownMenuBtn = async () => $('[data-testid="ds-pagination-paginator"]');
45
+
46
+ static getPerPageSelector = async () => $('[data-testid="ds-pagination-per-page-selector"]');
47
+
36
48
  // Snapshots
37
49
  static snapshotPath(example = 'basic') {
38
50
  return PageObject.getSnapshotPathBuilder('PageNumber', example);
@@ -0,0 +1,85 @@
1
+ import { Key } from 'webdriverio';
2
+ import DSReadMoreCO from './DSReadMoreCO';
3
+
4
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
+ describe('PUI-17358 - Read More:: width change -Visual', () => {
6
+ beforeEach('loading page', async () => {
7
+ const errorOnGo = await DSReadMoreCO.widthChange.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+ it('01: should display readmore at 100px width - read more', async () => {
11
+ await browser.eyesOpen();
12
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readmore'));
13
+ await expect(snapshot).toEqual(0);
14
+ });
15
+ it('02: should display readmore at 100px width - read less', async () => {
16
+ await browser.eyesOpen();
17
+ await browser.keys(Key.Tab);
18
+ await browser.keys(Key.Enter);
19
+ await browser.keys(Key.Tab);
20
+ await browser.keys(Key.Enter);
21
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readless'));
22
+ await expect(snapshot).toEqual(0);
23
+ });
24
+ it('03: should display readmore at 200px width - read more', async () => {
25
+ await browser.eyesOpen();
26
+ await $('button*=Change the widths').click();
27
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readmore'));
28
+ await expect(snapshot).toEqual(0);
29
+ });
30
+ it('04: should display readmore at 200px width - read less', async () => {
31
+ await browser.eyesOpen();
32
+ await $('button*=Change the widths').click();
33
+ await browser.keys([Key.Shift, Key.Tab]);
34
+ await browser.keys([Key.Shift, Key.Tab]);
35
+ await browser.keys([Key.Shift, Key.Tab]);
36
+ await browser.keys(Key.Enter);
37
+ await browser.keys([Key.Shift, Key.Tab]);
38
+ await browser.keys(Key.Enter);
39
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readless'));
40
+ await expect(snapshot).toEqual(0);
41
+ });
42
+ it('05: should display readmore at 300px width - read more', async () => {
43
+ await browser.eyesOpen();
44
+ await $('button*=Change the widths').click();
45
+ await $('button*=Change the widths').click();
46
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readmore'));
47
+ await expect(snapshot).toEqual(0);
48
+ });
49
+ it('06: should display readmore at 300px width - read less', async () => {
50
+ await browser.eyesOpen();
51
+ await $('button*=Change the widths').click();
52
+ await $('button*=Change the widths').click();
53
+ await browser.keys([Key.Shift, Key.Tab]);
54
+ await browser.keys([Key.Shift, Key.Tab]);
55
+ await browser.keys([Key.Shift, Key.Tab]);
56
+ await browser.keys(Key.Enter);
57
+ await browser.keys([Key.Shift, Key.Tab]);
58
+ await browser.keys(Key.Enter);
59
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readless'));
60
+ await expect(snapshot).toEqual(0);
61
+ });
62
+ it('07: should display readmore at 400px width - read more', async () => {
63
+ await browser.eyesOpen();
64
+ await $('button*=Change the widths').click();
65
+ await $('button*=Change the widths').click();
66
+ await $('button*=Change the widths').click();
67
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readmore'));
68
+ await expect(snapshot).toEqual(0);
69
+ });
70
+ it('08: should display readmore at 400px width - read less', async () => {
71
+ await browser.eyesOpen();
72
+ await $('button*=Change the widths').click();
73
+ await $('button*=Change the widths').click();
74
+ await $('button*=Change the widths').click();
75
+ await browser.keys([Key.Shift, Key.Tab]);
76
+ await browser.keys([Key.Shift, Key.Tab]);
77
+ await browser.keys([Key.Shift, Key.Tab]);
78
+ await browser.keys(Key.Enter);
79
+ await browser.keys([Key.Shift, Key.Tab]);
80
+ await browser.keys(Key.Enter);
81
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readless'));
82
+ await expect(snapshot).toEqual(0);
83
+ });
84
+ });
85
+ }
@@ -4,101 +4,6 @@ import { Key } from 'webdriverio';
4
4
  import DSShuttleV2CO from '../DSShuttleV2CO';
5
5
 
6
6
  if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
- describe('PUI-9798 - Shuttle V2, TabStops Basic -Func.', () => {
8
- before(async () => {
9
- const errorOnGo = await DSShuttleV2CO.filterURL.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should tab and focus the filter icon (skiping text title)', async () => {
13
- await browser.keys(Key.Tab);
14
- const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(0);
15
- await expect(sourceFilterBtn).toBeFocused();
16
- });
17
- it('02: should tab and focus the select/deselect all checkbox', async () => {
18
- await browser.keys(Key.Tab);
19
- const sourcePanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(0);
20
- await expect(sourcePanelCheckbox).toBeFocused();
21
- });
22
- it('03: should tab and focus the source panel', async () => {
23
- await browser.keys(Key.Tab);
24
- const sourcePanel = await DSShuttleV2CO.getListWrapperMid(0);
25
- await expect(sourcePanel).toBeFocused();
26
- });
27
- it('04: should select first item with arrowKeys', async () => {
28
- await browser.keys(Key.ArrowDown);
29
- const firstItem = await DSShuttleV2CO.getItemCheckboxByItem(await DSShuttleV2CO.getItemFromSourceByIndex(0));
30
- const isFirstItemFocused = await firstItem.getAttribute('tabindex');
31
- await expect(isFirstItemFocused).toEqual('0'); // 0 = true for pseudofocus
32
- await expect(firstItem).toBeFocused();
33
- });
34
- it('05: should Shift+Tab to focus the panel again and select last item with arrowKeys', async () => {
35
- await browser.keys([Key.Shift, Key.Tab]);
36
- await browser.keys(Key.ArrowUp);
37
- const firstItem = await DSShuttleV2CO.getItemCheckboxByIndex(9);
38
- const isFirstItemFocused = await firstItem.getAttribute('tabindex');
39
- await expect(isFirstItemFocused).toEqual('0'); // 0 = true for pseudofocus
40
- await expect(firstItem).toBeFocused();
41
- });
42
- it('06: should tab and focus next header search icon from destination panel', async () => {
43
- await browser.keys(Key.Tab);
44
- const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(1);
45
- await expect(sourceFilterBtn).toBeFocused();
46
- });
47
- });
48
- if (browser.capabilities.browserName !== 'Firefox') {
49
- describe('PUI-9799 - Shuttle V2, TabStops with BAB and LoadMore -Func.', () => {
50
- before(async () => {
51
- const errorOnGo = await DSShuttleV2CO.loadMoreURL.go();
52
- if (errorOnGo) throw errorOnGo;
53
- });
54
- it('01: display the BAB and return focus to the global checkbox to follow normal flow', async () => {
55
- const testItem = await DSShuttleV2CO.getItemWrapper(2);
56
- await testItem.click();
57
- const BAB = await DSShuttleV2CO.getMoveMultipleButton();
58
- const sourcePanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(0);
59
- await browser.keys([Key.Shift, Key.Tab]);
60
- await browser.keys([Key.Shift, Key.Tab]);
61
- await expect(BAB).toBeDisplayed();
62
- await expect(sourcePanelCheckbox).toBeFocused();
63
- });
64
- it('03: should tab and focus the source panel', async () => {
65
- await browser.keys(Key.Tab);
66
- const sourcePanel = await DSShuttleV2CO.getListWrapperMid(0);
67
- await expect(sourcePanel).toBeFocused();
68
- });
69
- it('04: should tab and focus the BAB', async () => {
70
- await browser.keys(Key.Tab);
71
- const BAB = await DSShuttleV2CO.getMoveMultipleButton(0);
72
- await expect(BAB).toBeFocused();
73
- });
74
- it('05: should tab and focus the loadmore', async () => {
75
- await browser.keys(Key.Tab);
76
- const loadMore = await DSShuttleV2CO.getListBottomLoadMoreBtn(0);
77
- await expect(loadMore).toBeFocused();
78
- });
79
- it('06: should tab and focus the global checkbox from destination panel', async () => {
80
- await browser.keys(Key.Tab);
81
- const destinationPanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(1);
82
- await expect(destinationPanelCheckbox).toBeFocused();
83
- });
84
- it('07: should move all the items to destination panel', async () => {
85
- await browser.keys(Key.Return);
86
- await browser.keys(Key.Tab);
87
- await browser.keys(Key.Tab);
88
- await browser.keys(Key.Return);
89
- const emptyListWrapper = await DSShuttleV2CO.getEmptyListWrapper();
90
- await expect(emptyListWrapper).toHaveText(expect.stringContaining('There are no items to display'));
91
- });
92
- it('08: should load more items and focus the panel body', async () => {
93
- await browser.keys(Key.Tab);
94
- await browser.keys(Key.Return);
95
- const destinationPanel = await DSShuttleV2CO.getListWrapperMid(1);
96
- const destinationItems = (await DSShuttleV2CO.getItemsFromDestination()).length;
97
- await expect(destinationItems).toBe(3);
98
- await expect(destinationPanel).toBeFocused();
99
- });
100
- });
101
- }
102
7
  describe('PUI-9815 - Shuttle V2, Range selection -Func.', () => {
103
8
  before(async () => {
104
9
  const errorOnGo = await DSShuttleV2CO.basicURL.go();
@@ -10,10 +10,12 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
10
10
  it('01: search bar should not display untill filter icon is triggered', async () => {
11
11
  await expect($('[data-testid="ds-shuttle-v2-area-search-bar"]')).not.toBeDisplayed();
12
12
  });
13
- it('02: should filter and find only one match at source panel', async () => {
13
+ it('02: should trigger searchbar and have it present with placeholder', async () => {
14
14
  const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(0);
15
15
  await sourceFilterBtn.click();
16
- const placeholder = await (await DSShuttleV2CO.getSearchBarByIndex(0)).getAttribute('placeholder');
16
+ const searchbar = await DSShuttleV2CO.getSearchBarByIndex(0);
17
+ await searchbar.click();
18
+ const placeholder = await searchbar.getAttribute('placeholder');
17
19
  await expect(placeholder).toBe('Source search placeholder');
18
20
  });
19
21
  it('03: should filter and find only one match at source panel', async () => {
@@ -23,12 +25,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
23
25
  const testItem = await (await DSShuttleV2CO.getItemFromSourceByIndex(0)).getText();
24
26
  await expect(testItem).toBe('Source 0.2');
25
27
  });
26
- it('04: should filter and find 10 of 11 items matching at destination panel', async () => {
28
+ it('04: should trigger destination searchbar and have it present with placeholder', async () => {
27
29
  const testItem = await DSShuttleV2CO.getItemWrapper(0);
28
30
  const testItemMoveBtn = await DSShuttleV2CO.getActionButtonByItemAndIndex(testItem, 1);
29
31
  await testItemMoveBtn.click();
30
32
  const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(1);
31
33
  await sourceFilterBtn.click();
34
+ const searchbar = await DSShuttleV2CO.getSearchBarByIndex(1);
35
+ await searchbar.click();
32
36
  const placeholder = await (await DSShuttleV2CO.getSearchBarByIndex(1)).getAttribute('placeholder');
33
37
  await expect(placeholder).toBe('Destination search placeholder');
34
38
  });
@@ -57,6 +61,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
57
61
  it('02: should filter and find only one match at source panel', async () => {
58
62
  const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(0);
59
63
  await sourceFilterBtn.click();
64
+ await browser.keys('Tab');
60
65
  await type('Vote for Pedro');
61
66
  const sourceItems = (await DSShuttleV2CO.getItemsFromSource()).length;
62
67
  await expect(sourceItems).toBe(0);
@@ -14,6 +14,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
14
14
  it('02: should filter and find only one match at source panel', async () => {
15
15
  await browser.keys(Key.Tab);
16
16
  await browser.keys(Key.Enter);
17
+ await browser.keys('Tab');
17
18
  await type('0.2');
18
19
  const sourceItems = (await DSShuttleV2CO.getItemsFromSource()).length;
19
20
  await expect(sourceItems).toBe(1);
@@ -27,6 +28,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
27
28
  await browser.keys(Key.Tab);
28
29
  await browser.keys(Key.Tab);
29
30
  await browser.keys(Key.Enter);
31
+ await browser.keys('Tab');
30
32
  await type('Destination');
31
33
  const destinationItems = (await DSShuttleV2CO.getItemsFromDestination()).length;
32
34
  await expect(destinationItems).toBe(10);
@@ -39,4 +41,45 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
39
41
  await expect(testItem).toBe('Destination 0.3');
40
42
  });
41
43
  });
44
+ describe('PUI-9798 - Shuttle V2, TabStops Basic -Func.', () => {
45
+ before(async () => {
46
+ const errorOnGo = await DSShuttleV2CO.filterURL.go();
47
+ if (errorOnGo) throw errorOnGo;
48
+ });
49
+ it('01: should tab and focus the filter icon (skiping text title)', async () => {
50
+ await browser.keys(Key.Tab);
51
+ const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(0);
52
+ await expect(sourceFilterBtn).toBeFocused();
53
+ });
54
+ it('02: should tab and focus the select/deselect all checkbox', async () => {
55
+ await browser.keys(Key.Tab);
56
+ const sourcePanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(0);
57
+ await expect(sourcePanelCheckbox).toBeFocused();
58
+ });
59
+ it('03: should tab and focus the source panel', async () => {
60
+ await browser.keys(Key.Tab);
61
+ const sourcePanel = await DSShuttleV2CO.getListWrapperMid(0);
62
+ await expect(sourcePanel).toBeFocused();
63
+ });
64
+ it('04: should select first item with arrowKeys', async () => {
65
+ await browser.keys(Key.ArrowDown);
66
+ const firstItem = await DSShuttleV2CO.getItemCheckboxByItem(await DSShuttleV2CO.getItemFromSourceByIndex(0));
67
+ const isFirstItemFocused = await firstItem.getAttribute('tabindex');
68
+ await expect(isFirstItemFocused).toEqual('0'); // 0 = true for pseudofocus
69
+ await expect(firstItem).toBeFocused();
70
+ });
71
+ it('05: should Shift+Tab to focus the panel again and select last item with arrowKeys', async () => {
72
+ await browser.keys([Key.Shift, Key.Tab]);
73
+ await browser.keys(Key.ArrowUp);
74
+ const firstItem = await DSShuttleV2CO.getItemCheckboxByIndex(9);
75
+ const isFirstItemFocused = await firstItem.getAttribute('tabindex');
76
+ await expect(isFirstItemFocused).toEqual('0'); // 0 = true for pseudofocus
77
+ await expect(firstItem).toBeFocused();
78
+ });
79
+ it('06: should tab and focus next header search icon from destination panel', async () => {
80
+ await browser.keys(Key.Tab);
81
+ const sourceFilterBtn = await DSShuttleV2CO.getHeaderSearchIcon(1);
82
+ await expect(sourceFilterBtn).toBeFocused();
83
+ });
84
+ });
42
85
  }
@@ -14,7 +14,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
14
14
  const actualItem = await (await DSShuttleV2CO.getItemFromDestinationByIndex(10)).getText();
15
15
  const sourceItems = (await DSShuttleV2CO.getItemsFromSource()).length;
16
16
  const destinationItems = (await DSShuttleV2CO.getItemsFromDestination()).length;
17
- await expect(itemGhost).toBe('Source 0.1');
17
+ await expect(itemGhost).toBe('This item has been soft deleted and is shown as a ghost item.\nSource 0.1');
18
18
  await expect(actualItem).toBe('Source 0.1');
19
19
  await expect(sourceItems).toBe(10);
20
20
  await expect(destinationItems).toBe(11);
@@ -19,7 +19,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
19
19
  const actualItem = await (await DSShuttleV2CO.getItemFromDestinationByIndex(10)).getText();
20
20
  const sourceItems = (await DSShuttleV2CO.getItemsFromSource()).length;
21
21
  const destinationItems = (await DSShuttleV2CO.getItemsFromDestination()).length;
22
- await expect(itemGhost).toBe('Source 0.1');
22
+ await expect(itemGhost).toBe('This item has been soft deleted and is shown as a ghost item.\nSource 0.1');
23
23
  await expect(actualItem).toBe('Source 0.1');
24
24
  await expect(sourceItems).toBe(10);
25
25
  await expect(destinationItems).toBe(11);
@@ -0,0 +1,61 @@
1
+ /* eslint-disable max-lines */
2
+ /* eslint-disable max-statements */
3
+ import { Key } from 'webdriverio';
4
+ import DSShuttleV2CO from '../DSShuttleV2CO';
5
+
6
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
+ describe('PUI-9799 - Shuttle V2, TabStops with BAB and LoadMore -Func.', () => {
8
+ before(async () => {
9
+ const errorOnGo = await DSShuttleV2CO.loadMoreURL.go();
10
+ if (errorOnGo) throw errorOnGo;
11
+ });
12
+ it('01: display the BAB and return focus to the global checkbox to follow normal flow', async () => {
13
+ const testItem = await DSShuttleV2CO.getItemWrapper(2);
14
+ await testItem.click();
15
+ const BAB = await DSShuttleV2CO.getMoveMultipleButton();
16
+ const sourcePanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(0);
17
+ await browser.keys([Key.Shift, Key.Tab]);
18
+ await browser.keys([Key.Shift, Key.Tab]);
19
+ await expect(BAB).toBeDisplayed();
20
+ await expect(sourcePanelCheckbox).toBeFocused();
21
+ });
22
+ it('03: should tab and focus the source panel', async () => {
23
+ await browser.keys(Key.Tab);
24
+ const sourcePanel = await DSShuttleV2CO.getListWrapperMid(0);
25
+ await expect(sourcePanel).toBeFocused();
26
+ });
27
+ it('04: should tab and focus the BAB', async () => {
28
+ await browser.keys(Key.Tab);
29
+ const BAB = await DSShuttleV2CO.getMoveMultipleButton(0);
30
+ await expect(BAB).toBeFocused();
31
+ });
32
+ it('05: should tab and focus the loadmore', async () => {
33
+ await browser.keys(Key.Tab);
34
+ const loadMore = await DSShuttleV2CO.getListBottomLoadMoreBtn(0);
35
+ await expect(loadMore).toBeFocused();
36
+ });
37
+ it('06: should tab and focus the global checkbox from destination panel', async () => {
38
+ await browser.keys(Key.Tab);
39
+ const destinationPanelCheckbox = await DSShuttleV2CO.getCheckboxByIndex(1);
40
+ await expect(destinationPanelCheckbox).toBeFocused();
41
+ });
42
+ it('07: should move all the items to destination panel', async () => {
43
+ await browser.keys(Key.Return);
44
+ await browser.keys(Key.Tab);
45
+ await browser.keys(Key.Tab);
46
+ await browser.keys(Key.Return);
47
+ const emptyListWrapper = await DSShuttleV2CO.getEmptyListWrapper();
48
+ await expect(emptyListWrapper).toHaveText(expect.stringContaining('There are no items to display'));
49
+ });
50
+ it('08: should load more items and focus the panel body', async () => {
51
+ await browser.keys(Key.Tab);
52
+ await browser.keys(Key.Return);
53
+ // eslint-disable-next-line wdio/no-pause
54
+ await browser.pause(500); // wait for load more to finish
55
+ const destinationPanel = await DSShuttleV2CO.getListWrapperMid(1);
56
+ const destinationItems = (await DSShuttleV2CO.getItemsFromDestination()).length;
57
+ await expect(destinationItems).toBe(3);
58
+ await expect(destinationPanel).toBeFocused();
59
+ });
60
+ });
61
+ }