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.
- package/CHANGELOG.md +158 -0
- package/ds-accordion-native/DSAccordionNative.axe-core.func.spec.js +117 -0
- package/ds-accordion-native/DSAccordionNative.func.spec.js +178 -0
- package/ds-accordion-native/DSAccordionNative.visual.spec.js +131 -0
- package/ds-accordion-native/DSAccordionNativeCO.js +149 -0
- package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.axe-core.func.spec.js +25 -0
- package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.visual.spec.js +27 -0
- package/ds-accordion-native/role/DSAccordionNative.role-heading.func.spec.js +27 -0
- package/ds-accordion-native/scrollable-content/DSAccordionNative.scrollable-content.visual.spec.js +48 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.axe-core.func.spec.js +25 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.func.spec.js +73 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.visual.spec.js +18 -0
- package/ds-accordion-native/wrapLabel/DSAccordionNative.wrap-label.visual.spec.js +22 -0
- package/ds-apppicker/DSAppPickerCO.js +1 -1
- package/ds-autocomplete/DSAutocomplete.visual.spec.js +34 -0
- package/ds-autocomplete/DSAutocompleteCO.js +2 -0
- package/ds-chat/DSChat.axe-core.func.spec.js +2 -2
- package/ds-chat/DSChat.visual.spec.js +3 -3
- package/ds-chat/DSChatCO.js +17 -23
- package/ds-chat/bubbles/slots/DSChatBubble.slots.axe-core.func.spec.js +24 -0
- package/ds-chat/bubbles/slots/DSChatBubble.slots.func.spec.js +49 -0
- package/ds-chat/bubbles/slots/DSChatBubble.slots.visual.spec.js +25 -0
- package/ds-chat/card/slots/DSChatCard.slots.axe-core.func.spec.js +24 -0
- package/ds-chat/card/slots/DSChatCard.slots.func.spec.js +47 -0
- package/ds-chat/card/slots/DSChatCard.slots.visual.spec.js +18 -0
- package/ds-chat/card/truncated-text/DSChatCard.truncated-text.func.spec.js +32 -0
- package/ds-chat/card/truncated-text/DSChatCard.truncated-text.visual.spec.js +26 -0
- package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.axe-core.func.spec.js +23 -0
- package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.visual.spec.js +17 -0
- package/ds-chat/components/BubbleCO.js +46 -3
- package/ds-chat/components/CardCO.js +77 -0
- package/ds-chat/components/ComposerCO.js +6 -6
- package/ds-chat/components/FloatingButtonCO.js +2 -2
- package/ds-chat/components/HeaderCO.js +2 -2
- package/ds-chat/components/TileCO.js +82 -0
- package/ds-chat/components/index.js +3 -2
- package/ds-chat/loadmore/DSChat-loadmore.func.spec.js +1 -1
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.axe-core.func.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.func.spec.js +1 -1
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.visual.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.axe-core.func.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.visual.spec.js +1 -1
- package/ds-chat/tile/slots/DSChatTile.slots.func.spec.js +53 -0
- package/ds-chat/tile/slots/DSChatTile.slots.visual.spec.js +18 -0
- package/ds-controlled-form/ds-combobox/DSComboboxCO.js +2 -2
- package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO.js +1 -1
- package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +1 -1
- package/ds-data-table-async/DSDataTableCO.js +10 -12
- package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +1 -1
- package/ds-data-table-async/components/FiltersCO.js +1 -1
- package/ds-data-table-async/components/HeaderCO.js +22 -10
- package/ds-dialog/DSDialog.visual.spec.js +16 -31
- package/ds-dialog/DSDialogCO.js +58 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.axe-core.func.spec.js +27 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.func.spec.js +56 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-critical.visual.spec.js +20 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.axe-core.func.spec.js +25 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.func.spec.js +52 -0
- package/ds-dialog/alert-dialog/DSDialog.alert-dialog-dismissible.visual.spec.js +20 -0
- package/ds-dialog/axe-core/DSDialog.accessible-form.axe-core.func.spec.js +25 -0
- package/ds-dialog/axe-core/DSDialog.basic.axe-core.func.spec.js +25 -0
- package/ds-dialog/axe-core/DSDialog.centered.axe-core.func.spec.js +25 -0
- package/ds-dialog/axe-core/DSDialog.decision.axe-core.func.spec.js +57 -0
- package/ds-dialog/axe-core/DSDialog.long-body.axe-core.func.spec.js +25 -0
- package/ds-dialog/axe-core/DSDialog.warning.axe-core.func.spec.js +24 -0
- package/ds-dialog/axe-core/DSDialog.wizard.axe-core.func.spec.js +28 -0
- package/ds-dialog/click-outside/DSDialog.click-outside.func.spec.js +31 -0
- package/ds-dialog/esc-close/DSDialog.esc-close.func.spec.js +31 -0
- package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.axe-core.func.spec.js +46 -0
- package/ds-dialog/flexible-heading-level/DSDialog.flexible-heading-level.func.spec.js +50 -0
- package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.axe-core.func.spec.js +25 -0
- package/ds-dialog/form-dialog-datepicker/DSDialog.form-datepicker.visual.spec.js +37 -0
- package/ds-dialog/single-button-footer/DSDialog.single-button-footer.axe-core.func.spec.js +25 -0
- package/ds-dialog/single-button-footer/DSDialog.single-button-footer.visual.spec.js +20 -0
- package/ds-dialog/size-variants/DSDialog.size-variants.visual.spec.js +116 -0
- package/ds-floating-context/DSFloatingContextCO.js +10 -0
- package/ds-floating-context/placement/DSFloatingContext.placement.visual.spec.js +48 -0
- package/ds-form-combobox-multi/DSComboboxMultiCO.js +8 -2
- package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.axe-core.func.spec.js +55 -0
- package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.func.spec.js +57 -0
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +15 -0
- package/ds-form-combobox-multi/disabled/DSComboboxMulti.disabled.axe-core.func.spec.js +24 -0
- package/ds-form-combobox-multi/inline/DSComboboxMulti.inline.visual.spec.js +21 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +8 -2
- package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.axe-core.func.spec.js +49 -0
- package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.func.spec.js +54 -0
- package/ds-form-combobox-single/aria-disabled/DSComboboxSingle.aria-disabled.visual.spec.js +18 -0
- package/ds-form-combobox-single/disabled/DSComboboxSingle.disabled.axe-core.func.spec.js +24 -0
- package/ds-form-combobox-single/inline/DSComboboxSingle.inline.visual.spec.js +23 -0
- package/ds-form-native-select/NativeSelect.axe-core.func.spec.js +39 -0
- package/ds-form-native-select/NativeSelect.visual.spec.js +33 -0
- package/ds-form-native-select/NativeSelectCO.js +6 -0
- package/ds-form-native-select/option-selection/NativeSelect.option-selection.func.spec.js +25 -0
- package/ds-global-header/GlobalHeader.axe-core.func.spec.js +30 -0
- package/ds-global-header/GlobalHeader.visual.spec.js +31 -0
- package/ds-leftnavigation/LeftNavigationCO.js +2 -2
- package/ds-menu-button/DSMenuButtonCO.js +23 -0
- package/ds-menu-button/slots/DSMenuButton.slots.func.spec.js +40 -0
- package/ds-menu-button/slots/DSMenuButton.slots.visual.spec.js +26 -0
- package/ds-modal-slide/ModalSlideCO.js +39 -0
- package/ds-modal-slide/custom-header/ModalSlide.customHeader.focusRing.visual.spec.js +2 -1
- package/ds-modal-slide/slots/ModalSlide.slots.func.spec.js +74 -0
- package/ds-modal-slide/slots/ModalSlide.slots.visual.spec.js +27 -0
- package/ds-page-layout/PageLayoutCO.js +4 -4
- package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +2 -0
- package/ds-progress-indicator/DSProgressIndicatorCO.js +1 -1
- package/ds-tab-button/DSTabButton.func.spec.js +1 -1
- package/ds-tabs/DSTabs.visual.spec.js +1 -2
- package/ds-tabs/DSTabsCO.js +2 -2
- package/ds-tabs/with-carousel/DSTabs.with-carousel.func.spec.js +22 -7
- package/ds-tabs/with-carousel/DSTabs.with-carousel.visual.spec.js +9 -9
- package/ds-tooltip-v3/DSTooltipV3CO.js +6 -0
- package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.axe-core.func.spec.js +23 -0
- package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.func.spec.js +29 -0
- package/ds-treeview/DSTreeViewCO.js +2 -2
- package/package.json +150 -153
- package/paths.js +8 -1
- package/ds-chat-tile/TileCO.js +0 -35
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Tests for PUI-17908 (ds-chat-tile slots implementation)
|
|
2
|
+
import { TileCO } from '../../components';
|
|
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-18465 - DSChatTile:: slot wiring - Func', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await TileCO.slotsTestURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('01: should have custom aria-* for each slot', async () => {
|
|
17
|
+
await (await TileCO.getRootSlot()).waitForDisplayed();
|
|
18
|
+
await expect(await TileCO.getRootSlot()).toHaveAttribute('aria-label', 'root aria');
|
|
19
|
+
await expect(await TileCO.getTooltipWrapperSlot()).toHaveAttribute('aria-label', 'tooltip-wrapper aria');
|
|
20
|
+
await expect(await TileCO.getWrapperSlot()).toHaveAttribute('aria-label', 'wrapper aria');
|
|
21
|
+
await expect(await TileCO.getLeftBorderSlot()).toHaveAttribute('aria-label', 'left-border aria');
|
|
22
|
+
await expect(await TileCO.getCentralContentSlot()).toHaveAttribute('aria-label', 'central-content aria');
|
|
23
|
+
await expect(await TileCO.getIconSlot()).toHaveAttribute('aria-label', 'icon aria');
|
|
24
|
+
await expect(await TileCO.getLabelSlot()).toHaveAttribute('aria-label', 'label aria');
|
|
25
|
+
await expect(await TileCO.getBadgeSlot()).toHaveAttribute('aria-label', 'badge aria');
|
|
26
|
+
await expect(await TileCO.getCloseButtonSlot()).toHaveAttribute('aria-label', 'close-button aria');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('02: should have custom data-testid for each slot', async () => {
|
|
30
|
+
await expect(await TileCO.getRootSlot()).toHaveAttribute('data-testid', 'root data');
|
|
31
|
+
await expect(await TileCO.getTooltipWrapperSlot()).toHaveAttribute('data-testid', 'tooltip-wrapper data');
|
|
32
|
+
await expect(await TileCO.getWrapperSlot()).toHaveAttribute('data-testid', 'wrapper data');
|
|
33
|
+
await expect(await TileCO.getLeftBorderSlot()).toHaveAttribute('data-testid', 'left-border data');
|
|
34
|
+
await expect(await TileCO.getCentralContentSlot()).toHaveAttribute('data-testid', 'central-content data');
|
|
35
|
+
await expect(await TileCO.getIconSlot()).toHaveAttribute('data-testid', 'icon data');
|
|
36
|
+
await expect(await TileCO.getLabelSlot()).toHaveAttribute('data-testid', 'label data');
|
|
37
|
+
await expect(await TileCO.getBadgeSlot()).toHaveAttribute('data-testid', 'badge data');
|
|
38
|
+
await expect(await TileCO.getCloseButtonSlot()).toHaveAttribute('data-testid', 'close-button data');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('03: should have custom lang for each slot', async () => {
|
|
42
|
+
await expect(await TileCO.getRootSlot()).toHaveAttribute('lang', 'pt');
|
|
43
|
+
await expect(await TileCO.getTooltipWrapperSlot()).toHaveAttribute('lang', 'es');
|
|
44
|
+
await expect(await TileCO.getWrapperSlot()).toHaveAttribute('lang', 'de');
|
|
45
|
+
await expect(await TileCO.getLeftBorderSlot()).toHaveAttribute('lang', 'en');
|
|
46
|
+
await expect(await TileCO.getCentralContentSlot()).toHaveAttribute('lang', 'fr');
|
|
47
|
+
await expect(await TileCO.getIconSlot()).toHaveAttribute('lang', 'it');
|
|
48
|
+
await expect(await TileCO.getLabelSlot()).toHaveAttribute('lang', 'nl');
|
|
49
|
+
await expect(await TileCO.getBadgeSlot()).toHaveAttribute('lang', 'sv');
|
|
50
|
+
await expect(await TileCO.getCloseButtonSlot()).toHaveAttribute('lang', 'ja');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Tests for PUI-17908 (ds-chat-tile slots implementation)
|
|
2
|
+
import { TileCO } from '../../components';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-18464 - DSChatTile:: slot variants - Visual', () => {
|
|
6
|
+
before(async () => {
|
|
7
|
+
const errorOnGo = await TileCO.slotsTestURL.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('01: should display all tile slot variants', async () => {
|
|
12
|
+
const firstTile = await TileCO.getRootSlot();
|
|
13
|
+
await firstTile.waitForDisplayed();
|
|
14
|
+
const snapshot = await browser.percyCheckScreenshot(TileCO.snapshotPath('tile-slot-variants'));
|
|
15
|
+
await expect(snapshot).toEqual(0);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -134,7 +134,7 @@ export default class DSComboboxCO extends PageObject {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
static async getSimpleTruncateText() {
|
|
137
|
-
return $('[data-testid="
|
|
137
|
+
return $('[data-testid="combobox-selected-values"]');
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
static async getNumberOptions() {
|
|
@@ -183,7 +183,7 @@ export default class DSComboboxCO extends PageObject {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
static async getTooltip() {
|
|
186
|
-
return $('[data-testid="
|
|
186
|
+
return $('[data-testid="ds-floating-wrapper-root"]');
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// actions
|
|
@@ -58,7 +58,7 @@ export default class DSControlledCheckboxCO extends PageObject {
|
|
|
58
58
|
static getCheckboxByIndex = async (index) => getElementByIndex(this.getCheckboxes, index);
|
|
59
59
|
|
|
60
60
|
static async getCheckboxLabels() {
|
|
61
|
-
return $$('[data-testid="
|
|
61
|
+
return $$('[data-testid="ds-checkbox-label"]');
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
static getCheckboxLabelByIndex = async (index) => getElementByIndex(this.getCheckboxLabels, index);
|
|
@@ -47,7 +47,7 @@ export default class DSControlledInputGroupCO extends PageObject {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
static async getComboSelectedOptText() {
|
|
50
|
-
return $('[data-testid="
|
|
50
|
+
return $('[data-testid="combobox-selected-values"]');
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
static async getComboboxInput() {
|
|
@@ -142,10 +142,6 @@ export default class DataTableCO extends PageObject {
|
|
|
142
142
|
|
|
143
143
|
static performance = new Urlbuilder(PATH_E2E_DATATABLE_ADVANCED, 'performance');
|
|
144
144
|
|
|
145
|
-
static emptyStateFullCustom = new Urlbuilder(PATH_E2E_DATATABLE_ADVANCED, 'empty-state-full-custom');
|
|
146
|
-
|
|
147
|
-
static customCellRowHeader = new Urlbuilder(PATH_E2E_DATATABLE_ADVANCED, 'custom-cell-row-and-header');
|
|
148
|
-
|
|
149
145
|
static responsive = new Urlbuilder(PATH_E2E_DATATABLE_ADVANCED, 'responsive');
|
|
150
146
|
|
|
151
147
|
// ROW
|
|
@@ -162,10 +158,15 @@ export default class DataTableCO extends PageObject {
|
|
|
162
158
|
|
|
163
159
|
static singleSelectDisabledSelectionUC = new Urlbuilder(PATH_E2E_DATATABLE, 'single-select-disabled-selection');
|
|
164
160
|
|
|
165
|
-
static multiSelectDisabledSelectionUC = new Urlbuilder(
|
|
161
|
+
static multiSelectDisabledSelectionUC = new Urlbuilder(PATH_E2E_DATATABLE_ROW, 'multi-select-disabled-selection');
|
|
166
162
|
|
|
167
163
|
static multiSelectEmpty = new Urlbuilder(PATH_E2E_DATATABLE_ROW, 'multi-select-empty');
|
|
168
164
|
|
|
165
|
+
static multiSelectDisabledWithUniqueRowAccessor = new Urlbuilder(
|
|
166
|
+
PATH_E2E_DATATABLE_ROW,
|
|
167
|
+
'multi-select-disabled-selection-with-unique-row-accessor',
|
|
168
|
+
);
|
|
169
|
+
|
|
169
170
|
// Column
|
|
170
171
|
|
|
171
172
|
static columnLayout = new Urlbuilder(PATH_E2E_DATATABLE_COLUMN, 'basic-column-layout');
|
|
@@ -242,6 +243,8 @@ export default class DataTableCO extends PageObject {
|
|
|
242
243
|
|
|
243
244
|
static pui16461SkeletonAndNoResults = new Urlbuilder(PATH_E2E_DATATABLE_STATES, 'pui-16461-skeleton-and-no-results');
|
|
244
245
|
|
|
246
|
+
static emptyStateFullCustom = new Urlbuilder(PATH_E2E_DATATABLE_STATES, 'empty-state-full-custom');
|
|
247
|
+
|
|
245
248
|
// Cell
|
|
246
249
|
static editableCells = new Urlbuilder(PATH_E2E_DATATABLE_CELL, 'editable-cells');
|
|
247
250
|
|
|
@@ -297,11 +300,6 @@ export default class DataTableCO extends PageObject {
|
|
|
297
300
|
|
|
298
301
|
// eslint-disable-next-line max-len
|
|
299
302
|
|
|
300
|
-
static multiSelectDisabledWithUniqueRowAccessor = new Urlbuilder(
|
|
301
|
-
PATH_E2E_DATATABLE,
|
|
302
|
-
'multi-select-disabled-selection-with-unique-row-accessor',
|
|
303
|
-
);
|
|
304
|
-
|
|
305
303
|
static resizableWithConstrains = new Urlbuilder(PATH_E2E_DATATABLE, 'pui-8896-resizable-with-constrains');
|
|
306
304
|
|
|
307
305
|
static memoizedSearchFilterTest = new Urlbuilder(PATH_E2E_DATATABLE, 'pui-12253-memoized-filter-component');
|
|
@@ -392,11 +390,11 @@ export default class DataTableCO extends PageObject {
|
|
|
392
390
|
}
|
|
393
391
|
|
|
394
392
|
static getPopoverContainer() {
|
|
395
|
-
return $('[data-testid="
|
|
393
|
+
return $('[data-testid="ds-floating-wrapper-root"]');
|
|
396
394
|
}
|
|
397
395
|
|
|
398
396
|
static getPopoverContainers() {
|
|
399
|
-
return $$('[data-testid="
|
|
397
|
+
return $$('[data-testid="ds-floating-wrapper-root"]');
|
|
400
398
|
}
|
|
401
399
|
|
|
402
400
|
static getButtons(index) {
|
|
@@ -20,7 +20,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
20
20
|
});
|
|
21
21
|
describe('PUI-6988 - DataTable, Custom cell and row header -visual.', async () => {
|
|
22
22
|
before('loading page', async () => {
|
|
23
|
-
const errorOnGo = await DSDataTableCO.
|
|
23
|
+
const errorOnGo = await DSDataTableCO.customCellRowAndHeaderTest.go();
|
|
24
24
|
if (errorOnGo) throw errorOnGo;
|
|
25
25
|
await DSDataTableCO.waitForDataTable();
|
|
26
26
|
});
|
|
@@ -145,7 +145,7 @@ export default class FiltersCO extends PageObject {
|
|
|
145
145
|
|
|
146
146
|
static getFilterMenuContentSlot = async () => $('[data-dimsum-slot="dsDatatableFilterPopoverContent"]');
|
|
147
147
|
|
|
148
|
-
static getFilterPopoverSlot = async () => $('[data-dimsum-slot="dsDatatableFilterPopover"]');
|
|
148
|
+
static getFilterPopoverSlot = async () => $('[data-dimsum-parent-slot="dsDatatableFilterPopover"]');
|
|
149
149
|
|
|
150
150
|
static getFreeTextSearchWrapperSlot = async () => $('[data-dimsum-slot="dsDatatableFreeTextSearchWrapper"]');
|
|
151
151
|
|
|
@@ -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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
116
|
+
const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-shuttle-layout'));
|
|
126
117
|
await expect(snapshot).toEqual(0);
|
|
127
118
|
});
|
|
128
|
-
it('should use
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
200
|
+
const snapshot = await browser.percyCheckScreenshot(DSDialog.snapshotPath('dialog-backdrop-cover-full-page'));
|
|
216
201
|
await expect(snapshot).toEqual(0);
|
|
217
202
|
});
|
|
218
203
|
});
|
package/ds-dialog/DSDialogCO.js
CHANGED
|
@@ -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
|
+
}
|