dimsum-e2e-tests 3.70.0-next.2 → 3.70.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/ds-data-table-async/components/HeaderCO.js +22 -10
  3. package/ds-dialog/DSDialog.visual.spec.js +16 -31
  4. package/ds-dialog/DSDialogCO.js +58 -0
  5. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.axe-core.func.spec.js +27 -0
  6. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.func.spec.js +56 -0
  7. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.visual.spec.js +20 -0
  8. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.axe-core.func.spec.js +25 -0
  9. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.func.spec.js +52 -0
  10. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.visual.spec.js +20 -0
  11. package/ds-dialog/axe-core/DSDialog.accessible-form.axe-core.func.spec.js +25 -0
  12. package/ds-dialog/axe-core/DSDialog.basic.axe-core.func.spec.js +25 -0
  13. package/ds-dialog/axe-core/DSDialog.centered.axe-core.func.spec.js +25 -0
  14. package/ds-dialog/axe-core/DSDialog.decision.axe-core.func.spec.js +57 -0
  15. package/ds-dialog/axe-core/DSDialog.long-body.axe-core.func.spec.js +25 -0
  16. package/ds-dialog/axe-core/DSDialog.warning.axe-core.func.spec.js +24 -0
  17. package/ds-dialog/axe-core/DSDialog.wizard.axe-core.func.spec.js +28 -0
  18. package/ds-dialog/click-outside/DSDialog.click-outside.func.spec.js +31 -0
  19. package/ds-dialog/esc-close/DSDialog.esc-close.func.spec.js +31 -0
  20. package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.axe-core.func.spec.js +46 -0
  21. package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.func.spec.js +50 -0
  22. package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.axe-core.func.spec.js +25 -0
  23. package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.visual.spec.js +37 -0
  24. package/ds-dialog/single-button-footer/DSDialog.single-button-footer.axe-core.func.spec.js +25 -0
  25. package/ds-dialog/single-button-footer/DSDialog.single-button-footer.visual.spec.js +20 -0
  26. package/ds-dialog/size-variants/DSDialog.size-variants.visual.spec.js +116 -0
  27. package/ds-global-header/GlobalHeader.axe-core.func.spec.js +30 -0
  28. package/ds-global-header/GlobalHeader.visual.spec.js +31 -0
  29. package/ds-tabs/DSTabs.visual.spec.js +1 -2
  30. package/ds-tabs/DSTabsCO.js +2 -2
  31. package/ds-tabs/with-carousel/DSTabs.with-carousel.func.spec.js +22 -7
  32. package/ds-tabs/with-carousel/DSTabs.with-carousel.visual.spec.js +9 -9
  33. package/package.json +150 -151
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.4 (2026-05-06)
7
+
8
+ ### Bug Fixes
9
+
10
+ - ds-form-combobox:: fixing defect [PUI-17903](https://jira.elliemae.io/browse/PUI-17903) ([#8007](https://git.elliemae.io/platform-ui/dimsum/issues/8007)) ([16df5f9](https://git.elliemae.io/platform-ui/dimsum/commit/16df5f9395d38d9dce4833d50c2e65ed692277a1))
11
+
12
+ ## 3.70.0-next.3 (2026-05-05)
13
+
14
+ ### Features
15
+
16
+ - ds-modal-slide:: dimsum compliance [17128] (https://jira.elliemae.io/browse/PUI- 17128) ([#7995](https://git.elliemae.io/platform-ui/dimsum/issues/7995)) ([7c772e3](https://git.elliemae.io/platform-ui/dimsum/commit/7c772e3cdd219cd45f3b32f37b4a25f9989afb3b))
17
+
6
18
  ## 3.70.0-next.2 (2026-05-05)
7
19
 
8
20
  **Note:** Version bump only for package dimsum-e2e-tests
@@ -6,17 +6,29 @@ export default class HeaderCO extends PageObject {
6
6
  static getHeaderCells = async () => $$('[data-testid="data-table-header"]');
7
7
 
8
8
  static getHeaderCellByText = async (text) => {
9
- const headerCells = await this.getHeaderCells();
10
9
  let targetHeader;
11
- for (const header of headerCells) {
12
- // eslint-disable-next-line no-await-in-loop
13
- const cellText = await header.getText();
14
- if (cellText.trim().toLowerCase().includes(text.trim().toLowerCase())) {
15
- targetHeader = header;
16
- break;
17
- }
18
- }
19
- await targetHeader.waitForDisplayed();
10
+ // Poll until a *visible* matching header cell is found. Without the isDisplayed check,
11
+ // the loop can return headers from inactive tab panels that are hidden in the DOM
12
+ // (display:none), causing waitForDisplayed to time out indefinitely in Safari.
13
+ await browser.waitUntil(
14
+ async () => {
15
+ const headerCells = await this.getHeaderCells();
16
+ for (const header of headerCells) {
17
+ // eslint-disable-next-line no-await-in-loop
18
+ const cellText = await header.getText();
19
+ if (cellText.trim().toLowerCase().includes(text.trim().toLowerCase())) {
20
+ // eslint-disable-next-line no-await-in-loop
21
+ const isDisplayed = await header.isDisplayed();
22
+ if (isDisplayed) {
23
+ targetHeader = header;
24
+ return true;
25
+ }
26
+ }
27
+ }
28
+ return false;
29
+ },
30
+ { timeout: 20000, interval: 500 },
31
+ );
20
32
  return targetHeader;
21
33
  };
22
34
 
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable max-lines */
2
2
  import { Key } from 'webdriverio';
3
- // import { Target } from '@applitools/eyes-webdriverio';
4
3
  import DSDialog from './DSDialogCO';
5
4
  import DSShuttleV2CO from '../ds-shuttle-v2/DSShuttleV2CO';
6
5
  import DSWizardCO from '../ds-wizard/DSWizardCO';
@@ -12,12 +11,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
12
11
  if (errorOnGo) throw errorOnGo;
13
12
  });
14
13
  it('should display Basic DSDialog correctly', async () => {
15
- await browser.eyesOpen();
16
14
  const triggerBtn = await DSDialog.getTriggerBtn();
17
15
  await triggerBtn.click();
18
16
  const dialog = await DSDialog.getDialog();
19
17
  await dialog.waitForDisplayed();
20
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-basic-layout'));
18
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-basic-layout'));
21
19
  await expect(snapshot).toEqual(0);
22
20
  });
23
21
  });
