dimsum-e2e-tests 3.70.0-next.44 → 3.70.0-next.46

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 (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/ds-autocomplete/slots/DSAutocomplete.slots.func.spec.js +6 -1
  3. package/ds-card/DSCard.cardv2_v1.func.spec.js +54 -0
  4. package/ds-card/DSCard.cardv2_v1.visual.spec.js +29 -0
  5. package/ds-card/DSCardCO.js +4 -0
  6. package/ds-card-v3/DSCardV3CO.js +78 -0
  7. package/ds-card-v3/accordion/DSCardV3.accordion.axe-core.func.spec.js +28 -0
  8. package/ds-card-v3/accordion/DSCardV3.accordion.visual.spec.js +4 -6
  9. package/ds-card-v3/disabled/DSCardV3.disabled.visual.spec.js +1 -2
  10. package/ds-card-v3/drag-n-drop/DSCardV3.DnD.axe-core.func.spec.js +61 -0
  11. package/ds-card-v3/drag-n-drop/DSCardV3.DnD.func.spec.js +129 -0
  12. package/ds-card-v3/drag-n-drop/DSCardV3.DnD.reorder.func.spec.js +73 -0
  13. package/ds-card-v3/drag-n-drop/DSCardV3.DnD.visual.spec.js +5 -12
  14. package/ds-card-v3/global-attributes/DSCardV3.global-attributes.axe-core.func.spec.js +33 -0
  15. package/ds-card-v3/global-attributes/DSCardV3.global-attributes.visual.spec.js +20 -0
  16. package/ds-card-v3/multi-select/DSCardV3.multiselect.keyboard.func.spec.js +65 -0
  17. package/ds-card-v3/multi-select/DSCardV3.multiselect.visual.spec.js +17 -0
  18. package/ds-card-v3/multiple-action/DSCardV3.multiple-action.func.spec.js +53 -0
  19. package/ds-card-v3/multiple-action/DSCardV3.multiple-action.visual.spec.js +18 -0
  20. package/ds-card-v3/multiple-control/DSCardV3.multi-control.func.spec.js +25 -0
  21. package/ds-card-v3/no-action/DSCardV3.no-action.axe-core.func.spec.js +22 -0
  22. package/ds-card-v3/no-action/DSCardV3.no-action.func.spec.js +23 -0
  23. package/ds-card-v3/no-action/DSCardV3.no-action.visual.spec.js +15 -0
  24. package/ds-card-v3/notification-badges/DSCardV3.notification-badges.func.spec.js +19 -0
  25. package/ds-card-v3/reflow/DSCardV3.reflow.axe-core.func.spec.js +28 -0
  26. package/ds-card-v3/reflow/DSCardV3.reflow.func.spec.js +36 -0
  27. package/ds-card-v3/reflow/DSCardV3.reflow.visual.spec.js +1 -2
  28. package/ds-card-v3/single-select/DSCardV3.single-select.axe-core.func.spec.js +37 -0
  29. package/ds-card-v3/single-select/DSCardV3.single-select.visual.spec.js +1 -2
  30. package/ds-card-v3/slots/DSCardV3.slots.visual.spec.js +1 -2
  31. package/ds-card-v3/variant-accented/DSCardV3.variant-accented.func.spec.js +28 -0
  32. package/ds-card-v3/variant-accented/DSCardV3.variant-accented.visual.spec.js +35 -0
  33. package/ds-card-v3/variant-accented-disabled/DSCardV3.variant-accented-disabled.func.spec.js +53 -0
  34. package/ds-card-v3/variant-disabled/DSCardV3.variant-disabled.axe-core.func.spec.js +22 -0
  35. package/ds-chat/DSChatCO.js +3 -3
  36. package/ds-chat/components/ComposerCO.js +1 -1
  37. package/ds-chat/components/HeaderCO.js +1 -1
  38. package/ds-controlled-form/react-hook-form/ReactHook.func.spec.js +1 -3
  39. package/ds-data-table-async/components/HeaderCO.js +5 -1
  40. package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.axe-core.func.spec.js +1 -1
  41. package/ds-form-date-time-picker/DSControlledDateTimePickerCO.js +7 -0
  42. package/ds-form-date-time-picker/date-time-full/DateTimeFull.axe-core.func.spec.js +8 -1
  43. package/ds-form-date-time-picker/date-time-full/DateTimePicker.DateTimeFull.visual.spec.js +9 -0
  44. package/ds-hooks/DSHookCO.js +1 -22
  45. package/ds-menu-button/slots/DSMenuButton.slots.axe-core.func.spec.js +28 -0
  46. package/ds-menu-button/slots/DSMenuButton.slots.func.spec.js +19 -0
  47. package/ds-shuttle-v2/explicit-selection-ui/DSShuttleV2.explicit-selection-ui.visual.spec.js +3 -0
  48. package/package.json +150 -150
  49. package/paths.js +0 -2
  50. package/ds-hooks/DSHook.func.spec.js +0 -60
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 3.70.0-next.46 (2026-07-17)
7
+
8
+ ### Bug Fixes
9
+
10
+ - ds-global-header:: search toggle pass axe core scan [PUI-17970](https://jira.elliemae.io/browse/PUI-17970) ([#8176](https://git.elliemae.io/platform-ui/dimsum/issues/8176)) ([738a9b2](https://git.elliemae.io/platform-ui/dimsum/commit/738a9b28a0e138a178517f6b9b40dccf03901a3b))
11
+
12
+ ## 3.70.0-next.45 (2026-07-14)
13
+
14
+ ### Bug Fixes
15
+
16
+ - ds-drag-and-drop:: correct tree dnd screen reader announcements [PUI-18684](https://jira.elliemae.io/browse/PUI-18684) ([#8170](https://git.elliemae.io/platform-ui/dimsum/issues/8170)) ([7591ec9](https://git.elliemae.io/platform-ui/dimsum/commit/7591ec9bc54acadaca6912add3f51837977dddc3))
17
+
6
18
  ## 3.70.0-next.44 (2026-07-13)
7
19
 
8
20
  **Note:** Version bump only for package dimsum-e2e-tests
@@ -1,7 +1,12 @@
1
1
  import { Key } from 'webdriverio';
2
2
  import DSAutocompleteCO from '../DSAutocompleteCO';
3
3
 
4
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
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
+ ) {
5
10
  describe('PUI-17529 - Autocomplete:: Slots -Func', () => {
6
11
  before('loading page', async () => {
7
12
  const errorOnGo = await DSAutocompleteCO.slots.go();
@@ -0,0 +1,54 @@
1
+ import DSCardCO from './DSCardCO';
2
+
3
+ if (
4
+ (!browser.capabilities['ice:options'].isPhone &&
5
+ !browser.capabilities['ice:options'].isTablet &&
6
+ browser.capabilities.browserName === 'chrome') ||
7
+ browser.capabilities.browserName === 'Chrome'
8
+ ) {
9
+ describe('PUI-18706 - Card V2, no native title attribute on container', () => {
10
+ before('loading page', async () => {
11
+ const errorOnGo = await DSCardCO.V2URL.go();
12
+ if (errorOnGo) throw errorOnGo;
13
+ });
14
+ it('01: the card container does not render a native title attribute', async () => {
15
+ const card = await DSCardCO.getCard();
16
+ const titleAttr = await card.getAttribute('title');
17
+ await expect(titleAttr).toBeNull();
18
+ });
19
+ it('02: the title still renders as visible header text', async () => {
20
+ const header = await DSCardCO.getCardHeader();
21
+ await expect(header).toBeDisplayed();
22
+ await expect(header).toHaveText(expect.stringContaining('Card Title'));
23
+ });
24
+ it('03: hovering inside the card never exposes the section name as a native tooltip', async () => {
25
+ const card = await DSCardCO.getCard();
26
+ await card.moveTo();
27
+ const sectionTitleTooltip = await card.$('[title="Card Title"]');
28
+ await expect(sectionTitleTooltip).not.toBeExisting();
29
+ });
30
+ });
31
+
32
+ describe('PUI-18724 - Card V1, no native title attribute on header', () => {
33
+ before('loading page', async () => {
34
+ const errorOnGo = await DSCardCO.button.go();
35
+ if (errorOnGo) throw errorOnGo;
36
+ });
37
+ it('01: the card header does not render a native title attribute', async () => {
38
+ const header = await DSCardCO.getV1CardHeader();
39
+ const titleAttr = await header.getAttribute('title');
40
+ await expect(titleAttr).toBeNull();
41
+ });
42
+ it('02: the title still renders as visible header text', async () => {
43
+ const header = await DSCardCO.getV1CardHeader();
44
+ await expect(header).toBeDisplayed();
45
+ await expect(header).toHaveText(expect.stringContaining('Loren ipsum dolor'));
46
+ });
47
+ it('03: hovering inside the card never exposes the section name as a native tooltip', async () => {
48
+ const header = await DSCardCO.getV1CardHeader();
49
+ await header.moveTo();
50
+ const sectionTitleTooltip = await header.$('[title="Loren ipsum dolor"]');
51
+ await expect(sectionTitleTooltip).not.toBeExisting();
52
+ });
53
+ });
54
+ }
@@ -0,0 +1,29 @@
1
+ import DSCardCO from './DSCardCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ describe('PUI-18728 - DSCard:: V2 header title renders unchanged - Visual', () => {
5
+ before('loading page', async () => {
6
+ const errorOnGo = await DSCardCO.V2URL.go();
7
+ if (errorOnGo) throw errorOnGo;
8
+ const card = await DSCardCO.getCard();
9
+ await card.waitForDisplayed({ timeout: 5000 });
10
+ });
11
+ it('should render the V2 card header title unchanged', async () => {
12
+ const snapshot = await browser.checkSnapshot(DSCardCO.snapshotPath('cardv2-header-title'));
13
+ await expect(snapshot).toEqual(0);
14
+ });
15
+ });
16
+
17
+ describe('PUI-18729 - DSCard:: V1 header title renders unchanged - Visual', () => {
18
+ before('loading page', async () => {
19
+ const errorOnGo = await DSCardCO.button.go();
20
+ if (errorOnGo) throw errorOnGo;
21
+ const header = await DSCardCO.getV1CardHeader();
22
+ await header.waitForDisplayed({ timeout: 5000 });
23
+ });
24
+ it('should render the V1 card header title unchanged', async () => {
25
+ const snapshot = await browser.checkSnapshot(DSCardCO.snapshotPath('cardv1-header-title'));
26
+ await expect(snapshot).toEqual(0);
27
+ });
28
+ });
29
+ }
@@ -50,6 +50,10 @@ export default class DSCardCO extends PageObject {
50
50
  return $('[data-testid="em-ds-card-header"]');
51
51
  }
52
52
 
53
+ static async getV1CardHeader() {
54
+ return $('[data-testid="ds-card-header"]');
55
+ }
56
+
53
57
  static async getCardDetailContainer() {
54
58
  return $('[data-testid="card-detail-container"]');
55
59
  }
@@ -17,6 +17,8 @@ export default class DSCardV3CO extends PageObject {
17
17
 
18
18
  static multiActionURL = new Urlbuilder(PATH_E2E_CARD_V3, 'multi-action-test');
19
19
 
20
+ static multipleControlURL = new Urlbuilder(PATH_E2E_CARD_V3, 'multiple-control-test');
21
+
20
22
  static multiSelectURL = new Urlbuilder(PATH_E2E_CARD_V3, 'multi-select-test');
21
23
 
22
24
  static noActionURL = new Urlbuilder(PATH_E2E_CARD_V3, 'no-action-test');
@@ -31,6 +33,12 @@ export default class DSCardV3CO extends PageObject {
31
33
 
32
34
  static globalAttributesURL = new Urlbuilder(PATH_E2E_CARD_V3, 'global-attributes-test');
33
35
 
36
+ static variantDisabledURL = new Urlbuilder(PATH_E2E_CARD_V3, 'variant-disabled-test');
37
+
38
+ static variantAccentURL = new Urlbuilder(PATH_E2E_CARD_V3, 'variant-accented-test');
39
+
40
+ static variantAccentedDisabledURL = new Urlbuilder(PATH_E2E_CARD_V3, 'variant-accented-disabled-test');
41
+
34
42
  // selectors
35
43
  static async getActionAreaByIndex(index = 0) {
36
44
  return $$('[data-testid="ds-cardv3-action-area"]')[index];
@@ -130,4 +138,74 @@ export default class DSCardV3CO extends PageObject {
130
138
  static snapshotPath(example = 'basic') {
131
139
  return PageObject.getSnapshotPathBuilder('card-v3', example);
132
140
  }
141
+
142
+ static async getButtonByIndex(index) {
143
+ return $$('[data-testid="ds-button"]')[index];
144
+ }
145
+
146
+ static async getCardCheckBoxByIndex(index) {
147
+ return $$('[data-testid="ds-checkbox"]')[index];
148
+ }
149
+
150
+ static async getByRole() {
151
+ return $('div[role="img"][aria-label="3 new notifications"]');
152
+ }
153
+
154
+ static async getElement(index) {
155
+ return $$('[data-testid="ds-typography-element"]')[index];
156
+ }
157
+
158
+ static async getRadioButtonByIndex(index) {
159
+ return $$('[data-testid="ds-radio"]')[index];
160
+ }
161
+
162
+ static async getDnDLiveRegion() {
163
+ return $('[id^="DndLiveRegion"]');
164
+ }
165
+
166
+ static async getDnDInstructions() {
167
+ return $('[id^="DndDescribedBy"]');
168
+ }
169
+
170
+ static async getDnDLists() {
171
+ return $$('[role="list"]');
172
+ }
173
+
174
+ static async getDnDListByIndex(index = 0) {
175
+ return $$('[role="list"]')[index];
176
+ }
177
+
178
+ static async getDnDListItems() {
179
+ return $$('[role="listitem"]');
180
+ }
181
+
182
+ static async getElementById(id) {
183
+ return $(`#${id}`);
184
+ }
185
+
186
+ static async getCardByDataId(id) {
187
+ return $(`[data-id="${id}"]`);
188
+ }
189
+
190
+ static async getCardDataIdsByListIndex(index = 0) {
191
+ const list = await DSCardV3CO.getDnDListByIndex(index);
192
+ const cards = await list.$$('[data-id]');
193
+ return cards.map((card) => card.getAttribute('data-id'));
194
+ }
195
+
196
+ static async expectCardOrderInList(index, expectedOrder) {
197
+ let actualOrder = [];
198
+ await browser.waitUntil(
199
+ async () => {
200
+ actualOrder = await DSCardV3CO.getCardDataIdsByListIndex(index);
201
+ return JSON.stringify(actualOrder) === JSON.stringify(expectedOrder);
202
+ },
203
+ {
204
+ timeout: 5000,
205
+ timeoutMsg: `Expected list ${index} to be ordered ${JSON.stringify(expectedOrder)} but was ${JSON.stringify(
206
+ actualOrder,
207
+ )}`,
208
+ },
209
+ );
210
+ }
133
211
  }
@@ -0,0 +1,28 @@
1
+ import DSCardV3CO from '../DSCardV3CO';
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-18713 - Accordion, basic -AxeCore', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSCardV3CO.accordionURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('01: should display the accordion closed and pass axecore test', async () => {
16
+ await (await DSCardV3CO.getAccordionButton()).waitForDisplayed();
17
+ const result = await axeCoreCheck();
18
+ expect(result.length).toBe(0);
19
+ });
20
+ it('02: should open the accordion and pass axecore test', async () => {
21
+ await (await DSCardV3CO.getAccordionButton()).click();
22
+ const getAccordionFirstElement = await DSCardV3CO.getElement(2);
23
+ await getAccordionFirstElement.waitForDisplayed();
24
+ const result = await axeCoreCheck();
25
+ expect(result.length).toBe(0);
26
+ });
27
+ });
28
+ }
@@ -7,15 +7,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
7
7
  if (errorOnGo) throw errorOnGo;
8
8
  });
