dimsum-e2e-tests 3.70.0-next.3 → 3.70.0-next.31

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 (118) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/ds-accordion-native/DSAccordionNative.axe-core.func.spec.js +117 -0
  3. package/ds-accordion-native/DSAccordionNative.func.spec.js +178 -0
  4. package/ds-accordion-native/DSAccordionNative.visual.spec.js +131 -0
  5. package/ds-accordion-native/DSAccordionNativeCO.js +149 -0
  6. package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.axe-core.func.spec.js +25 -0
  7. package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.visual.spec.js +27 -0
  8. package/ds-accordion-native/role/DSAccordionNative.role-heading.func.spec.js +27 -0
  9. package/ds-accordion-native/scrollable-content/DSAccordionNative.scrollable-content.visual.spec.js +48 -0
  10. package/ds-accordion-native/slots/DSAccordionNative.slots.axe-core.func.spec.js +25 -0
  11. package/ds-accordion-native/slots/DSAccordionNative.slots.func.spec.js +73 -0
  12. package/ds-accordion-native/slots/DSAccordionNative.slots.visual.spec.js +18 -0
  13. package/ds-accordion-native/wrapLabel/DSAccordionNative.wrap-label.visual.spec.js +22 -0
  14. package/ds-apppicker/DSAppPickerCO.js +1 -1
  15. package/ds-autocomplete/DSAutocomplete.visual.spec.js +34 -0
  16. package/ds-autocomplete/DSAutocompleteCO.js +2 -0
  17. package/ds-chat/DSChat.axe-core.func.spec.js +2 -2
  18. package/ds-chat/DSChat.visual.spec.js +3 -3
  19. package/ds-chat/DSChatCO.js +17 -23
  20. package/ds-chat/bubbles/slots/DSChatBubble.slots.axe-core.func.spec.js +24 -0
  21. package/ds-chat/bubbles/slots/DSChatBubble.slots.func.spec.js +49 -0
  22. package/ds-chat/bubbles/slots/DSChatBubble.slots.visual.spec.js +25 -0
  23. package/ds-chat/card/slots/DSChatCard.slots.axe-core.func.spec.js +24 -0
  24. package/ds-chat/card/slots/DSChatCard.slots.func.spec.js +47 -0
  25. package/ds-chat/card/slots/DSChatCard.slots.visual.spec.js +18 -0
  26. package/ds-chat/card/truncated-text/DSChatCard.truncated-text.func.spec.js +32 -0
  27. package/ds-chat/card/truncated-text/DSChatCard.truncated-text.visual.spec.js +26 -0
  28. package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.axe-core.func.spec.js +23 -0
  29. package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.visual.spec.js +17 -0
  30. package/ds-chat/components/BubbleCO.js +46 -3
  31. package/ds-chat/components/CardCO.js +77 -0
  32. package/ds-chat/components/ComposerCO.js +6 -6
  33. package/ds-chat/components/FloatingButtonCO.js +2 -2
  34. package/ds-chat/components/HeaderCO.js +2 -2
  35. package/ds-chat/components/TileCO.js +82 -0
  36. package/ds-chat/components/index.js +3 -2
  37. package/ds-chat/loadmore/DSChat-loadmore.func.spec.js +1 -1
  38. package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.axe-core.func.spec.js +2 -2
  39. package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.func.spec.js +1 -1
  40. package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.visual.spec.js +2 -2
  41. package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.axe-core.func.spec.js +2 -2
  42. package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.visual.spec.js +1 -1
  43. package/ds-chat/tile/slots/DSChatTile.slots.func.spec.js +53 -0
  44. package/ds-chat/tile/slots/DSChatTile.slots.visual.spec.js +18 -0
  45. package/ds-controlled-form/ds-combobox/DSComboboxCO.js +2 -2
  46. package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO.js +1 -1
  47. package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +1 -1
  48. package/ds-data-table-async/DSDataTableCO.js +10 -12
  49. package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +1 -1
  50. package/ds-data-table-async/components/FiltersCO.js +1 -1
  51. package/ds-data-table-async/components/HeaderCO.js +22 -10
  52. package/ds-dialog/DSDialog.visual.spec.js +16 -31
  53. package/ds-dialog/DSDialogCO.js +58 -0
  54. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.axe-core.func.spec.js +27 -0
  55. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.func.spec.js +56 -0
  56. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.visual.spec.js +20 -0
  57. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.axe-core.func.spec.js +25 -0
  58. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.func.spec.js +52 -0
  59. package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.visual.spec.js +20 -0
  60. package/ds-dialog/axe-core/DSDialog.accessible-form.axe-core.func.spec.js +25 -0
  61. package/ds-dialog/axe-core/DSDialog.basic.axe-core.func.spec.js +25 -0
  62. package/ds-dialog/axe-core/DSDialog.centered.axe-core.func.spec.js +25 -0
  63. package/ds-dialog/axe-core/DSDialog.decision.axe-core.func.spec.js +57 -0
  64. package/ds-dialog/axe-core/DSDialog.long-body.axe-core.func.spec.js +25 -0
  65. package/ds-dialog/axe-core/DSDialog.warning.axe-core.func.spec.js +24 -0
  66. package/ds-dialog/axe-core/DSDialog.wizard.axe-core.func.spec.js +28 -0
  67. package/ds-dialog/click-outside/DSDialog.click-outside.func.spec.js +31 -0
  68. package/ds-dialog/esc-close/DSDialog.esc-close.func.spec.js +31 -0
  69. package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.axe-core.func.spec.js +46 -0
  70. package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.func.spec.js +50 -0
  71. package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.axe-core.func.spec.js +25 -0
  72. package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.visual.spec.js +37 -0
  73. package/ds-dialog/single-button-footer/DSDialog.single-button-footer.axe-core.func.spec.js +25 -0
  74. package/ds-dialog/single-button-footer/DSDialog.single-button-footer.visual.spec.js +20 -0
  75. package/ds-dialog/size-variants/DSDialog.size-variants.visual.spec.js +116 -0
  76. package/ds-floating-context/DSFloatingContextCO.js +10 -0
  77. package/ds-floating-context/placement/DSFloatingContext.placement.visual.spec.js +48 -0
  78. package/ds-form-combobox-multi/DSComboboxMultiCO.js +8 -2
  79. package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.axe-core.func.spec.js +55 -0
  80. package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.func.spec.js +57 -0
  81. package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +15 -0
  82. package/ds-form-combobox-multi/disabled/DSComboboxMulti.disabled.axe-core.func.spec.js +24 -0
  83. package/ds-form-combobox-multi/inline/DSComboboxMulti.inline.visual.spec.js +21 -0
  84. package/ds-form-combobox-single/DSComboboxSingleCO.js +8 -2
  85. package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.axe-core.func.spec.js +49 -0
  86. package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.func.spec.js +54 -0
  87. package/ds-form-combobox-single/aria-disabled/DSComboboxSingle.aria-disabled.visual.spec.js +18 -0
  88. package/ds-form-combobox-single/disabled/DSComboboxSingle.disabled.axe-core.func.spec.js +24 -0
  89. package/ds-form-combobox-single/inline/DSComboboxSingle.inline.visual.spec.js +23 -0
  90. package/ds-form-native-select/NativeSelect.axe-core.func.spec.js +39 -0
  91. package/ds-form-native-select/NativeSelect.visual.spec.js +33 -0
  92. package/ds-form-native-select/NativeSelectCO.js +6 -0
  93. package/ds-form-native-select/option-selection/NativeSelect.option-selection.func.spec.js +25 -0
  94. package/ds-global-header/GlobalHeader.axe-core.func.spec.js +30 -0
  95. package/ds-global-header/GlobalHeader.visual.spec.js +31 -0
  96. package/ds-leftnavigation/LeftNavigationCO.js +2 -2
  97. package/ds-menu-button/DSMenuButtonCO.js +23 -0
  98. package/ds-menu-button/slots/DSMenuButton.slots.func.spec.js +40 -0
  99. package/ds-menu-button/slots/DSMenuButton.slots.visual.spec.js +26 -0
  100. package/ds-modal-slide/ModalSlideCO.js +39 -0
  101. package/ds-modal-slide/custom-header/ModalSlide.customHeader.focusRing.visual.spec.js +2 -1
  102. package/ds-modal-slide/slots/ModalSlide.slots.func.spec.js +74 -0
  103. package/ds-modal-slide/slots/ModalSlide.slots.visual.spec.js +27 -0
  104. package/ds-page-layout/PageLayoutCO.js +4 -4
  105. package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +2 -0
  106. package/ds-progress-indicator/DSProgressIndicatorCO.js +1 -1
  107. package/ds-tab-button/DSTabButton.func.spec.js +1 -1
  108. package/ds-tabs/DSTabs.visual.spec.js +1 -2
  109. package/ds-tabs/DSTabsCO.js +2 -2
  110. package/ds-tabs/with-carousel/DSTabs.with-carousel.func.spec.js +22 -7
  111. package/ds-tabs/with-carousel/DSTabs.with-carousel.visual.spec.js +9 -9
  112. package/ds-tooltip-v3/DSTooltipV3CO.js +6 -0
  113. package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.axe-core.func.spec.js +23 -0
  114. package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.func.spec.js +29 -0
  115. package/ds-treeview/DSTreeViewCO.js +2 -2
  116. package/package.json +150 -153
  117. package/paths.js +8 -1
  118. package/ds-chat-tile/TileCO.js +0 -35