@@ -27,12 +25,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
27
25
  if (errorOnGo) throw errorOnGo;
28
26
  });
29
27
  it('should display Centered DSDialog correctly', async () => {
30
- await browser.eyesOpen();
31
28
  const triggerBtn = await DSDialog.getTriggerBtn();
32
29
  await triggerBtn.click();
33
30
  const dialog = await DSDialog.getDialog();
34
31
  await dialog.waitForDisplayed();
35
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-centered-layout'));
32
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-centered-layout'));
36
33
  await expect(snapshot).toEqual(0);
37
34
  });
38
35
  });
@@ -42,12 +39,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
42
39
  if (errorOnGo) throw errorOnGo;
43
40
  });
44
41
  it('should display scrollable DSDialog correctly', async () => {
45
- await browser.eyesOpen();
46
42
  const triggerBtn = await DSDialog.getTriggerBtn();
47
43
  await triggerBtn.click();
48
44
  const dialog = await DSDialog.getDialog();
49
45
  await dialog.waitForDisplayed();
50
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-scrollbody-layout'));
46
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-scrollbody-layout'));
51
47
  await expect(snapshot).toEqual(0);
52
48
  });
53
49
  });
@@ -57,12 +53,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
57
53
  if (errorOnGo) throw errorOnGo;
58
54
  });
59
55
  it('should display Information DSDialog correctly', async () => {
60
- await browser.eyesOpen();
61
56
  const triggerBtn = await DSDialog.getTriggerBtn();
62
57
  await triggerBtn.click();
63
58
  const dialog = await DSDialog.getDialog();
64
59
  await dialog.waitForDisplayed();
65
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-information-layout'));
60
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-information-layout'));
66
61
  await expect(snapshot).toEqual(0);
67
62
  });