9
9
  it('01: should display accordion card-v3 closed', async () => {
10
- await browser.eyesOpen();
11
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-closed'));
10
+ const snapshot = await browser.percyCheckScreenshot();
12
11
  await expect(snapshot).toEqual(0);
13
12
  });
14
13
  it('02: should display accordion card-v3 expanded', async () => {
15
- await browser.eyesOpen();
16
- const expandContentButton = await DSCardV3CO.getExpandContentButton();
17
- await expandContentButton.click();
18
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-expanded'));
14
+ const accordionButton = await DSCardV3CO.getAccordionButton();
15
+ await accordionButton.click();
16
+ const snapshot = await browser.percyCheckScreenshot();
19
17
  await expect(snapshot).toEqual(0);
20
18
  });
21
19
  });
@@ -7,10 +7,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
7
7
  if (errorOnGo) throw errorOnGo;
8
8
  });
9
9
  it('01: should display disabled cards (standard and accented)', async () => {
10
- await browser.eyesOpen();
11
10
  const cardContainer = await DSCardV3CO.getCardContainerByIndex(0);
12
11
  await cardContainer.waitForDisplayed();
13
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-disabled'));
12
+ const snapshot = await browser.percyCheckScreenshot();
14
13
  await expect(snapshot).toEqual(0);
15
14
  });
