dimsum-e2e-tests 1.0.36 → 1.2.0
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 +18 -0
- package/ds-accordion/DSAccordion.axe-core.func.spec.js +18 -19
- package/ds-accordion/DSAccordion.func.spec.js +3 -3
- package/ds-accordion/DSAccordion.visual.spec.js +7 -0
- package/ds-accordion/DSAccordionCO.js +75 -11
- package/ds-accordion/QA_NOTES.md +105 -0
- package/ds-accordion/aria-disabled/DSAccordion.aria-disabled.axe-core.func.spec.js +25 -0
- package/ds-accordion/aria-disabled/DSAccordion.aria-disabled.visual.spec.js +23 -0
- package/ds-accordion/controlled/DSAccordion.controlled.func.spec.js +23 -0
- package/ds-accordion/header-structure/DSAccordion.header-structure.func.spec.js +65 -0
- package/ds-accordion/input-inside/DSAccordion.input-inside.func.spec.js +19 -0
- package/ds-accordion/role/DSAccordion.role-heading.func.spec.js +21 -0
- package/ds-accordion/scrollable-content/DSAccordion.scrollable-content.visual.spec.js +42 -0
- package/ds-accordion/slots/DSAccordion.slots.axe-core.func.spec.js +25 -0
- package/ds-accordion/slots/DSAccordion.slots.func.spec.js +67 -0
- package/ds-accordion/slots/DSAccordion.slots.visual.spec.js +18 -0
- package/ds-accordion/wrapLabel/DSAccordion.wrap-label.visual.spec.js +20 -0
- package/ds-autocomplete/DSAutocompleteCO.js +3 -3
- package/ds-button-v3/DSButtonV3.aria-diabled.axe-core.func.spec.js +22 -0
- package/ds-button-v3/DSButtonV3.aria-disabled-attribute.func.spec.js +33 -0
- package/ds-button-v3/DSButtonV3.aria-disabled.visual.spec.js +48 -0
- package/ds-button-v3/DSButtonV3.func.spec.js +27 -0
- package/ds-button-v3/DSButtonV3.type-submit.func.spec.js +28 -0
- package/ds-button-v3/DSButtonV3.visual.spec.js +92 -0
- package/ds-button-v3/DSButtonV3CO.js +60 -0
- package/ds-button-v3/theme-font/DSButtonV3.theme-font.func.spec.js +30 -0
- package/ds-controlled-form/ds-controlled-checkbox/Basic/DSControlledCheckbox.axe-core.basic.func.spec.js +4 -4
- package/ds-controlled-form/ds-controlled-checkbox/Basic/DSControlledCheckbox.basic.visual.spec.js +56 -0
- package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO.js +57 -2
- package/ds-controlled-form/ds-controlled-checkbox/Disabled/DSControlledCheckbox.axe-core.disabled.func.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/Disabled/DSControlledCheckbox.disabled.visual.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/HasError/DSControlledCheckbox.axe-core.hasError.func.spec.js +4 -4
- package/ds-controlled-form/ds-controlled-checkbox/HasError/DSControlledCheckbox.has-error.visual.spec.js +71 -1
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.axe-core.mixed.func.spec.js +4 -4
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.func.spec.js +19 -37
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.keyboard-nav.func.spec.js +51 -0
- package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.visual.spec.js +14 -16
- package/ds-controlled-form/ds-controlled-checkbox/ReadOnly/DSControlledCheckbox.axe-core.read-only.func.spec.js +3 -3
- package/ds-controlled-form/ds-controlled-checkbox/ReadOnly/DSControlledCheckbox.read-only.visual.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/WithTooltip/DSControlledCheckbox.axe-core.with-tooltip.func.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/WithTooltip/DSControlledCheckbox.with-tooltip.visual.spec.js +1 -3
- package/ds-controlled-form/ds-controlled-checkbox/WrapLabel/DSControlledCheckbox.axe-core.wrap-label.func.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/WrapLabel/DSControlledCheckbox.wrap-label.visual.spec.js +1 -1
- package/ds-controlled-form/ds-controlled-checkbox/aria-disabled/DSControlledCheckbox.aria-disabled.visual.spec.js +25 -0
- package/ds-controlled-form/ds-controlled-checkbox/aria-disabled/DSControlledCheckbox.axe-core.aria-disabled.func.spec.js +24 -0
- package/ds-controlled-form/ds-controlled-checkbox/slots/DSControlledCheckbox.slots.func.spec.js +78 -0
- package/ds-controlled-form/ds-controlled-checkbox/theme-font/DSControlledCheckbox.theme-font.func.spec.js +30 -0
- package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +7 -21
- package/ds-controlled-form/ds-controlled-inputgroup/autocomplete/DSControlledInputGroup.autocomplete.axe-core.func.spec.js +5 -6
- package/ds-controlled-form/ds-controlled-inputgroup/basic/DSControlledInputGroup.basic.axe-core.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/basic/DSControlledInputGroup.basic.visual.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/form-item-layout/DSControlledInputGroup.form-item-layout.axe-core.func.spec.js +2 -1
- package/ds-controlled-form/ds-controlled-inputgroup/form-item-layout/DSControlledInputGroup.form-item-layout.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.axe-core.func.spec.js +3 -2
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.func.spec.js +2 -1
- package/ds-controlled-form/ds-controlled-inputgroup/protected/DSControlledInputGroup.protected.visual.spec.js +2 -1
- package/ds-controlled-form/ds-input-text/DSInputText.clearable.keyboard.func.spec.js +2 -2
- package/ds-controlled-form/ds-input-text/DSInputText.func.spec.js +14 -12
- package/ds-controlled-form/ds-input-text/DSInputTextCO.js +31 -8
- package/ds-controlled-form/ds-input-text/aria-disabled/DSInputText.aria-disabled.axe-core.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/aria-disabled/DSInputText.aria-disabled.func.spec.js +42 -0
- package/ds-controlled-form/ds-input-text/aria-disabled/DSInputText.aria-disabled.visual.spec.js +28 -0
- package/ds-controlled-form/ds-input-text/placeholder/DSInputText.placeholder.visual.spec.js +15 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.axe-core.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.visual.spec.js +28 -0
- package/ds-controlled-form/ds-input-text/slots/DSInputText.slots.axe-core.func.spec.js +23 -0
- package/ds-controlled-form/ds-input-text/slots/DSInputText.slots.func.spec.js +35 -0
- package/ds-controlled-form/ds-input-text/slots/DSInputText.slots.visual.spec.js +19 -0
- package/ds-controlled-form/react-hook-form/ReactHook.func.spec.js +2 -1
- package/ds-controlled-form/react-hook-form/ReactHook.visual.spec.js +2 -1
- package/ds-controlled-form/react-hook-form/ReactHookCO.js +0 -10
- package/ds-controlled-form/useMask/Number/UseNumberMask.axe-core.func.spec.js +48 -0
- package/ds-controlled-form/useMask/Number/UseNumberMask.func.spec.js +37 -36
- package/ds-controlled-form/useMask/Number/UseNumberMask.visual.spec.js +7 -6
- package/ds-controlled-form/useMask/Phone/UsePhoneMask.func.spec.js +9 -8
- package/ds-controlled-form/useMask/Phone/UsePhoneMask.visual.spec.js +4 -3
- package/ds-controlled-form/useMask/ReackHookFormWithMask/ReactHookFormWithMask.func.spec.js +4 -3
- package/ds-controlled-form/useMask/ReackHookFormWithMask/ReactHookFormWithMask.visual.spec.js +5 -4
- package/ds-controlled-form/useMask/RegExp/UseRegExpMask.func.spec.js +6 -5
- package/ds-controlled-form/useMask/SSN/UseSsnMask.func.spec.js +7 -6
- package/ds-controlled-form/useMask/ZipCode/UseZipCodeMask.func.spec.js +6 -5
- package/ds-controlled-form/useMask/useMaskCO.js +1 -11
- package/ds-data-table-async/components/FiltersCOextra.js +1 -1
- package/ds-data-table-async/components/OnRowClickCO.js +1 -1
- package/ds-data-table-async/pagination/DSDataTable.pagination.func.spec.js +3 -2
- package/ds-dialog/components/DialogFormsCO.js +1 -1
- package/ds-dropdownmenu-v2/DSDDMenuV2.axe-core.func.spec.js +2 -15
- package/ds-dropdownmenu-v2/DSDDMenuV2.visual.spec.js +5 -5
- package/ds-dropdownmenu-v2/DSDDMenuV2CO.js +8 -2
- package/ds-dropdownmenu-v2/aria-disabled/DSDDMenuV2.aria-disabled.visual.spec.js +20 -0
- package/ds-dropdownmenu-v2/basic/DSDDMenuV2.basic.func.spec.js +27 -27
- package/ds-dropdownmenu-v2/mandatory-single/DSDDMenuV2.mandatory-single.func.spec.js +4 -4
- package/ds-floating-context/DSFloatingContext.visual.spec.js +46 -0
- package/ds-floating-context/DSFloatingContextCO.js +46 -0
- package/ds-floating-context/placement/DSFloatingContext.placement.visual.spec.js +48 -0
- package/ds-floating-context/slots/DSFloatingContext.slots.axe-core.func.spec.js +23 -0
- package/ds-floating-context/slots/DSFloatingContext.slots.func.spec.js +41 -0
- package/ds-floating-context/slots/DSFloatingContext.slots.visual.spec.js +18 -0
- package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +3 -3
- package/ds-hooks/DSHook.usetree.func.spec.js +3 -2
- package/ds-hooks/useFocusTrap/UseFocusTrap.func.spec.js +36 -0
- package/ds-hooks/useFocusTrap/UseFocusTrapCO.js +10 -0
- package/ds-hooks/useKeyboardNavigation/DSHook.useKeyboardNavigation.func.spec.js +145 -0
- package/ds-hooks/useKeyboardNavigation/UseKeyboardNavigationCO.js +33 -0
- package/ds-hooks/useOnBlurOut/UseOnBlurOut.axe-core.func.spec.js +29 -0
- package/ds-hooks/useOnBlurOut/UseOnBlurOut.func.spec.js +83 -0
- package/ds-hooks/useOnBlurOut/UseOnBlurOutCO.js +11 -0
- package/ds-icons/DSIcons.visual.spec.js +45 -0
- package/ds-icons/DSIconsCO.js +30 -0
- package/ds-indeterminate-progress-indicator/DSIndetermintateProgressIndicator.axe-core.func.spec.js +31 -0
- package/ds-menu-item/DSMenuItems.func.spec.js +16 -16
- package/ds-menu-item/DSMenuItems.visual.spec.js +8 -32
- package/ds-menu-item/DSMenuItemsCO.js +4 -0
- package/ds-menu-item/aria-disabled/DSMenuItems.aria-disabled.axe-core.func.spec.js +35 -0
- package/ds-menu-item/aria-disabled/DSMenuItems.aria-disabled.visual.spec.js +68 -0
- package/ds-menu-item/read-only/DSMenuItems.read-only.axe-core.func.spec.js +35 -0
- package/ds-menu-item/read-only/DSMenuItems.read-only.visual.spec.js +66 -0
- package/ds-query-builder/DSQueryBuilderCO.js +1 -1
- package/ds-shuttle-v2/items/DSShuttleV2.items.func.spec.js +4 -2
- package/ds-system/DSSystem.visual.spec.js +19 -0
- package/ds-system/DSSystemCO.js +15 -0
- package/ds-typography/DSTypography.func.spec.js +5 -5
- package/ds-typography/DSTypography.visual.spec.js +50 -48
- package/ds-typography/DSTypographyCO.js +25 -5
- package/ds-typography/theme-font/DSTypography.theme-font.func.spec.js +30 -0
- package/package.json +121 -119
- package/ds-button-v2/DSButtonV2.axe-core.func.spec.js +0 -22
- package/ds-button-v2/DSButtonV2.func.spec.js +0 -139
- package/ds-button-v2/DSButtonV2.visual.spec.js +0 -153
- package/ds-button-v2/DSButtonV2CO.js +0 -43
- package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckbox.smoke.spec.js +0 -125
- package/ds-indeterminate-progress-indicator/DSIndetermintateProgressIndicator.func.spec.js +0 -17
- /package/ds-typography/{DSTypography.resize.visual.spec.js → DSTypography.resize.skipped.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable import/no-relative-packages */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import { PATH_E2E_HOOKS_MASKS } from '../../../environments/storybook/paths';
|
|
4
|
-
import { PageObject, Urlbuilder
|
|
4
|
+
import { PageObject, Urlbuilder } from '../../helpers';
|
|
5
5
|
|
|
6
6
|
export default class UseMaskCO extends PageObject {
|
|
7
7
|
static currencyURL = new Urlbuilder(PATH_E2E_HOOKS_MASKS, 'currency-test');
|
|
@@ -20,10 +20,6 @@ export default class UseMaskCO extends PageObject {
|
|
|
20
20
|
|
|
21
21
|
static withReactHookForm = new Urlbuilder(PATH_E2E_HOOKS_MASKS, 'react-hook-form-with-mask-test');
|
|
22
22
|
|
|
23
|
-
static async getInput() {
|
|
24
|
-
return $('[data-testid="ds-input-text-input"]');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
23
|
static async getCheckbox() {
|
|
28
24
|
return $('[data-testid="ds-checkbox"]');
|
|
29
25
|
}
|
|
@@ -32,12 +28,6 @@ export default class UseMaskCO extends PageObject {
|
|
|
32
28
|
return $('[ data-testid="ds-controlled-toggle-checkbox"]');
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
static async getInputs() {
|
|
36
|
-
return $$('[data-testid="ds-input-text-input"]');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static getInputByIndex = async (index) => getElementByIndex(this.getInputs, index);
|
|
40
|
-
|
|
41
31
|
static snapshotPath(example = 'basic') {
|
|
42
32
|
return PageObject.getSnapshotPathBuilder('DSInputMask', example, 'ds-input-mask');
|
|
43
33
|
}
|
|
@@ -5,7 +5,7 @@ export default class FiltersCOextra extends PageObject {
|
|
|
5
5
|
static filterCurrencyPopper = {
|
|
6
6
|
getPopper: async () => $('[data-testid="data-table-currency-range"]'),
|
|
7
7
|
async getInputs() {
|
|
8
|
-
return (await this.getPopper()).$$('[data-testid="ds-
|
|
8
|
+
return (await this.getPopper()).$$('[data-testid="ds-inputtext-input"]');
|
|
9
9
|
},
|
|
10
10
|
async getLeftInput() {
|
|
11
11
|
return getElementByIndex(await this.getInputs.bind(this), 0);
|
|
@@ -20,7 +20,7 @@ export default class OnRowClickCO extends PageObject {
|
|
|
20
20
|
|
|
21
21
|
static getPickerTrigger = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-trigger-icon"]');
|
|
22
22
|
|
|
23
|
-
static getInputText = async () => $$('[data-testid="ds-
|
|
23
|
+
static getInputText = async () => $$('[data-testid="ds-inputtext-input"]');
|
|
24
24
|
|
|
25
25
|
static getInputTextByIndex = async (index) => getElementByIndex(this.getInputText, index);
|
|
26
26
|
}
|
|
@@ -14,8 +14,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
14
14
|
});
|
|
15
15
|
it('01: should have the previous page button disabled', async () => {
|
|
16
16
|
const prevPageBt = await PaginationNavCO.getPrevPageBt();
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
// DSButtonV2 renders the native `disabled` attribute and intentionally omits aria-disabled
|
|
18
|
+
// (that is reserved for applyAriaDisabled/readOnly), so assert the native disabled state.
|
|
19
|
+
await expect(prevPageBt).toBeDisabled();
|
|
19
20
|
});
|
|
20
21
|
it('02: should expand the dropdown menu of the pages per component when clicking its button', async () => {
|
|
21
22
|
const elemsPerPage = await PaginationNavCO.getElemsPerPageMenu();
|
|
@@ -2,7 +2,7 @@ import { getElementByIndex } from '../helpers';
|
|
|
2
2
|
import { PageObject } from '../../helpers';
|
|
3
3
|
|
|
4
4
|
export default class DialogFormsCO extends PageObject {
|
|
5
|
-
static getAllFormInputs = async () => $$('[data-testid="ds-
|
|
5
|
+
static getAllFormInputs = async () => $$('[data-testid="ds-inputtext-input"]');
|
|
6
6
|
|
|
7
7
|
static getFormInputByIndex = async (index) => getElementByIndex(this.getAllFormInputs, index);
|
|
8
8
|
|
|
@@ -16,6 +16,8 @@ if (
|
|
|
16
16
|
it('01: should display a loading indicator when ddmenu is triggered', async () => {
|
|
17
17
|
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
18
18
|
await ddMenuTrigger.click();
|
|
19
|
+
const loadingWrapper = await DSDDMenuV2CO.getLoadingWrapper();
|
|
20
|
+
await loadingWrapper.waitForDisplayed();
|
|
19
21
|
const result = await axeCoreCheck();
|
|
20
22
|
expect(result.length).toBe(0);
|
|
21
23
|
});
|
|
@@ -106,19 +108,4 @@ if (
|
|
|
106
108
|
expect(result.length).toBe(0);
|
|
107
109
|
});
|
|
108
110
|
});
|
|
109
|
-
|
|
110
|
-
describe('PUI-11780, DropdownMenuV2, Skeleton Menu Item -AxeCore.', () => {
|
|
111
|
-
before('loading page', async () => {
|
|
112
|
-
const errorOnGo = await DSDDMenuV2CO.skeletonItemURL.go();
|
|
113
|
-
if (errorOnGo) throw errorOnGo;
|
|
114
|
-
});
|
|
115
|
-
it('01: should display skeleton menu item and pass axe-core scan', async () => {
|
|
116
|
-
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
117
|
-
await ddMenuTrigger.click();
|
|
118
|
-
const skeleton = await DSDDMenuV2CO.getSkeletons();
|
|
119
|
-
await skeleton.waitForDisplayed();
|
|
120
|
-
const result = await axeCoreCheck();
|
|
121
|
-
expect(result.length).toBe(0);
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
111
|
}
|
|
@@ -77,21 +77,21 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
describe('PUI-9587 - DropdownMenuV2, Basic keyboard selection and submenus -Visual.', () => {
|
|
80
|
-
|
|
80
|
+
beforeEach(async () => {
|
|
81
81
|
const errorOnGo = await DSDDMenuV2CO.basicURL.go();
|
|
82
82
|
if (errorOnGo) throw errorOnGo;
|
|
83
83
|
});
|
|
84
84
|
it('01: should display a dropdown submenu expanded and selected', async () => {
|
|
85
|
-
|
|
86
|
-
await
|
|
85
|
+
await browser.keys(Key.Tab);
|
|
86
|
+
await browser.keys(Key.Enter);
|
|
87
87
|
await browser.keys(Key.Space);
|
|
88
88
|
await browser.keys(Key.ArrowRight);
|
|
89
89
|
const snapshot = await browser.checkSnapshot(DSDDMenuV2CO.snapshotPath('ds-ddmenuv2-one-submenu'));
|
|
90
90
|
await expect(snapshot).toEqual(0);
|
|
91
91
|
});
|
|
92
92
|
it('02: should display a dropdown double submenu ', async () => {
|
|
93
|
-
|
|
94
|
-
await
|
|
93
|
+
await browser.keys(Key.Tab);
|
|
94
|
+
await browser.keys(Key.Enter);
|
|
95
95
|
await browser.keys(Key.ArrowLeft);
|
|
96
96
|
await browser.keys(Key.Space);
|
|
97
97
|
await browser.keys(Key.ArrowDown);
|
|
@@ -28,6 +28,8 @@ export default class DSDropdownMenu extends PageObject {
|
|
|
28
28
|
|
|
29
29
|
static onClickURL = new Urlbuilder(PATH_E2E_DDMENU_V2, 'on-click-test');
|
|
30
30
|
|
|
31
|
+
static applyAriaDisabled = new Urlbuilder(PATH_E2E_DDMENU_V2, 'apply-aria-disabled-test');
|
|
32
|
+
|
|
31
33
|
// Selectors
|
|
32
34
|
|
|
33
35
|
static async getDropDownTrigger() {
|
|
@@ -35,7 +37,11 @@ export default class DSDropdownMenu extends PageObject {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
static async getEmptyState() {
|
|
38
|
-
return $('[data-testid="ds-
|
|
40
|
+
return $('[data-testid="ds-dropdownmenu-empty-state-wrapper"]');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static async getLoadingWrapper() {
|
|
44
|
+
return $('[data-testid="dropdown-menu-loading-wrapper"]');
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
static async getOptions() {
|
|
@@ -59,7 +65,7 @@ export default class DSDropdownMenu extends PageObject {
|
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
static async getMenuItemLabel(label) {
|
|
62
|
-
return $(`//div[@data-testid="ds-
|
|
68
|
+
return $(`//div[@data-testid="ds-menuitem-menu-item-content-wrapper"]//span[contains(text(), "${label}")]`);
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
static async getCustomDataTestId(datatestid) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSDDMenuV2CO from '../DSDDMenuV2CO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-14412 - [DropDownMenuV2] applyAriaDisabled prop - visual Test', () => {
|
|
6
|
+
before(async () => {
|
|
7
|
+
const errorOnGo = await DSDDMenuV2CO.applyAriaDisabled.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display a dropdown with custom min width', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
await browser.keys(Key.Tab);
|
|
13
|
+
await browser.keys(Key.Enter);
|
|
14
|
+
await browser.keys(Key.Enter);
|
|
15
|
+
await browser.keys(Key.ArrowRight);
|
|
16
|
+
const snapshot = await browser.eyesCheckSnapshot(DSDDMenuV2CO.snapshotPath('ds-ddmenuv2-aria-disabled-kb-nav'));
|
|
17
|
+
await expect(snapshot).toEqual(0);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -12,13 +12,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
12
12
|
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
13
13
|
await ddMenuTrigger.click();
|
|
14
14
|
const optionsPresent = (await DSDDMenuV2CO.getOptions()).length;
|
|
15
|
-
await expect(optionsPresent).toEqual(
|
|
15
|
+
await expect(optionsPresent).toEqual(9);
|
|
16
16
|
});
|
|
17
17
|
it('02: should open also a submenu and have 5 more options', async () => {
|
|
18
18
|
const submenuIcon = await DSDDMenuV2CO.getSubmenuIconByIndex(0);
|
|
19
19
|
await submenuIcon.click();
|
|
20
20
|
const optionsPresent = (await DSDDMenuV2CO.getOptions()).length;
|
|
21
|
-
await expect(optionsPresent).toEqual(
|
|
21
|
+
await expect(optionsPresent).toEqual(16);
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
describe('PUI-11827 - DropdownMenuV2 - onOptionClick - mouse functional test', () => {
|
|
@@ -30,59 +30,59 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
30
30
|
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
31
31
|
await ddMenuTrigger.click();
|
|
32
32
|
// option label: Standard
|
|
33
|
-
const firstOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
33
|
+
const firstOption = await DSDDMenuV2CO.getOptionByIndex(1);
|
|
34
34
|
await firstOption.click();
|
|
35
35
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
36
|
-
await expect(counterValue).
|
|
36
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 1'));
|
|
37
37
|
});
|
|
38
38
|
it('02: should increase the counter by clicking option type single', async () => {
|
|
39
39
|
// option label: View names are sentence case
|
|
40
|
-
const secondOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
40
|
+
const secondOption = await DSDDMenuV2CO.getOptionByIndex(2);
|
|
41
41
|
await secondOption.click();
|
|
42
42
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
43
|
-
await expect(counterValue).
|
|
43
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 2'));
|
|
44
44
|
});
|
|
45
45
|
it('03: should not increase the counter by clicking option type singleWithSubmenu - disabled', async () => {
|
|
46
46
|
// option label: View names can be long
|
|
47
|
-
const thirdOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
47
|
+
const thirdOption = await DSDDMenuV2CO.getOptionByIndex(3);
|
|
48
48
|
await thirdOption.click();
|
|
49
49
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
50
|
-
await expect(counterValue).
|
|
50
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 2'));
|
|
51
51
|
});
|
|
52
52
|
it('04: should increase the counter by clicking option type singleWithSubmenu', async () => {
|
|
53
53
|
// option label: Monthly views
|
|
54
|
-
const fourthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
54
|
+
const fourthOption = await DSDDMenuV2CO.getOptionByIndex(4);
|
|
55
55
|
await fourthOption.click();
|
|
56
56
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
57
|
-
await expect(counterValue).
|
|
57
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 3'));
|
|
58
58
|
});
|
|
59
59
|
it('05: should not increase the counter by clicking option type submenu', async () => {
|
|
60
60
|
// option label: Other views
|
|
61
|
-
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
61
|
+
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(5);
|
|
62
62
|
await fifthOption.click();
|
|
63
63
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
64
|
-
await expect(counterValue).
|
|
64
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 3'));
|
|
65
65
|
});
|
|
66
66
|
it('06: should not increase the counter by clicking option type single - disabled', async () => {
|
|
67
67
|
// option label: Random view
|
|
68
|
-
const ninthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
68
|
+
const ninthOption = await DSDDMenuV2CO.getOptionByIndex(11);
|
|
69
69
|
await ninthOption.click();
|
|
70
70
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
71
|
-
await expect(counterValue).
|
|
71
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 3'));
|
|
72
72
|
});
|
|
73
73
|
it('07: should not increase the counter by clicking option type action - disabled', async () => {
|
|
74
74
|
// option label: Rename
|
|
75
|
-
const tenthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
75
|
+
const tenthOption = await DSDDMenuV2CO.getOptionByIndex(13);
|
|
76
76
|
await tenthOption.click();
|
|
77
77
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
78
|
-
await expect(counterValue).
|
|
78
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 3'));
|
|
79
79
|
});
|
|
80
80
|
it('08: should increase the counter by clicking option type action', async () => {
|
|
81
81
|
// Create new view
|
|
82
|
-
const sixthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
82
|
+
const sixthOption = await DSDDMenuV2CO.getOptionByIndex(8);
|
|
83
83
|
await sixthOption.click();
|
|
84
84
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
85
|
-
await expect(counterValue).
|
|
85
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 4'));
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
describe('PUI-11829 - DropdownMenuV2 - onOptionClick - keyboard functional test', () => {
|
|
@@ -95,14 +95,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
95
95
|
await browser.keys(Key.Enter);
|
|
96
96
|
await browser.keys(Key.Return);
|
|
97
97
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
98
|
-
await expect(counterValue).
|
|
98
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 1'));
|
|
99
99
|
});
|
|
100
100
|
it('02: should increase the counter - option type single [Space]', async () => {
|
|
101
101
|
// option label: View names are sentence case
|
|
102
102
|
await browser.keys(Key.ArrowDown);
|
|
103
103
|
await browser.keys(Key.Space);
|
|
104
104
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
105
|
-
await expect(counterValue).
|
|
105
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 2'));
|
|
106
106
|
});
|
|
107
107
|
it('03: should not increase the counter - option type submenu [Enter]', async () => {
|
|
108
108
|
// option label: Other views
|
|
@@ -110,14 +110,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
110
110
|
await browser.keys(Key.ArrowDown);
|
|
111
111
|
await browser.keys(Key.Return);
|
|
112
112
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
113
|
-
await expect(counterValue).
|
|
113
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 2'));
|
|
114
114
|
});
|
|
115
115
|
it('04: should increase the counter - option type action [Space]', async () => {
|
|
116
116
|
// option label: Create new view
|
|
117
117
|
await browser.keys(Key.ArrowDown);
|
|
118
118
|
await browser.keys(Key.Space);
|
|
119
119
|
const counterValue = await DSDDMenuV2CO.getCounterValue();
|
|
120
|
-
await expect(counterValue).
|
|
120
|
+
await expect(counterValue).toHaveText(expect.stringContaining('Clicks: 3'));
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
if (browser.capabilities.browserName === 'chrome' || browser.capabilities.browserName === 'Chrome') {
|
|
@@ -129,27 +129,27 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
129
129
|
it('01: type singleWithSubmenu: check global attributes', async () => {
|
|
130
130
|
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
131
131
|
await ddMenuTrigger.click();
|
|
132
|
-
const firstOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
132
|
+
const firstOption = await DSDDMenuV2CO.getOptionByIndex(1);
|
|
133
133
|
await expect(firstOption).toHaveAttribute('aria-label', 'Standard case aria label');
|
|
134
134
|
await expect(firstOption).toHaveAttribute('aria-describedby', 'mycustomID');
|
|
135
135
|
await expect(firstOption).toHaveAttribute('data-testid', 'single-with-submenu-item-id1');
|
|
136
136
|
});
|
|
137
137
|
it('02: type single: check global attributes', async () => {
|
|
138
|
-
const secondOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
138
|
+
const secondOption = await DSDDMenuV2CO.getOptionByIndex(2);
|
|
139
139
|
await expect(secondOption).toHaveAttribute('aria-label', 'View names are sentence case aria label');
|
|
140
140
|
await expect(secondOption).toHaveAttribute('aria-describedby', 'mycustomID2');
|
|
141
141
|
await expect(secondOption).toHaveAttribute('data-testid', 'single-item-id2');
|
|
142
142
|
});
|
|
143
143
|
it('03: type submenu: check global attributes', async () => {
|
|
144
|
-
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
144
|
+
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(5);
|
|
145
145
|
await expect(fifthOption).toHaveAttribute('aria-label', 'Other views aria label');
|
|
146
146
|
await expect(fifthOption).toHaveAttribute('aria-describedby', 'mycustomID3');
|
|
147
147
|
await expect(fifthOption).toHaveAttribute('data-testid', 'submenu-item-id5');
|
|
148
148
|
});
|
|
149
149
|
it('04: type singleWithSubmenu (2nd level): check global attributes', async () => {
|
|
150
|
-
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
150
|
+
const fifthOption = await DSDDMenuV2CO.getOptionByIndex(5);
|
|
151
151
|
await fifthOption.click();
|
|
152
|
-
const yearlyViewsOption = await DSDDMenuV2CO.getOptionByIndex(
|
|
152
|
+
const yearlyViewsOption = await DSDDMenuV2CO.getOptionByIndex(9);
|
|
153
153
|
await yearlyViewsOption.waitForDisplayed();
|
|
154
154
|
await expect(yearlyViewsOption).toHaveAttribute('aria-label', 'Yearly views aria label');
|
|
155
155
|
await expect(yearlyViewsOption).toHaveAttribute('aria-describedby', 'mycustomID4');
|
|
@@ -9,13 +9,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
9
|
it('01: should open ddmenu and have option 1 automatically checked', async () => {
|
|
10
10
|
const ddMenuTrigger = await DSDDMenuV2CO.getDropDownTrigger();
|
|
11
11
|
await ddMenuTrigger.click();
|
|
12
|
-
const opt1 = await DSDDMenuV2CO.getOptionByIndex(
|
|
12
|
+
const opt1 = await DSDDMenuV2CO.getOptionByIndex(1);
|
|
13
13
|
const isOpt1Checked = await opt1.getAttribute('aria-selected');
|
|
14
14
|
await expect(isOpt1Checked).toEqual('true');
|
|
15
15
|
});
|
|
16
16
|
it('02: should click option 2 and have this option checked and option 1 unchecked', async () => {
|
|
17
|
-
const opt1 = await DSDDMenuV2CO.getOptionByIndex(
|
|
18
|
-
const opt2 = await DSDDMenuV2CO.getOptionByIndex(
|
|
17
|
+
const opt1 = await DSDDMenuV2CO.getOptionByIndex(1);
|
|
18
|
+
const opt2 = await DSDDMenuV2CO.getOptionByIndex(3);
|
|
19
19
|
await opt2.click();
|
|
20
20
|
const isOpt1Checked = await opt1.getAttribute('aria-selected');
|
|
21
21
|
await expect(isOpt1Checked).toEqual('false');
|
|
@@ -23,7 +23,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
23
23
|
await expect(isOpt2Checked).toEqual('true');
|
|
24
24
|
});
|
|
25
25
|
it('03: should not deselect the only option selected with click (mandatory select)', async () => {
|
|
26
|
-
const opt2 = await DSDDMenuV2CO.getOptionByIndex(
|
|
26
|
+
const opt2 = await DSDDMenuV2CO.getOptionByIndex(3);
|
|
27
27
|
await opt2.click();
|
|
28
28
|
const isOpt2Checked = await opt2.getAttribute('aria-selected');
|
|
29
29
|
await expect(isOpt2Checked).toEqual('true');
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* eslint-disable wdio/no-pause */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import { mouseOver } from '../helpers';
|
|
4
|
+
import DSFloatingContextCO from './DSFloatingContextCO';
|
|
5
|
+
import DSButtonV3CO from '../ds-button-v3/DSButtonV3CO';
|
|
6
|
+
|
|
7
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-14534 - DSFloatingContext:: basic - visual test', () => {
|
|
9
|
+
beforeEach('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSFloatingContextCO.basicURL.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
it('01: should display the tooltip correctly on hover', async () => {
|
|
14
|
+
await browser.eyesOpen();
|
|
15
|
+
const triggerButton = await DSButtonV3CO.getButton();
|
|
16
|
+
await mouseOver(triggerButton);
|
|
17
|
+
const tooltip = await DSFloatingContextCO.getFloatingContextWrapper();
|
|
18
|
+
await tooltip.waitForDisplayed();
|
|
19
|
+
const snapshot = await browser.eyesCheckSnapshot(DSFloatingContextCO.snapshotPath('floating-context-on-hover'));
|
|
20
|
+
await expect(snapshot).toEqual(0);
|
|
21
|
+
});
|
|
22
|
+
it('02: should display the tooltip correctly on tab', async () => {
|
|
23
|
+
await browser.eyesOpen();
|
|
24
|
+
await browser.keys(Key.Tab);
|
|
25
|
+
const tooltipContent = await DSFloatingContextCO.getFloatingContextContent();
|
|
26
|
+
await tooltipContent.waitForDisplayed();
|
|
27
|
+
const snapshot = await browser.eyesCheckSnapshot(DSFloatingContextCO.snapshotPath('floating-context-on-tab'));
|
|
28
|
+
await expect(snapshot).toEqual(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
describe('PUI-15371 - DSFloatingContext:: custom offset - visual test', () => {
|
|
32
|
+
before('loading page', async () => {
|
|
33
|
+
const errorOnGo = await DSFloatingContextCO.customOffsetURL.go();
|
|
34
|
+
if (errorOnGo) throw errorOnGo;
|
|
35
|
+
});
|
|
36
|
+
it('01: should display the tooltip correctly on hover', async () => {
|
|
37
|
+
await browser.eyesOpen();
|
|
38
|
+
const triggerButton = await DSButtonV3CO.getButton();
|
|
39
|
+
await mouseOver(triggerButton);
|
|
40
|
+
const tooltip = await DSFloatingContextCO.getFloatingContextWrapper();
|
|
41
|
+
await tooltip.waitForDisplayed();
|
|
42
|
+
const snapshot = await browser.eyesCheckSnapshot(DSFloatingContextCO.snapshotPath('floating-context-on-hover'));
|
|
43
|
+
await expect(snapshot).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* eslint-disable no-dupe-class-members */
|
|
2
|
+
import { PATH_E2E_FLOATING_CONTEXT } from '../../environments/storybook/paths';
|
|
3
|
+
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
|
+
|
|
5
|
+
export default class DSFloatingContextCO extends PageObject {
|
|
6
|
+
// STORIES
|
|
7
|
+
static basicURL = new Urlbuilder(PATH_E2E_FLOATING_CONTEXT, 'basic-test');
|
|
8
|
+
|
|
9
|
+
static customOffsetURL = new Urlbuilder(PATH_E2E_FLOATING_CONTEXT, 'custom-offsets-test');
|
|
10
|
+
|
|
11
|
+
static slotsURL = new Urlbuilder(PATH_E2E_FLOATING_CONTEXT, 'slots-test');
|
|
12
|
+
|
|
13
|
+
static positionsTestURL = new Urlbuilder(PATH_E2E_FLOATING_CONTEXT, 'positions-test');
|
|
14
|
+
|
|
15
|
+
static async getFloatingContextWrapper() {
|
|
16
|
+
return $('[data-testid="ds-floating-wrapper-root"]');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static async getFloatingContextContent() {
|
|
20
|
+
return $('[data-testid="ds-floatingwrapper-content"]');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static async getFloatingContextContents() {
|
|
24
|
+
return $$('[data-testid="ds-floatingwrapper-content"]');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static async getHelpButtons() {
|
|
28
|
+
return $$('[aria-label="Help"]');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static async getFloatingContextArrowSlot() {
|
|
32
|
+
return $('[data-dimsum-slot="dsFloatingwrapperArrow"]');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static async getFloatingContextContentSlot() {
|
|
36
|
+
return $('[data-dimsum-slot="dsFloatingwrapperContent"]');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static async getFloatingContextRootSlot() {
|
|
40
|
+
return $('[data-dimsum-slot="dsFloatingwrapperRoot"]');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static snapshotPath(example = 'basic') {
|
|
44
|
+
return PageObject.getSnapshotPathBuilder('DSFloatingContext', example, 'ds-floating-context');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Tests for the fix introduced in PUI-14527 (useFloatingContext placement string type mismatch)
|
|
2
|
+
import { mouseOver } from '../../helpers';
|
|
3
|
+
import DSFloatingContextCO from '../DSFloatingContextCO';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-18529 - DSFloatingContext:: useFloatingContext placement directions - visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSFloatingContextCO.positionsTestURL.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('01: should display tooltip with right placement on hover', async () => {
|
|
13
|
+
const buttons = await DSFloatingContextCO.getHelpButtons();
|
|
14
|
+
await mouseOver(buttons[0]);
|
|
15
|
+
const contents = await DSFloatingContextCO.getFloatingContextContents();
|
|
16
|
+
await contents[0].waitForDisplayed();
|
|
17
|
+
const snapshot = await browser.percyCheckScreenshot(DSFloatingContextCO.snapshotPath('placement-right'));
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('02: should display tooltip with top placement on hover', async () => {
|
|
22
|
+
const buttons = await DSFloatingContextCO.getHelpButtons();
|
|
23
|
+
await mouseOver(buttons[1]);
|
|
24
|
+
const contents = await DSFloatingContextCO.getFloatingContextContents();
|
|
25
|
+
await contents[0].waitForDisplayed();
|
|
26
|
+
const snapshot = await browser.percyCheckScreenshot(DSFloatingContextCO.snapshotPath('placement-top'));
|
|
27
|
+
await expect(snapshot).toEqual(0);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('03: should display tooltip with bottom placement on hover', async () => {
|
|
31
|
+
const buttons = await DSFloatingContextCO.getHelpButtons();
|
|
32
|
+
await mouseOver(buttons[2]);
|
|
33
|
+
const contents = await DSFloatingContextCO.getFloatingContextContents();
|
|
34
|
+
await contents[0].waitForDisplayed();
|
|
35
|
+
const snapshot = await browser.percyCheckScreenshot(DSFloatingContextCO.snapshotPath('placement-bottom'));
|
|
36
|
+
await expect(snapshot).toEqual(0);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('04: should display tooltip with left placement on hover', async () => {
|
|
40
|
+
const buttons = await DSFloatingContextCO.getHelpButtons();
|
|
41
|
+
await mouseOver(buttons[3]);
|
|
42
|
+
const contents = await DSFloatingContextCO.getFloatingContextContents();
|
|
43
|
+
await contents[0].waitForDisplayed();
|
|
44
|
+
const snapshot = await browser.percyCheckScreenshot(DSFloatingContextCO.snapshotPath('placement-left'));
|
|
45
|
+
await expect(snapshot).toEqual(0);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSFloatingContextCO from '../DSFloatingContextCO';
|
|
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-15675 - DSFloatingContextCO:: slots - axe-core test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSFloatingContextCO.slotsURL.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should display a custom Floating Context and pass axe-core', async () => {
|
|
17
|
+
const tooltip = await DSFloatingContextCO.getFloatingContextContentSlot();
|
|
18
|
+
await tooltip.waitForDisplayed();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import DSFloatingContextCO from '../DSFloatingContextCO';
|
|
2
|
+
|
|
3
|
+
if (
|
|
4
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
5
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
6
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
7
|
+
browser.capabilities.browserName === 'Chrome'
|
|
8
|
+
) {
|
|
9
|
+
describe('PUI-15676 - DSFloatingContextCO:: slots - globalAttributes test', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSFloatingContextCO.slotsURL.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: should have custom data-*', async () => {
|
|
15
|
+
const contentSlot = await DSFloatingContextCO.getFloatingContextContentSlot();
|
|
16
|
+
const rootSlot = await DSFloatingContextCO.getFloatingContextRootSlot();
|
|
17
|
+
|
|
18
|
+
await expect(contentSlot).toHaveAttribute('data-testid', 'floating-content-custom-data-testid');
|
|
19
|
+
await expect(rootSlot).toHaveAttribute('data-testid', 'floating-root-custom-data-testid');
|
|
20
|
+
});
|
|
21
|
+
it('02: should have custom aria-*', async () => {
|
|
22
|
+
// const arrowSlot = DSFloatingContextCO.getFloatingContextArrowSlot();
|
|
23
|
+
const contentSlot = await DSFloatingContextCO.getFloatingContextContentSlot();
|
|
24
|
+
const rootSlot = await DSFloatingContextCO.getFloatingContextRootSlot();
|
|
25
|
+
|
|
26
|
+
// await expect(arrowSlot).toHaveAttribute('aria-label', 'arrow-custom-aria-label');
|
|
27
|
+
await expect(contentSlot).toHaveAttribute('aria-label', 'content-custom-aria-label');
|
|
28
|
+
await expect(rootSlot).toHaveAttribute('aria-label', 'root-custom-aria-label');
|
|
29
|
+
});
|
|
30
|
+
it('03: should have custom global attributes', async () => {
|
|
31
|
+
const contentSlot = await DSFloatingContextCO.getFloatingContextContentSlot();
|
|
32
|
+
const rootSlot = await DSFloatingContextCO.getFloatingContextRootSlot();
|
|
33
|
+
const zIndexRoot = await rootSlot.getCSSProperty('z-index');
|
|
34
|
+
|
|
35
|
+
await expect(contentSlot).toHaveAttribute('id', 'floating-content-id');
|
|
36
|
+
await expect(rootSlot).toHaveAttribute('id', 'floating-root-id');
|
|
37
|
+
await expect(rootSlot).toHaveAttribute('role', 'tooltip');
|
|
38
|
+
await expect(zIndexRoot.value).toEqual(5000);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable wdio/no-pause */
|
|
2
|
+
import DSFloatingContextCO from '../DSFloatingContextCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-15677 - DSFloatingContext:: slots - visual test', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSFloatingContextCO.slotsURL.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display a custom Floating Context', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
const tooltip = await DSFloatingContextCO.getFloatingContextRootSlot();
|
|
13
|
+
await tooltip.waitForDisplayed();
|
|
14
|
+
const snapshot = await browser.eyesCheckSnapshot(DSFloatingContextCO.snapshotPath('floating-context-slots'));
|
|
15
|
+
await expect(snapshot).toEqual(0);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -39,15 +39,15 @@ export default class DSFormLayoutBlockItemCO extends PageObject {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
static async getTextInput() {
|
|
42
|
-
return $('[data-testid="ds-
|
|
42
|
+
return $('[data-testid="ds-inputtext-input"]');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
static async getTextInputs(index = 0) {
|
|
46
|
-
return $$('[data-testid="ds-
|
|
46
|
+
return $$('[data-testid="ds-inputtext-input"]')[index];
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
static async getTextFocuseableByIndex(index = 0) {
|
|
50
|
-
return $$(`[data-testid="ds-
|
|
50
|
+
return $$(`[data-testid="ds-inputtext-root"]`)[index];
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
static async middleNameLabel() {
|
|
@@ -107,8 +107,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
107
107
|
const drillFirstItemBtn = await DSHookCO.getDrillThisBtnByIndex(0);
|
|
108
108
|
await drillFirstItemBtn.click();
|
|
109
109
|
const drillFirstChildBtn = await DSHookCO.getDrillThisBtnByIndex(0);
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
// Since PUI-17909 DSButtonV2 renders the native `disabled` attribute and intentionally omits
|
|
111
|
+
// aria-disabled (that is reserved for applyAriaDisabled/readOnly), so assert the native disabled state.
|
|
112
|
+
await expect(drillFirstChildBtn).toBeDisabled();
|
|
112
113
|
});
|
|
113
114
|
});
|
|
114
115
|
}
|