68
63
  });
@@ -72,12 +67,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
72
67
  if (errorOnGo) throw errorOnGo;
73
68
  });
74
69
  it('should display Warning DSDialog correctly', async () => {
75
- await browser.eyesOpen();
76
70
  const triggerBtn = await DSDialog.getTriggerBtn();
77
71
  await triggerBtn.click();
78
72
  const dialog = await DSDialog.getDialog();
79
73
  await dialog.waitForDisplayed();
80
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-warning-layout'));
74
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-warning-layout'));
81
75
  await expect(snapshot).toEqual(0);
82
76
  });
83
77
  });
@@ -87,12 +81,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
87
81
  if (errorOnGo) throw errorOnGo;
88
82
  });
89
83
  it('should display Error DSDialog correctly', async () => {
90
- await browser.eyesOpen();
91
84
  const triggerBtn = await DSDialog.getTriggerBtn();
92
85
  await triggerBtn.click();
93
86
  const dialog = await DSDialog.getDialog();
94
87
  await dialog.waitForDisplayed();
95
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-error-layout'));
88
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-error-layout'));
96
89
  await expect(snapshot).toEqual(0);
97
90
  });
98
91
  });
@@ -102,12 +95,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
102
95
  if (errorOnGo) throw errorOnGo;
103
96
  });
104
97
  it('should display Success DSDialog correctly', async () => {
105
- await browser.eyesOpen();
106
98
  const triggerBtn = await DSDialog.getTriggerBtn();
107
99
  await triggerBtn.click();
108
100
  const dialog = await DSDialog.getDialog();
109
101
  await dialog.waitForDisplayed();
110
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-success-layout'));
102
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-success-layout'));
111
103
  await expect(snapshot).toEqual(0);
112
104
  });
113
105
  });
@@ -117,21 +109,19 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
117
109
  if (errorOnGo) throw errorOnGo;
118
110
  });
119
111
  it('should display Shuttle DSDialog correctly', async () => {
120
- await browser.eyesOpen();
121
112
  const triggerBtn = await DSDialog.getTriggerBtn();
122
113
  await triggerBtn.click();
123
114
  const dialog = await DSDialog.getDialog();
124
115
  await dialog.waitForDisplayed();
125
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-shuttle-layout'));
116
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-shuttle-layout'));
126
117
  await expect(snapshot).toEqual(0);
127
118
  });
128
- it('should use the drill and move button and display interacted Shuttle DSDialog correctly', async () => {
129
- await browser.eyesOpen();
119
+ it('should use drill and move button and display interacted Shuttle', async () => {
130
120
  const moveBtn = await DSShuttleV2CO.getItemActionBtn(0);
131
121
  await moveBtn.click();
132
122
  const drillBtn = await DSShuttleV2CO.getItemActionBtnDrillDownIcon(0);
133
123
  await drillBtn.click();
134
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-shuttle-interacted'));
124
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-shuttle-interacted'));
135
125
  await expect(snapshot).toEqual(0);
136
126
  });
137
127
  });
@@ -141,14 +131,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
141
131
  if (errorOnGo) throw errorOnGo;
142
132
  });
143
133
  it('should display DSDialog with wizard correctly', async () => {
144
- await browser.eyesOpen();
145
134
  const triggerBtn = await DSDialog.getTriggerBtn();
146
135
  await triggerBtn.click();
147
136
  const dialog = await DSDialog.getDialog();
148
137
  await dialog.waitForDisplayed();
149
138
  const step1 = await DSWizardCO.getStep(1);
150
139
  await step1.waitForDisplayed();
151
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-wizard-layout'));
140
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-wizard-layout'));
152
141
  await expect(snapshot).toEqual(0);
153
142
  });
154
143
  });
@@ -158,18 +147,16 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
158
147
  if (errorOnGo) throw errorOnGo;
159
148
  });