16
15
  });
@@ -0,0 +1,61 @@
1
+ import { Key } from 'webdriverio';
2
+ import DSCardV3CO from '../DSCardV3CO';
3
+ import { axeCoreCheck } from '../../helpers';
4
+
5
+ // axe-core coverage for the PUI-17889 accessibility fix on the CardV3 Drag and Drop example.
6
+ if (
7
+ (!browser.capabilities['ice:options'].isPhone &&
8
+ !browser.capabilities['ice:options'].isTablet &&
9
+ browser.capabilities.browserName === 'chrome') ||
10
+ browser.capabilities.browserName === 'Chrome'
11
+ ) {
12
+ describe('PUI-18732 - DSCardV3:: Drag and Drop accessibility - axe-core', () => {
13
+ beforeEach('loading page', async () => {
14
+ const errorOnGo = await DSCardV3CO.dragAndDropURL.go();
15
+ if (errorOnGo) throw errorOnGo;
16
+ });
17
+
18
+ it('01: should pass axe-core in the idle (resting) state', async () => {
19
+ const result = await axeCoreCheck();
20
+ await expect(result).toHaveLength(0);
21
+ });
22
+
23
+ it('02: should pass axe-core while an item is being dragged and cancelled - [TAB][ENTER][ESC]', async () => {
24
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
25
+ await browser.keys(Key.Tab);
26
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
27
+ await expect(handle).toBeFocused();
28
+ await browser.keys(Key.Return);
29
+ await browser.waitUntil(
30
+ async () => (await liveRegion.getProperty('textContent')).includes('Draggable item was moved to position 1.'),
31
+ { timeoutMsg: 'Expected the live region to announce the item pickup' },
32
+ );
33
+ await browser.keys(Key.Escape);
34
+ const result = await axeCoreCheck();
35
+ await expect(result).toHaveLength(0);
36
+ });
37
+
38
+ it('03: should pass axe-core after an item has been dropped - [TAB][ENTER][ARROWDOWN][ENTER]', async () => {
39
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
40
+ await browser.keys(Key.Tab);
41
+ await browser.keys(Key.Return);
42
+ await browser.waitUntil(
43
+ async () => (await liveRegion.getProperty('textContent')).includes('was moved to position'),
44
+ { timeoutMsg: 'Expected the live region to announce the item pickup' },
45
+ );
46
+
47
+ await browser.keys(Key.ArrowDown);
48
+ await browser.waitUntil(
49
+ async () => (await liveRegion.getProperty('textContent')).includes('was moved to position'),
50
+ { timeoutMsg: 'Expected the live region to announce the move before dropping' },
51
+ );
52
+ await browser.keys(Key.Return);
53
+ await browser.waitUntil(
54
+ async () => (await liveRegion.getProperty('textContent')).includes('was dropped over position'),
55
+ { timeoutMsg: 'Expected the live region to announce the drop' },
56
+ );
57
+ const result = await axeCoreCheck();
58
+ await expect(result).toHaveLength(0);
59
+ });
60
+ });
61
+ }
@@ -0,0 +1,129 @@
1
+ /* eslint-disable max-lines */
2
+ import { Key } from 'webdriverio';
3
+ import DSCardV3CO from '../DSCardV3CO';
4
+
5
+ // Functional coverage - no interaction for the PUI-17889 accessibility fix on the CardV3 Drag and Drop example.
6
+ if (
7
+ !browser.capabilities['ice:options'].isPhone &&
8
+ !browser.capabilities['ice:options'].isTablet &&
9
+ (browser.capabilities.browserName === 'Chrome' || browser.capabilities.browserName === 'chrome')
10
+ ) {
11
+ describe('PUI-18685 - DSCardV3:: Drag and Drop accessibility - Func', () => {
12
+ before('loading page', async () => {
13
+ const errorOnGo = await DSCardV3CO.dragAndDropURL.go();
14
+ if (errorOnGo) throw errorOnGo;
15
+ });
16
+
17
+ it('01: sortable containers are exposed as lists with an accessible name', async () => {
18
+ const lists = await DSCardV3CO.getDnDLists();
19
+ await expect(lists).toHaveLength(2);
20
+ const [backlog, inProgress] = lists;
21
+ await expect(backlog).toHaveAttribute('aria-labelledby', 'dnd-heading-container1');
22
+ await expect(inProgress).toHaveAttribute('aria-labelledby', 'dnd-heading-container2');
23
+ });
24
+
25
+ it('02: list accessible-name targets exist and expose readable headings', async () => {
26
+ const backlogHeading = await DSCardV3CO.getElementById('dnd-heading-container1');
27
+ const inProgressHeading = await DSCardV3CO.getElementById('dnd-heading-container2');
28
+ await expect(backlogHeading).toBeExisting();
29
+ await expect(inProgressHeading).toBeExisting();
30
+ await expect(backlogHeading).toHaveText('Backlog');
31
+ await expect(inProgressHeading).toHaveText('In Progress');
32
+ });
33
+
34
+ it('03: every card is programmatically exposed as a list item', async () => {
35
+ const listItems = await DSCardV3CO.getDnDListItems();
36
+ await expect(listItems).toHaveLength(12);
37
+ });
38
+
39
+ it('04: drag handle exposes aria-roledescription="sortable"', async () => {
40
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
41
+ await expect(handle).toHaveAttribute('aria-roledescription', 'sortable');
42
+ });
43
+
44
+ it('05: drag handle references existing, non-empty drag instructions', async () => {
45
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
46
+ const describedBy = await handle.getAttribute('aria-describedby');
47
+ expect(describedBy).toContain('DndDescribedBy');
48
+
49
+ const instructions = await DSCardV3CO.getDnDInstructions();
50
+ await expect(instructions).toBeExisting();
51
+ const instructionText = await instructions.getProperty('textContent');
52
+ expect(instructionText).toBeTruthy();
53
+ });
54
+
55
+ it('06: a live region is present to announce drag operations', async () => {
56
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
57
+ await liveRegion.waitForExist();
58
+ await expect(liveRegion).toHaveAttribute('role', 'status');
59
+ await expect(liveRegion).toHaveAttribute('aria-live', 'assertive');
60
+ await expect(liveRegion).toHaveAttribute('aria-atomic', 'true');
61
+ });
62
+ });
63
+
64
+ // Functional coverage for the PUI-17889 accessibility fix on the CardV3 Drag and Drop example.
65
+ describe('PUI-18730 - DSCardV3:: Drag and Drop keyboard announcements - Func', () => {
66
+ beforeEach('loading page', async () => {
67
+ const errorOnGo = await DSCardV3CO.dragAndDropURL.go();
68
+ if (errorOnGo) throw errorOnGo;
69
+ });
70
+
71
+ it('01: picking up an item sets aria-pressed - [TAB][ENTER]', async () => {
72
+ await browser.keys(Key.Tab);
73
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
74
+ await expect(handle).toBeFocused();
75
+ await browser.keys(Key.Return);
76
+ await expect(handle).toHaveAttribute('aria-pressed', 'true');
77
+ });
78
+
79
+ it('02: moving an item announces its new position - [TAB][ENTER][ARROWDOWN]', async () => {
80
+ await browser.keys(Key.Tab);
81
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
82
+ await expect(handle).toBeFocused();
83
+ await browser.keys(Key.Space);
84
+ await expect(handle).toHaveAttribute('aria-pressed', 'true');
85
+ await browser.keys(Key.ArrowDown);
86
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
87
+ await browser.waitUntil(
88
+ async () => (await liveRegion.getProperty('textContent')).includes('was moved to position'),
89
+ { timeoutMsg: 'Expected the live region to announce the new position' },
90
+ );
91
+ const announcement = await liveRegion.getProperty('textContent');
92
+ expect(announcement).toContain('was moved to position');
93
+ });
94
+
95
+ it('03: dropping an item announces the resulting position - [TAB][ENTER][ARROWDOWN][ENTER]', async () => {
96
+ await browser.keys(Key.Tab);
97
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
98
+ await expect(handle).toBeFocused();
99
+ await browser.keys(Key.Space);
100
+ await expect(handle).toHaveAttribute('aria-pressed', 'true');
101
+ await browser.keys(Key.ArrowDown);
102
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
103
+ await browser.keys(Key.Space);
104
+ await browser.waitUntil(
105
+ async () => (await liveRegion.getProperty('textContent')).includes('was dropped at position'),
106
+ { timeoutMsg: 'Expected the live region to announce the drop' },
107
+ );
108
+ const announcement = await liveRegion.getProperty('textContent');
109
+ expect(announcement).toContain('was dropped at position');
110
+ });
111
+
112
+ it('04: cancelling a drag is announced and clears aria-pressed - [TAB][ENTER][ESCAPE]', async () => {
113
+ await browser.keys(Key.Tab);
114
+ const handle = await DSCardV3CO.getCardHandlerByIndex(0);
115
+ await expect(handle).toBeFocused();
116
+ await browser.keys(Key.Return);
117
+ await expect(handle).toHaveAttribute('aria-pressed', 'true');
118
+ await browser.keys(Key.Escape);
119
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
120
+ await browser.waitUntil(
121
+ async () => (await liveRegion.getProperty('textContent')).includes('Dragging was cancelled'),
122
+ { timeoutMsg: 'Expected the live region to announce the cancellation' },
123
+ );
124
+ const announcement = await liveRegion.getProperty('textContent');
125
+ expect(announcement).toContain('Dragging was cancelled');
126
+ await expect(handle).not.toHaveAttribute('aria-pressed', 'true');
127
+ });
128
+ });
129
+ }
@@ -0,0 +1,73 @@
1
+ /* eslint-disable max-lines */
2
+ import { Key } from 'webdriverio';
3
+ import DSCardV3CO from '../DSCardV3CO';
4
+ import { tabStops, sendKeyRepeat } from '../../helpers';
5
+
6
+ // The "In Progress" container (list index 1) holds cards 7..12 in this order.
7
+ const IN_PROGRESS_LIST_INDEX = 1;
8
+ const INITIAL_ORDER = ['7', '8', '9', '10', '11', '12'];
9
+ const LAST_CARD_HANDLE_INDEX = 11;
10
+
11
+ if (
12
+ !browser.capabilities['ice:options'].isPhone &&
13
+ !browser.capabilities['ice:options'].isTablet &&
14
+ (browser.capabilities.browserName === 'Chrome' || browser.capabilities.browserName === 'chrome')
15
+ ) {
16
+ describe('PUI-18731 - DSCardV3:: Drag and Drop keyboard re-order - Func', () => {
17
+ beforeEach('loading page', async () => {
18
+ const errorOnGo = await DSCardV3CO.dragAndDropURL.go();
19
+ if (errorOnGo) throw errorOnGo;
20
+ });
21
+
22
+ const pickUpLastCard = async () => {
23
+ await tabStops(INITIAL_ORDER.length * 2);
24
+ const handle = await DSCardV3CO.getCardHandlerByIndex(LAST_CARD_HANDLE_INDEX);
25
+ await expect(handle).toBeFocused();
26
+ await browser.keys(Key.Return);
27
+ await expect(handle).toHaveAttribute('aria-pressed', 'true');
28
+ return handle;
29
+ };
30
+
31
+ it('01: the In Progress list renders cards 7..12 in their initial order', async () => {
32
+ await DSCardV3CO.expectCardOrderInList(IN_PROGRESS_LIST_INDEX, INITIAL_ORDER);
33
+ });
34
+
35
+ it('02: moving the last card up announces the new (decremented) position - [TAB*12][ENTER][ARROWUP]', async () => {
36
+ await pickUpLastCard();
37
+ await browser.keys(Key.ArrowUp);
38
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
39
+ const announcement = await liveRegion.getProperty('textContent');
40
+ expect(announcement).toContain('item was moved to position 5');
41
+ });
42
+
43
+ it('03: dropping the last card after moving up re-orders it in the DOM - [...][ARROWUP][ENTER]', async () => {
44
+ await pickUpLastCard();
45
+ await browser.keys(Key.ArrowUp);
46
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
47
+ await browser.keys(Key.Return);
48
+ const finalAnnouncement = await liveRegion.getProperty('textContent');
49
+ expect(finalAnnouncement).toContain('item was dropped at position 5');
50
+ await DSCardV3CO.expectCardOrderInList(IN_PROGRESS_LIST_INDEX, ['7', '8', '9', '10', '12', '11']);
51
+ });
52
+
53
+ it('04: moving the last card to the first position re-orders it to the top - [...][ARROWUP*5][ENTER]', async () => {
54
+ await pickUpLastCard();
55
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
56
+ await sendKeyRepeat(Key.ArrowUp, INITIAL_ORDER.length - 1);
57
+ await browser.keys(Key.Return);
58
+ const finalAnnouncement = await liveRegion.getProperty('textContent');
59
+ expect(finalAnnouncement).toContain('item was dropped at position 1');
60
+ await DSCardV3CO.expectCardOrderInList(IN_PROGRESS_LIST_INDEX, ['12', '7', '8', '9', '10', '11']);
61
+ });
62
+
63
+ it('05: cancel after moving the last card up keeps the original order intact - [...][ARROWUP][ESC]', async () => {
64
+ await pickUpLastCard();
65
+ await browser.keys(Key.ArrowUp);
66
+ const liveRegion = await DSCardV3CO.getDnDLiveRegion();
67
+ await browser.keys(Key.Escape);
68
+ const finalAnnouncement = await liveRegion.getProperty('textContent');
69
+ expect(finalAnnouncement).toContain('Dragging was cancelled');
70
+ await DSCardV3CO.expectCardOrderInList(IN_PROGRESS_LIST_INDEX, INITIAL_ORDER);
71
+ });
72
+ });
73
+ }
@@ -9,41 +9,36 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
9
9
  if (errorOnGo) throw errorOnGo;