@@ -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
+ }
@@ -0,0 +1,57 @@
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-18392 - DSDialog:: Decision dialog discard/save -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.decisionURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should pass axe-core scan for discard/save variant', async () => {
17
+ const triggerBtn = await DSDialog.getTriggerBtnByIndex(0);
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
+
26
+ describe('PUI-18393 - DSDialog:: Decision dialog close/discard/save -Axe-Core', () => {
27
+ before('loading page', async () => {
28
+ const errorOnGo = await DSDialog.decisionURL.go();
29
+ if (errorOnGo) throw errorOnGo;
30
+ });
31
+
32
+ it('01: should pass axe-core scan for close/discard/save variant', async () => {
33
+ const triggerBtn = await DSDialog.getTriggerBtnByIndex(1);
34
+ await triggerBtn.click();
35
+ const dialog = await DSDialog.getDialog();
36
+ await dialog.waitForDisplayed();
37
+ const result = await axeCoreCheck();
38
+ expect(result.length).toBe(0);
39
+ });
40
+ });
41
+
42
+ describe('PUI-18394 - DSDialog:: Decision dialog close/save -Axe-Core', () => {
43
+ before('loading page', async () => {
44
+ const errorOnGo = await DSDialog.decisionURL.go();
45
+ if (errorOnGo) throw errorOnGo;
46
+ });
47
+
48
+ it('01: should pass axe-core scan for close/save variant', async () => {
49
+ const triggerBtn = await DSDialog.getTriggerBtnByIndex(2);
50
+ await triggerBtn.click();
51
+ const dialog = await DSDialog.getDialog();
52
+ await dialog.waitForDisplayed();
53
+ const result = await axeCoreCheck();
54
+ expect(result.length).toBe(0);
55
+ });
56
+ });
57
+ }
@@ -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-18395 - DSDialog:: Long body content -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.longBodyContent.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,24 @@
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-17331 - DSDialog:: Warning dialog - axe-core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.warningURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('should display Warning DSDialog correctly and pass axe-core scan', async () => {
16
+ const triggerBtn = await DSDialog.getTriggerBtn();
17
+ await triggerBtn.click();
18
+ const dialog = await DSDialog.getDialog();
19
+ await dialog.waitForDisplayed();
20
+ const result = await axeCoreCheck();
21
+ expect(result.length).toBe(0);
22
+ });
23
+ });
24
+ }
@@ -0,0 +1,28 @@
1
+ import DSDialog from '../DSDialogCO';
2
+ import DSWizardCO from '../../ds-wizard/DSWizardCO';
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-18396 - DSDialog:: Wizard dialog -Axe-Core', () => {
12
+ before('loading page', async () => {
13
+ const errorOnGo = await DSDialog.wizardURL.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
+ const step1 = await DSWizardCO.getStep(1);
23
+ await step1.waitForDisplayed();
24
+ const result = await axeCoreCheck();
25
+ expect(result.length).toBe(0);
26
+ });
27
+ });
28
+ }
@@ -0,0 +1,31 @@
1
+ import DSDialog from '../DSDialogCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ // Tests for click-outside close behavior (onClickOutside callback)
5
+ describe('PUI-18397 - DSDialog:: click outside close -Func', () => {
6
+ before('loading page', async () => {
7
+ const errorOnGo = await DSDialog.clickOutsideURL.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+
11
+ it('01: should open dialog after clicking trigger', async () => {
12
+ const triggerBtn = await DSDialog.getTriggerBtn();
13
+ await triggerBtn.click();
14
+ const dialog = await DSDialog.getDialog();
15
+ await dialog.waitForDisplayed();
16
+ await expect(dialog).toBeDisplayedInViewport();
17
+ });
18
+
19
+ it('02: should close dialog on click outside', async () => {
20
+ const background = await DSDialog.getDialogBackground();
21
+ await background.click({ x: 10, y: 10 });
22
+ const dialog = await DSDialog.getDialog();
23
+ await expect(dialog).not.toBeDisplayed();
24
+ });
25
+
26
+ it('03: should return focus to trigger after close', async () => {
27
+ const triggerBtn = await DSDialog.getTriggerBtn();
28
+ await expect(triggerBtn).toBeFocused();
29
+ });
30
+ });
31
+ }
@@ -0,0 +1,31 @@
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 ESC key close behavior (onClose callback)
6
+ describe('PUI-18382 - DSDialog:: ESC key close -Func', () => {
7
+ before('loading page', async () => {
8
+ const errorOnGo = await DSDialog.escCloseURL.go();
9
+ if (errorOnGo) throw errorOnGo;
10
+ });
11
+
12
+ it('01: should open dialog after clicking trigger', async () => {
13
+ const triggerBtn = await DSDialog.getTriggerBtn();
14
+ await triggerBtn.click();
15
+ const dialog = await DSDialog.getDialog();
16
+ await dialog.waitForDisplayed();
17
+ await expect(dialog).toBeDisplayedInViewport();
18
+ });
19
+
20
+ it('02: should close dialog on ESC key press', async () => {
21
+ await browser.keys(Key.Escape);
22
+ const dialog = await DSDialog.getDialog();
23
+ await expect(dialog).not.toBeDisplayed();
24
+ });
25
+
26
+ it('03: should return focus to trigger after ESC close', async () => {
27
+ const triggerBtn = await DSDialog.getTriggerBtn();
28
+ await expect(triggerBtn).toBeFocused();
29
+ });
30
+ });
31
+ }
@@ -0,0 +1,46 @@
1
+ import DSDialogCO 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-18398 - DSDialog:: flexible heading level - Axe-Core', () => {
11
+ beforeEach(async () => {
12
+ const errorOnGo = await DSDialogCO.flexibleHeadingLevelURL.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+
16
+ it('01: should have no accessibility violations with h2 title', async () => {
17
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h2-button');
18
+ await triggerBtn.click();
19
+ const dialog = await DSDialogCO.getDialog();
20
+ await dialog.waitForDisplayed();
21
+
22
+ const result = await axeCoreCheck();
23
+ expect(result.length).toBe(0);
24
+ });
25
+
26
+ it('02: should have no accessibility violations with default h3 title', async () => {
27
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h3-button');
28
+ await triggerBtn.click();
29
+ const dialog = await DSDialogCO.getDialog();
30
+ await dialog.waitForDisplayed();
31
+
32
+ const result = await axeCoreCheck();
33
+ expect(result.length).toBe(0);
34
+ });
35
+
36
+ it('03: should have no accessibility violations with h4 title', async () => {
37
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h4-button');
38
+ await triggerBtn.click();
39
+ const dialog = await DSDialogCO.getDialog();
40
+ await dialog.waitForDisplayed();
41
+
42
+ const result = await axeCoreCheck();
43
+ expect(result.length).toBe(0);
44
+ });
45
+ });
46
+ }
@@ -0,0 +1,50 @@
1
+ import DSDialogCO from '../DSDialogCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ describe('PUI-18399 - DSDialog:: flexible heading level - Func', () => {
5
+ before('loading page', async () => {
6
+ const errorOnGo = await DSDialogCO.flexibleHeadingLevelURL.go();
7
+ if (errorOnGo) throw errorOnGo;
8
+ });
9
+
10
+ afterEach(async () => {
11
+ await browser.keys('Escape');
12
+ });
13
+
14
+ it('01: should render DSDialogTitle as h2 when as="h2" is passed', async () => {
15
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h2-button');
16
+ await triggerBtn.click();
17
+ const dialog = await DSDialogCO.getDialog();
18
+ await dialog.waitForDisplayed();
19
+
20
+ const title = await DSDialogCO.getDialogTitleByTestId('dialog-title-h2');
21
+ await expect(title).toBeExisting();
22
+ await expect((await title.getTagName()).toLowerCase()).toBe('h2');
23
+ await expect(title).toHaveText('Dialog title as h2');
24
+ });
25
+
26
+ it('02: should render DSDialogTitle as h3 by default', async () => {
27
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h3-button');
28
+ await triggerBtn.click();
29
+ const dialog = await DSDialogCO.getDialog();
30
+ await dialog.waitForDisplayed();
31
+
32
+ const title = await DSDialogCO.getDialogTitleByTestId('dialog-title-h3');
33
+ await expect(title).toBeExisting();
34
+ await expect((await title.getTagName()).toLowerCase()).toBe('h3');
35
+ await expect(title).toHaveText('Dialog title as h3 (default)');
36
+ });
37
+
38
+ it('03: should render DSDialogTitle as h4 when as="h4" is passed', async () => {
39
+ const triggerBtn = await DSDialogCO.getOpenDialogBtnByTestId('open-dialog-h4-button');
40
+ await triggerBtn.click();
41
+ const dialog = await DSDialogCO.getDialog();
42
+ await dialog.waitForDisplayed();
43
+
44
+ const title = await DSDialogCO.getDialogTitleByTestId('dialog-title-h4');
45
+ await expect(title).toBeExisting();
46
+ await expect((await title.getTagName()).toLowerCase()).toBe('h4');
47
+ await expect(title).toHaveText('Dialog title as h4');
48
+ });
49
+ });
50
+ }
@@ -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-18400 - DSDialog:: form dialog date picker -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.formDialogDatePickerURL.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,37 @@
1
+ import DSDialog from '../DSDialogCO';
2
+
3
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
4
+ // Tests for form dialog with date picker integration
5
+ describe('PUI-18401 - DSDialog:: form dialog with date picker -Visual', () => {
6
+ before('loading page', async () => {
7
+ const errorOnGo = await DSDialog.formDialogDatePickerURL.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+
11
+ it('01: should display form dialog with date picker 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('form-dialog-datepicker'));
17
+ await expect(snapshot).toEqual(0);
18
+ });
19
+ });
20
+
21
+ // Tests for form dialog with date picker workaround
22
+ describe('PUI-18402 - DSDialog:: form dialog date picker workaround -Visual', () => {
23
+ before('loading page', async () => {
24
+ const errorOnGo = await DSDialog.formDialogDatePickerWorkaroundURL.go();
25
+ if (errorOnGo) throw errorOnGo;
26
+ });
27
+
28
+ it('01: should display form dialog with workaround correctly', async () => {
29
+ const triggerBtn = await DSDialog.getTriggerBtn();
30
+ await triggerBtn.click();
31
+ const dialog = await DSDialog.getDialog();
32
+ await dialog.waitForDisplayed();
33
+ const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('form-dialog-datepicker-workaround'));
34
+ await expect(snapshot).toEqual(0);
35
+ });
36
+ });
37
+ }
@@ -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-18403 - DSDialog:: single button footer -Axe-Core', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDialog.singleButtonFooterURL.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,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: Modal Dialog with single button footer
5
+ describe('PUI-18404 - DSDialog:: single button footer layout -Visual', () => {
6
+ before('loading page', async () => {
7
+ const errorOnGo = await DSDialog.singleButtonFooterURL.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+
11
+ it('01: should display single button footer 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('single-button-footer'));
17
+ await expect(snapshot).toEqual(0);
18
+ });
19
+ });
20
+ }