160
149
  it('should display DSDialog correctly background unshifted', async () => {
161
- await browser.eyesOpen();
162
150
  const triggerBtn = await DSDialog.getTriggerBtn();
163
151
  await triggerBtn.click();
164
152
  const dialog = await DSDialog.getDialog();
165
153
  await dialog.waitForDisplayed();
166
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-opened'));
154
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-opened'));
167
155
  await expect(snapshot).toEqual(0);
168
156
  });
169
157
  it('should display page layout correctly same background', async () => {
170
- await browser.eyesOpen();
171
158
  await browser.keys(Key.Escape);
172
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-closed'));
159
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-closed'));
173
160
  await expect(snapshot).toEqual(0);
174
161
  });
175
162
  });
@@ -179,7 +166,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
179
166
  if (errorOnGo) throw errorOnGo;
180
167
  });
181
168
  it('dialog content should be scrolled down correctly', async () => {
182
- await browser.eyesOpen();
183
169
  const triggerBtn = await DSDialog.getTriggerBtn();
184
170
  await triggerBtn.click();
185
171
  const dialog = await DSDialog.getDialog();
@@ -189,15 +175,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
189
175
  await browser.keys(Key.ArrowDown);
190
176
  await browser.keys(Key.ArrowDown);
191
177
  await browser.keys(Key.ArrowDown);
192
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-scroll-down'));
178
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-scroll-down'));
193
179
  await expect(snapshot).toEqual(0);
194
180
  });
195
181
  it('dialog content should be scrolled up correctly', async () => {
196
- await browser.eyesOpen();
197
182
  await browser.keys(Key.ArrowUp);
198
183
  await browser.keys(Key.ArrowUp);
199
184
  await browser.keys(Key.ArrowUp);
200
- const snapshot = await browser.eyesCheckSnapshot(DSDialog.snapshotPath('dialog-scroll-up'));
185
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-scroll-up'));
201
186
  await expect(snapshot).toEqual(0);
202
187
  });
203
188
  });
@@ -212,7 +197,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
212
197
  await browser.keys(Key.Enter);
213
198
  const dialog = await DSDialog.getDialog();
214
199
  await dialog.waitForDisplayed();
215
- const snapshot = await browser.checkSnapshot(DSDialog.snapshotPath('dialog-backdrop-cover-full-page'));
200
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-backdrop-cover-full-page'));
216
201
  await expect(snapshot).toEqual(0);
217
202
  });
218
203
  });