10
10
  });
11
11
  it('01: should focus on the drag handler', async () => {
12
- await browser.eyesOpen();
13
12
  await browser.keys(Key.Tab);
14
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-dnd-handler-focused'));
13
+ const snapshot = await browser.percyCheckScreenshot();
15
14
  await expect(snapshot).toEqual(0);
16
15
  });
17
16
  it('02: should drag the item and display the ghost element', async () => {
18
- await browser.eyesOpen();
19
17
  await browser.keys(Key.Tab);
20
18
  await browser.keys(Key.Return);
21
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-dnd-ghost-element'));
19
+ const snapshot = await browser.percyCheckScreenshot();
22
20
  await expect(snapshot).toEqual(0);
23
21
  });
24
22
  it('03: should move the item and drop it in a last position', async () => {
25
- await browser.eyesOpen();
26
23
  await browser.keys(Key.Tab);
27
24
  await browser.keys(Key.Return);
28
25
  await sendKeyRepeat(Key.ArrowDown, 5);
29
26
  await browser.keys(Key.Return);
30
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-dnd-drop-last-position'));
27
+ const snapshot = await browser.percyCheckScreenshot();
31
28
  await expect(snapshot).toEqual(0);
32
29
  });
33
30
  // https://jira.elliemae.io/browse/PUI-15649