@@ -38,7 +38,37 @@ export default class DSDialog extends PageObject {
38
38
 
39
39
  static errorURL = new Urlbuilder(PATH_E2E_DIALOG, 'error-test');
40
40
 
41
+ static flexibleHeadingLevelURL = new Urlbuilder(PATH_E2E_DIALOG, 'flexible-heading-level-test');
42
+
43
+ static alertDialogCriticalURL = new Urlbuilder(PATH_E2E_DIALOG, 'alert-dialog-critical-test');
44
+
45
+ static alertDialogDismissibleURL = new Urlbuilder(PATH_E2E_DIALOG, 'alert-dialog-dismissible-test');
46
+
47
+ static sizeVariantsURL = new Urlbuilder(PATH_E2E_DIALOG, 'size-variants-test');
48
+
49
+ static escCloseURL = new Urlbuilder(PATH_E2E_DIALOG, 'esc-close-test');
50
+
51
+ static clickOutsideURL = new Urlbuilder(PATH_E2E_DIALOG, 'click-outside-close-test');
52
+
53
+ static singleButtonFooterURL = new Urlbuilder(PATH_E2E_DIALOG, 'single-button-footer-test');
54
+
55
+ static formDialogDatePickerURL = new Urlbuilder(PATH_E2E_DIALOG, 'form-dialog-with-date-picker');
56
+
57
+ static formDialogDatePickerWorkaroundURL = new Urlbuilder(PATH_E2E_DIALOG, 'form-dialog-with-date-picker-workaround');
58
+
41
59
  // Selectors
60
+ static async getOpenDialogBtnByTestId(testId) {
61
+ return $(`[data-testid="${testId}"]`);
62
+ }
63
+
64
+ static async getDialogTitleByTestId(testId) {
65
+ return $(`[data-testid="${testId}"]`);
66
+ }
67
+
68
+ static async getCloseBtnByTestId(testId) {
69
+ return $(`[data-testid="${testId}"]`);
70
+ }
71
+
42
72
  static async getTriggerBtn() {
43
73
  return $('[data-testid="open-dialog-button"]');
44
74
  }
@@ -66,6 +96,34 @@ export default class DSDialog extends PageObject {
66
96
 
67
97
  static getBtnsByIndex = async (index) => getElementByIndex(this.getAllBtns, index);
68
98
 
99
+ // Built-in component data-testid selectors
100
+ static getDialogBackground = async () => $('[data-testid="ds-dialog-background"]');
101
+
102
+ static getDialogHeader = async () => $('[data-testid="ds-dialog-header"]');
103
+
104
+ static getDialogBody = async () => $('[data-testid="ds-dialog-body"]');
105
+
106
+ static getDialogFooter = async () => $('[data-testid="ds-dialog-footer"]');
107
+
108
+ static getDialogSeparators = async () => $$('[data-testid="ds-dialog-separator"]');
109
+
110
+ static getDialogTitle = async () => $('[data-testid="ds-dialog-title"]');
111
+
112
+ static getDialogAddon = async () => $('[data-testid="ds-dialog-addon"]');
113
+
114
+ // Story-specific selectors
115
+ static getDialogStatus = async () => $('[data-testid="dialog-status"]');
116
+
117
+ static getConfirmBtn = async () => $('[data-testid="confirm-dialog-button"]');
118
+
119
+ static getDiscardBtn = async () => $('[data-testid="discard-dialog-button"]');
120
+
121
+ static getSaveBtn = async () => $('[data-testid="save-dialog-button"]');
122
+
123
+ static getAcknowledgeBtn = async () => $('[data-testid="acknowledge-button"]');
124
+
125
+ static getOpenDialogBySize = async (size) => $(`[data-testid="open-dialog-${size}-button"]`);
126
+
69
127
  // Snapshots
70
128
  static snapshotPath(example = 'basic') {
71
129
  return PageObject.getSnapshotPathBuilder('Dialog', example, 'ds-dialog');
@@ -0,0 +1,27 @@
1
+ /* eslint-disable wdio/no-pause */
2
+ import DSDialog from '../DSDialogCO';
3
+ import { axeCoreCheck } from '../../helpers';
4
+
5
+ if (
6
+ (!browser.capabilities['ice:options'].isPhone &&
7
+ !browser.capabilities['ice:options'].isTablet &&
8
+ browser.capabilities.browserName === 'chrome') ||
9
+ browser.capabilities.browserName === 'Chrome'
10
+ ) {
11
+ describe('PUI-18385 - DSDialog:: alert dialog critical -Axe-Core', () => {
12
+ before('loading page', async () => {
13
+ const errorOnGo = await DSDialog.alertDialogCriticalURL.go();
14
+ if (errorOnGo) throw errorOnGo;
15
+ });
16
+
17
+ it('01: should pass axe-core scan', async () => {
18
+ const triggerBtn = await DSDialog.getTriggerBtn();
19
+ await triggerBtn.click();
20
+ const dialog = await DSDialog.getDialog();
21
+ await dialog.waitForDisplayed();
22
+ await browser.pause(500);
23
+ const result = await axeCoreCheck();
24
+ expect(result.length).toBe(0);
25
+ });
26
+ });
27
+ }
@@ -0,0 +1,56 @@
1
+ import { Key } from 'webdriverio';
2
+ import DSDialog from '../DSDialogCO';
3
+
4
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
+ // Tests for UX use case: Alert Dialog critical — no close X, no ESC, no click-outside
6
+ describe('PUI-18384 - DSDialog:: alert dialog critical behavior -Func', () => {
7
+ before('loading page', async () => {
8
+ const errorOnGo = await DSDialog.alertDialogCriticalURL.go();
9
+ if (errorOnGo) throw errorOnGo;
10
+ });
11
+
12
+ it('01: should open and have role="alertdialog"', async () => {
13
+ const triggerBtn = await DSDialog.getTriggerBtn();
14
+ await triggerBtn.click();
15
+ const dialog = await DSDialog.getDialog();
16
+ await dialog.waitForDisplayed();
17
+ const role = await dialog.getAttribute('role');
18
+ await expect(role).toBe('alertdialog');
19
+ });
20
+
21
+ it('02: should NOT have a close X button', async () => {
22
+ const addon = await DSDialog.getDialogAddon();
23
+ await expect(addon).not.toBeExisting();
24
+ });
25
+
26
+ it('03: should NOT close on ESC key press', async () => {
27
+ await browser.keys(Key.Escape);
28
+ const dialog = await DSDialog.getDialog();
29
+ await expect(dialog).toBeDisplayed();
30
+ });
31
+
32
+ it('04: should NOT close on click outside', async () => {
33
+ const background = await DSDialog.getDialogBackground();
34
+ await background.click({ x: 10, y: 10 });
35
+ const dialog = await DSDialog.getDialog();
36
+ await expect(dialog).toBeDisplayed();
37
+ });
38
+
39
+ it('05: should close when Cancel button is clicked', async () => {
40
+ const cancelBtn = await DSDialog.getCancelbtn();
41
+ await cancelBtn.click();
42
+ const dialog = await DSDialog.getDialog();
43
+ await expect(dialog).not.toBeDisplayed();
44
+ });
45
+
46
+ it('06: should close when Confirm button is clicked', async () => {
47
+ const triggerBtn = await DSDialog.getTriggerBtn();
48
+ await triggerBtn.click();
49
+ const dialog = await DSDialog.getDialog();
50
+ await dialog.waitForDisplayed();
51
+ const confirmBtn = await DSDialog.getConfirmBtn();
52
+ await confirmBtn.click();
53
+ await expect(dialog).not.toBeDisplayed();
54
+ });
55
+ });
56
+ }
@@ -0,0 +1,20 @@
1
+ import DSDialog from '../DSDialogCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ // Tests for UX use case: Alert Dialog critical-level notification
5
+ describe('PUI-18383 - DSDialog:: alert dialog critical layout -Visual', () => {
6
+ before('loading page', async () => {
7
+ const errorOnGo = await DSDialog.alertDialogCriticalURL.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+
11
+ it('01: should display critical alert dialog correctly', async () => {
12
+ const triggerBtn = await DSDialog.getTriggerBtn();
13
+ await triggerBtn.click();
14
+ const dialog = await DSDialog.getDialog();
15
+ await dialog.waitForDisplayed();
16
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('alert-dialog-critical'));
17
+ await expect(snapshot).toEqual(0);
18
+ });
19
+ });
20
+ }
@@ -0,0 +1,25 @@
1
+ import DSDialog from '../DSDialogCO';
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-18388 - DSDialog:: alert dialog dismissible -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.alertDialogDismissibleURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should pass axe-core scan', async () => {
17
+ const triggerBtn = await DSDialog.getTriggerBtn();
18
+ await triggerBtn.click();
19
+ const dialog = await DSDialog.getDialog();
20
+ await dialog.waitForDisplayed();
21
+ const result = await axeCoreCheck();
22
+ expect(result.length).toBe(0);
23
+ });
24
+ });
25
+ }
@@ -0,0 +1,52 @@
1
+ import { Key } from 'webdriverio';
2
+ import DSDialog from '../DSDialogCO';
3
+
4
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
+ // Tests for UX use case: Alert Dialog mid-level — dismissible
6
+ describe('PUI-18387 - DSDialog:: alert dialog dismissible behavior -Func', () => {
7
+ before('loading page', async () => {
8
+ const errorOnGo = await DSDialog.alertDialogDismissibleURL.go();
9
+ if (errorOnGo) throw errorOnGo;
10
+ });
11
+
12
+ it('01: should open and have role="alertdialog"', async () => {
13
+ const triggerBtn = await DSDialog.getTriggerBtn();
14
+ await triggerBtn.click();
15
+ const dialog = await DSDialog.getDialog();
16
+ await dialog.waitForDisplayed();
17
+ const role = await dialog.getAttribute('role');
18
+ await expect(role).toBe('alertdialog');
19
+ });
20
+
21
+ it('02: should close when close X is clicked', async () => {
22
+ const closeBtn = await DSDialog.getCloseBtn();
23
+ await closeBtn.click();
24
+ const dialog = await DSDialog.getDialog();
25
+ await expect(dialog).not.toBeDisplayed();
26
+ });
27
+
28
+ it('03: should close on ESC key press', async () => {
29
+ const triggerBtn = await DSDialog.getTriggerBtn();
30
+ await triggerBtn.click();
31
+ const dialog = await DSDialog.getDialog();
32
+ await dialog.waitForDisplayed();
33
+ await browser.keys(Key.Escape);
34
+ await expect(dialog).not.toBeDisplayed();
35
+ });
36
+
37
+ it('04: should close on click outside', async () => {
38
+ const triggerBtn = await DSDialog.getTriggerBtn();
39
+ await triggerBtn.click();
40
+ const dialog = await DSDialog.getDialog();
41
+ await dialog.waitForDisplayed();
42
+ const background = await DSDialog.getDialogBackground();
43
+ await background.click({ x: 10, y: 10 });
44
+ await expect(dialog).not.toBeDisplayed();
45
+ });
46
+
47
+ it('05: should return focus to trigger after close', async () => {
48
+ const triggerBtn = await DSDialog.getTriggerBtn();
49
+ await expect(triggerBtn).toBeFocused();
50
+ });
51
+ });
52
+ }
@@ -0,0 +1,20 @@
1
+ import DSDialog from '../DSDialogCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ // Tests for UX use case: Alert Dialog mid-level — dismissible with close X
5
+ describe('PUI-18386 - DSDialog:: alert dialog dismissible layout -Visual', () => {
6
+ before('loading page', async () => {
7
+ const errorOnGo = await DSDialog.alertDialogDismissibleURL.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+
11
+ it('01: should display dismissible alert dialog correctly', async () => {
12
+ const triggerBtn = await DSDialog.getTriggerBtn();
13
+ await triggerBtn.click();
14
+ const dialog = await DSDialog.getDialog();
15
+ await dialog.waitForDisplayed();
16
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('alert-dialog-dismissible'));
17
+ await expect(snapshot).toEqual(0);
18
+ });
19
+ });
20
+ }
@@ -0,0 +1,25 @@
1
+ import DSDialog from '../DSDialogCO';
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-18389 - DSDialog:: Accessible form dialog -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.accesibleForm.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should pass axe-core scan', async () => {
17
+ const triggerBtn = await DSDialog.getTriggerBtn();
18
+ await triggerBtn.click();
19
+ const dialog = await DSDialog.getDialog();
20
+ await dialog.waitForDisplayed();
21
+ const result = await axeCoreCheck();
22
+ expect(result.length).toBe(0);
23
+ });
24
+ });
25
+ }
@@ -0,0 +1,25 @@
1
+ import DSDialog from '../DSDialogCO';
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-18390 - DSDialog:: Basic dialog -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.basicURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should pass axe-core scan', async () => {
17
+ const triggerBtn = await DSDialog.getTriggerBtn();
18
+ await triggerBtn.click();
19
+ const dialog = await DSDialog.getDialog();
20
+ await dialog.waitForDisplayed();
21
+ const result = await axeCoreCheck();
22
+ expect(result.length).toBe(0);
23
+ });
24
+ });
25
+ }
@@ -0,0 +1,25 @@
1
+ import DSDialog from '../DSDialogCO';
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-18391 - DSDialog:: Centered dialog -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.centeredURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should pass axe-core scan', async () => {
17
+ const triggerBtn = await DSDialog.getTriggerBtn();
18
+ await triggerBtn.click();
19
+ const dialog = await DSDialog.getDialog();
20
+ await dialog.waitForDisplayed();
21
+ const result = await axeCoreCheck();
22
+ expect(result.length).toBe(0);
23
+ });
24
+ });
25
+ }