34
31
  it('04: should move an item to the the first position', async () => {
35
- await browser.eyesOpen();
36
32
  await tabStops(12);
37
33
  await browser.keys(Key.Return);
38
34
  await sendKeyRepeat(Key.ArrowUp, 5);
39
35
  await browser.keys(Key.ArrowLeft);
40
36
  await browser.keys(Key.Return);
41
- const snapshot = await browser.eyesCheckSnapshot(DSCardV3CO.snapshotPath('card-v3-dnd-drop-first-position'));
37
+ const snapshot = await browser.percyCheckScreenshot();
42
38
  await expect(snapshot).toEqual(0);
43
39
  });
44
40
 
45
41
  it('05: should move an item to the first position and back to the last position diferent column', async () => {
46
- await browser.eyesOpen();
47
42
  await tabStops(12);
48
43
  await browser.keys(Key.Return);
49
44
  await sendKeyRepeat(Key.ArrowUp, 5);
@@ -53,9 +48,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
53
48
  await browser.keys(Key.Return);
54
49
  await sendKeyRepeat(Key.ArrowDown, 6);
55
50
  await browser.keys(Key.Return);
56
- const snapshot = await browser.eyesCheckSnapshot(
57
- DSCardV3CO.snapshotPath('card-v3-dnd-drop-last-position-first-column'),
58
- );
51
+ const snapshot = await browser.percyCheckScreenshot();
59
52
  await expect(snapshot).toEqual(0);
60
53
  });
61
54
  });
@@ -0,0 +1,33 @@
1
+ import DSCardV3CO from '../DSCardV3CO';
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-18714 - CardV3:: GlobalAttributes - axe-core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSCardV3CO.globalAttributesURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('01: should display the accordion closed and pass axecore test', async () => {
16
+ await (await DSCardV3CO.getAccordionButton()).waitForDisplayed();
17
+ const result = await axeCoreCheck();
18
+ await expect(result).toHaveLength(0);
19
+ });
20
+ it('02: should open the accordion and pass axecore test', async () => {
21
+ await (await DSCardV3CO.getAccordionButton()).click();
22
+ const getAccordionFirstElement = await DSCardV3CO.getElement(2);
23
+ await getAccordionFirstElement.waitForDisplayed();
24
+ const result = await axeCoreCheck();
25
+ await expect(result).toHaveLength(0);
26
+ });
27
+ it('03: should open the menu and pass axecore test', async () => {
28
+ await (await DSCardV3CO.getButtonByIndex(1)).click();
29
+ const result = await axeCoreCheck();
30
+ await expect(result).toHaveLength(0);
31
+ });
32
+ });
33
+ }