dimsum-e2e-tests 1.0.35 → 1.1.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-date-time-picker/DSControlledDateTimePickerCO.js +64 -2
- 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 +3 -2
- 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-dropzone/DSDropzoneCO.js +3 -1
- 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-form-layout-label/DSFormLayoutLabelCO.js +3 -1
- package/ds-hooks/DSHook.usetree.func.spec.js +3 -2
- package/ds-hooks/DSHookCO.js +1 -1
- 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-image/DSImageCO.js +3 -1
- 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-number-range-field/NumberRangeFieldCO.js +1 -1
- package/ds-page-number/DSPageNumberCO.js +1 -1
- package/ds-query-builder/DSQueryBuilderCO.js +1 -1
- package/ds-shuttle-v2/DSShuttleV2CO.js +36 -1
- package/ds-shuttle-v2/items/DSShuttleV2.items.func.spec.js +4 -2
- package/ds-svg/DSSvgCO.js +3 -1
- 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/zzz-eol/ds-date-range-selector/DSDateRangeSelectorCO.js +6 -4
- 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
|
@@ -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() {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { DSFormLayoutBlockItemDataTestId } from '../../packages/ds-form-layout-label/src/index.ts';
|
|
2
1
|
import { PATH_FORM_LAYOUT_LABEL } from '../../environments/storybook/paths';
|
|
3
2
|
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
3
|
|
|
4
|
+
// Literal on purpose: importing the package runtime here loads its CJS graph inside the wdio (node) process.
|
|
5
|
+
const DSFormLayoutBlockItemDataTestId = { LABEL: 'ds-form-layout-label-label' };
|
|
6
|
+
|
|
5
7
|
export default class DSFormLayoutLabel extends PageObject {
|
|
6
8
|
static basic = new Urlbuilder(PATH_FORM_LAYOUT_LABEL, 'basic');
|
|
7
9
|
|
|
@@ -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
|
}
|
package/ds-hooks/DSHookCO.js
CHANGED
|
@@ -71,7 +71,7 @@ export default class DSHookCO extends PageObject {
|
|
|
71
71
|
static getAddChildBtnByIndex = async (index) => getElementByIndex(this.getAddChildButtons, index);
|
|
72
72
|
|
|
73
73
|
static async getBreadCrumbItems() {
|
|
74
|
-
return $$('[data-testid="ds-
|
|
74
|
+
return $$('[data-testid="ds-breadcrumb-item"]');
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
static getBreadCrumbItemByIndex = async (index) => getElementByIndex(this.getBreadCrumbItems, index);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import UseFocusTrapCO from './UseFocusTrapCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
5
|
+
|
|
6
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
7
|
+
describe('PUI-12975, useFocusTrap hook -Func', () => {
|
|
8
|
+
before(async () => {
|
|
9
|
+
const errorOnGo = await UseFocusTrapCO.basicTest.go();
|
|
10
|
+
if (errorOnGo) throw errorOnGo;
|
|
11
|
+
});
|
|
12
|
+
it('01: should normally tab to third item', async () => {
|
|
13
|
+
await browser.keys(Key.Tab);
|
|
14
|
+
await browser.keys(Key.Tab);
|
|
15
|
+
await browser.keys(Key.Tab);
|
|
16
|
+
const button = await DSButtonV3CO.getButtonByIndex(2);
|
|
17
|
+
await expect(button).toBeFocused();
|
|
18
|
+
});
|
|
19
|
+
it('02: should tab and cycle back to second item (instead of the fourth)', async () => {
|
|
20
|
+
await browser.keys(Key.Tab);
|
|
21
|
+
const button = await DSButtonV3CO.getButtonByIndex(1);
|
|
22
|
+
await expect(button).toBeFocused();
|
|
23
|
+
});
|
|
24
|
+
it('03: should shif+tab and cycle back to third item (instead of the first)', async () => {
|
|
25
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
26
|
+
const button = await DSButtonV3CO.getButtonByIndex(2);
|
|
27
|
+
await expect(button).toBeFocused();
|
|
28
|
+
});
|
|
29
|
+
it('04: should tab x2 and reach the same item (third)', async () => {
|
|
30
|
+
await browser.keys(Key.Tab);
|
|
31
|
+
await browser.keys(Key.Tab);
|
|
32
|
+
const button = await DSButtonV3CO.getButtonByIndex(2);
|
|
33
|
+
await expect(button).toBeFocused();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable import/no-relative-packages */
|
|
2
|
+
import { PATH_E2E_USE_FOCUS_TRAP } from '../../environments/storybook/paths';
|
|
3
|
+
import { PageObject, Urlbuilder } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
export default class UseFocusTrapCO extends PageObject {
|
|
6
|
+
// Desktop
|
|
7
|
+
static basicTest = new Urlbuilder(PATH_E2E_USE_FOCUS_TRAP, 'basic-test');
|
|
8
|
+
|
|
9
|
+
static toggleTest = new Urlbuilder(PATH_E2E_USE_FOCUS_TRAP, 'toggle-test');
|
|
10
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import UseKeyboardNavCO from './UseKeyboardNavigationCO';
|
|
4
|
+
// import DSCardV3CO from '../../ds-card-v3/DSCardV3CO';
|
|
5
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
6
|
+
import DSMenuItemsCO from '../../ds-menu-item/DSMenuItemsCO';
|
|
7
|
+
import { tabStops } from '../../helpers';
|
|
8
|
+
|
|
9
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
10
|
+
// Uncomment after CardV3 is completely released
|
|
11
|
+
// describe('PUI-12538 [useKeyboardNav] Card Select:: DisableRoving true + agnostic direction', () => {
|
|
12
|
+
// before(async () => {
|
|
13
|
+
// const errorOnGo = await UseKeyboardNavCO.cardSelect.go();
|
|
14
|
+
// if (errorOnGo) throw errorOnGo;
|
|
15
|
+
// });
|
|
16
|
+
// it('01: should focus on the 4th card after 3 tab stops', async () => {
|
|
17
|
+
// await tabStops(3);
|
|
18
|
+
// const card4 = await DSCardV3CO.getActionAreaByIndex(3);
|
|
19
|
+
// await expect(card4).toBeFocused();
|
|
20
|
+
// });
|
|
21
|
+
// it('02: should focus on the 2nd card after moving up with ArrowUp', async () => {
|
|
22
|
+
// await browser.keys(Key.ArrowUp);
|
|
23
|
+
// const card2 = await DSCardV3CO.getActionAreaByIndex(1);
|
|
24
|
+
// await expect(card2).toBeFocused();
|
|
25
|
+
// });
|
|
26
|
+
// it('03: should focus on the 1st card after moving up with ArrowLeft', async () => {
|
|
27
|
+
// await browser.keys(Key.ArrowLeft);
|
|
28
|
+
// const card1 = await DSCardV3CO.getActionAreaByIndex(0);
|
|
29
|
+
// await expect(card1).toBeFocused();
|
|
30
|
+
// });
|
|
31
|
+
// it('04: should focus on the 2nd card after moving down with ArrowDown', async () => {
|
|
32
|
+
// await browser.keys(Key.ArrowDown);
|
|
33
|
+
// const card2 = await DSCardV3CO.getActionAreaByIndex(1);
|
|
34
|
+
// await expect(card2).toBeFocused();
|
|
35
|
+
// });
|
|
36
|
+
// it('05: should focus on the 4th card after moving down with ArrowRight', async () => {
|
|
37
|
+
// await browser.keys(Key.ArrowRight);
|
|
38
|
+
// const card4 = await DSCardV3CO.getActionAreaByIndex(3);
|
|
39
|
+
// await expect(card4).toBeFocused();
|
|
40
|
+
// });
|
|
41
|
+
// });
|
|
42
|
+
describe('PUI-12539 [useKeyboardNav] disabledRovingTab:: DisableRoving true + horizontal direction', () => {
|
|
43
|
+
before(async () => {
|
|
44
|
+
const errorOnGo = await UseKeyboardNavCO.disabledRovingTab.go();
|
|
45
|
+
if (errorOnGo) throw errorOnGo;
|
|
46
|
+
});
|
|
47
|
+
it('01: should focus on 4th item after 3 tab stops', async () => {
|
|
48
|
+
await tabStops(3);
|
|
49
|
+
const item4 = await DSButtonV3CO.getButtonByIndex(3);
|
|
50
|
+
await expect(item4).toBeFocused();
|
|
51
|
+
});
|
|
52
|
+
it('02: should not move to the previous item when using ArrowUp', async () => {
|
|
53
|
+
await browser.keys(Key.ArrowUp);
|
|
54
|
+
const item4 = await DSButtonV3CO.getButtonByIndex(3);
|
|
55
|
+
await expect(item4).toBeFocused();
|
|
56
|
+
});
|
|
57
|
+
it('03: should focus on the 2nd item after moving to the previous item using ArrowLeft', async () => {
|
|
58
|
+
await browser.keys(Key.ArrowLeft);
|
|
59
|
+
const item2 = await DSButtonV3CO.getButtonByIndex(1);
|
|
60
|
+
await expect(item2).toBeFocused();
|
|
61
|
+
});
|
|
62
|
+
it('04: should not move to the next item when using ArrowDown', async () => {
|
|
63
|
+
await browser.keys(Key.ArrowDown);
|
|
64
|
+
const item2 = await DSButtonV3CO.getButtonByIndex(1);
|
|
65
|
+
await expect(item2).toBeFocused();
|
|
66
|
+
});
|
|
67
|
+
it('05: should focus on the 4th item after moving to the next item using ArrowRight', async () => {
|
|
68
|
+
await browser.keys(Key.ArrowRight);
|
|
69
|
+
const item4 = await DSButtonV3CO.getButtonByIndex(3);
|
|
70
|
+
await expect(item4).toBeFocused();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe('PUI-12540 [useKeyboardNav] focusCriteria:: DisableRoving false + vertical direction', () => {
|
|
74
|
+
before(async () => {
|
|
75
|
+
const errorOnGo = await UseKeyboardNavCO.focusCriteria.go();
|
|
76
|
+
if (errorOnGo) throw errorOnGo;
|
|
77
|
+
});
|
|
78
|
+
it('01: should focus on the inputText after 2 tab stops', async () => {
|
|
79
|
+
await tabStops(2);
|
|
80
|
+
const inputText = await UseKeyboardNavCO.getInputText();
|
|
81
|
+
await expect(inputText).toBeFocused();
|
|
82
|
+
});
|
|
83
|
+
it('02: should focus on the first item after Shift+Tab', async () => {
|
|
84
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
85
|
+
const item1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
86
|
+
await expect(item1).toBeFocused();
|
|
87
|
+
});
|
|
88
|
+
it('03: should move to the next item when using ArrowDown', async () => {
|
|
89
|
+
await browser.keys(Key.ArrowRight);
|
|
90
|
+
const item3 = await DSButtonV3CO.getButtonByIndex(2);
|
|
91
|
+
await expect(item3).toBeFocused();
|
|
92
|
+
});
|
|
93
|
+
it('04: should not focus on the next item when using ArrowDown', async () => {
|
|
94
|
+
await browser.keys(Key.ArrowDown);
|
|
95
|
+
const item3 = await DSButtonV3CO.getButtonByIndex(2);
|
|
96
|
+
await expect(item3).toBeFocused();
|
|
97
|
+
});
|
|
98
|
+
it('05: should not focus on the prev item when using ArrowUp', async () => {
|
|
99
|
+
await browser.keys(Key.ArrowUp);
|
|
100
|
+
const item3 = await DSButtonV3CO.getButtonByIndex(2);
|
|
101
|
+
await expect(item3).toBeFocused();
|
|
102
|
+
});
|
|
103
|
+
it('06: should move to the prev item when using ArrowLeft', async () => {
|
|
104
|
+
await browser.keys(Key.ArrowLeft);
|
|
105
|
+
const item1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
106
|
+
await expect(item1).toBeFocused();
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
describe('PUI-12541 [useKeyboardNav] menuItems:: DisableRoving false + agnostic direction', () => {
|
|
110
|
+
before(async () => {
|
|
111
|
+
const errorOnGo = await UseKeyboardNavCO.menuItems.go();
|
|
112
|
+
if (errorOnGo) throw errorOnGo;
|
|
113
|
+
});
|
|
114
|
+
it('01: should focus on the inputText after 2 tab stops', async () => {
|
|
115
|
+
await tabStops(2);
|
|
116
|
+
const inputText = await UseKeyboardNavCO.getInputText();
|
|
117
|
+
await expect(inputText).toBeFocused();
|
|
118
|
+
});
|
|
119
|
+
it('02: should focus on the first item after Shift+Tab', async () => {
|
|
120
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
121
|
+
const menuItem1 = await DSMenuItemsCO.getMenuItem('1');
|
|
122
|
+
await expect(menuItem1).toBeFocused();
|
|
123
|
+
});
|
|
124
|
+
it('03: should move to the prev item when using ArrowUp', async () => {
|
|
125
|
+
await browser.keys(Key.ArrowUp);
|
|
126
|
+
const menuItem4 = await DSMenuItemsCO.getMenuItem('4');
|
|
127
|
+
await expect(menuItem4).toBeFocused();
|
|
128
|
+
});
|
|
129
|
+
it('04: should move to the prev item when using ArrowLeft', async () => {
|
|
130
|
+
await browser.keys(Key.ArrowLeft);
|
|
131
|
+
const menuItem3 = await DSMenuItemsCO.getMenuItem('3');
|
|
132
|
+
await expect(menuItem3).toBeFocused();
|
|
133
|
+
});
|
|
134
|
+
it('05: should move to the next item when using ArrowRight', async () => {
|
|
135
|
+
await browser.keys(Key.ArrowRight);
|
|
136
|
+
const menuItem4 = await DSMenuItemsCO.getMenuItem('4');
|
|
137
|
+
await expect(menuItem4).toBeFocused();
|
|
138
|
+
});
|
|
139
|
+
it('06: should move to the next item when using ArrowDown', async () => {
|
|
140
|
+
await browser.keys(Key.ArrowDown);
|
|
141
|
+
const menuItem1 = await DSMenuItemsCO.getMenuItem('1');
|
|
142
|
+
await expect(menuItem1).toBeFocused();
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable import/no-relative-packages */
|
|
2
|
+
import { PATH_E2E_USE_KEYBOARD_NAVIGATION } from '../../../environments/storybook/paths';
|
|
3
|
+
import { PageObject, Urlbuilder, getElementByIndex } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
export default class UseKeyboardNavCO extends PageObject {
|
|
6
|
+
// direction: agnostic -- disabledRoving: true -- focusCriteria: undefined
|
|
7
|
+
static cardSelect = new Urlbuilder(PATH_E2E_USE_KEYBOARD_NAVIGATION, 'card-select-test');
|
|
8
|
+
|
|
9
|
+
// direction: horizontal -- disabledRoving: true -- focusCriteria: defined
|
|
10
|
+
static disabledRovingTab = new Urlbuilder(PATH_E2E_USE_KEYBOARD_NAVIGATION, 'disable-roving-tab-index-test');
|
|
11
|
+
|
|
12
|
+
// direction: vertical -- disabledRoving: false -- focusCriteria: defined
|
|
13
|
+
static focusCriteria = new Urlbuilder(PATH_E2E_USE_KEYBOARD_NAVIGATION, 'focus-criteria-test');
|
|
14
|
+
|
|
15
|
+
// direction: agnostic -- disabledRoving: false -- focusCriteria: undefined
|
|
16
|
+
static menuItems = new Urlbuilder(PATH_E2E_USE_KEYBOARD_NAVIGATION, 'menu-items-test');
|
|
17
|
+
|
|
18
|
+
static async getBtns() {
|
|
19
|
+
return $$('[data-testid="ds-button"]');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getBtnByIndex = async (index) => getElementByIndex(this.getBtns, index);
|
|
23
|
+
|
|
24
|
+
static async getInputText() {
|
|
25
|
+
return $('[data-testid="input-text"]');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// mostly used
|
|
29
|
+
static getInfo = async () => getElementByIndex(this.getH3s, 3);
|
|
30
|
+
|
|
31
|
+
// used for first focus in story
|
|
32
|
+
static getInfo2 = async () => getElementByIndex(this.getH3s, 4);
|
|
33
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import useOnBlurOutCO from './UseOnBlurOutCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
5
|
+
import { axeCoreCheck } from '../../helpers';
|
|
6
|
+
|
|
7
|
+
if (
|
|
8
|
+
!browser.capabilities['ice:options'].isPhone &&
|
|
9
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
10
|
+
browser.capabilities.browserName !== 'Safari'
|
|
11
|
+
) {
|
|
12
|
+
describe('PUI-12892 - UseOnBlurOut, Basic -AxeCore', () => {
|
|
13
|
+
before(async () => {
|
|
14
|
+
const errorOnGo = await useOnBlurOutCO.basicTest.go();
|
|
15
|
+
if (errorOnGo) throw errorOnGo;
|
|
16
|
+
});
|
|
17
|
+
it('01: should trigger useOnBlurOut and pass axe-core scan', async () => {
|
|
18
|
+
const childButton1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
19
|
+
await childButton1.waitForDisplayed();
|
|
20
|
+
await browser.keys(Key.Tab);
|
|
21
|
+
await browser.keys(Key.Tab);
|
|
22
|
+
await browser.keys(Key.Tab);
|
|
23
|
+
const onBlurData = await useOnBlurOutCO.getOnBlurData();
|
|
24
|
+
await onBlurData.waitForDisplayed();
|
|
25
|
+
const result = await axeCoreCheck();
|
|
26
|
+
await expect(result.length).toBe(0);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import useOnBlurOutCO from './UseOnBlurOutCO';
|
|
4
|
+
import DSButtonV3CO from '../../ds-button-v3/DSButtonV3CO';
|
|
5
|
+
|
|
6
|
+
if (
|
|
7
|
+
!browser.capabilities['ice:options'].isPhone &&
|
|
8
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
9
|
+
browser.capabilities.browserName !== 'Safari'
|
|
10
|
+
) {
|
|
11
|
+
// Unskip for safari after PUI12887 is fixed
|
|
12
|
+
describe('PUI-12891 - UseOnBlurOut, Basic Mouse -Func', () => {
|
|
13
|
+
before(async () => {
|
|
14
|
+
const errorOnGo = await useOnBlurOutCO.basicTest.go();
|
|
15
|
+
if (errorOnGo) throw errorOnGo;
|
|
16
|
+
});
|
|
17
|
+
it('01: click child should not trigger useOnBlurOut', async () => {
|
|
18
|
+
const childButton1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
19
|
+
await childButton1.waitForDisplayed();
|
|
20
|
+
await childButton1.click();
|
|
21
|
+
await childButton1.click();
|
|
22
|
+
const onBlurData = await useOnBlurOutCO.getOnBlurData();
|
|
23
|
+
await expect(onBlurData).not.toBeDisplayed();
|
|
24
|
+
});
|
|
25
|
+
it('02: click different child (of same parent) should not trigger useOnBlurOut', async () => {
|
|
26
|
+
const childButton2 = await DSButtonV3CO.getButtonByIndex(1);
|
|
27
|
+
await childButton2.click();
|
|
28
|
+
const onBlurData = await useOnBlurOutCO.getOnBlurData();
|
|
29
|
+
await expect(onBlurData).not.toBeDisplayed();
|
|
30
|
+
});
|
|
31
|
+
it('03: click parent (of focused child) should trigger useOnBlurOut', async () => {
|
|
32
|
+
const childButton1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
33
|
+
await childButton1.click({ x: 120 }); // clicks outside button
|
|
34
|
+
const onBlurData = await (await useOnBlurOutCO.getOnBlurData()).getText();
|
|
35
|
+
await expect(onBlurData).toEqual('Parent 1, Child 2');
|
|
36
|
+
});
|
|
37
|
+
it('04: click different parent should trigger useOnBlurOut', async () => {
|
|
38
|
+
const childButton2 = await DSButtonV3CO.getButtonByIndex(0);
|
|
39
|
+
await childButton2.click();
|
|
40
|
+
const childButton3 = await DSButtonV3CO.getButtonByIndex(2);
|
|
41
|
+
await childButton3.click({ x: 120 }); // clicks outside button
|
|
42
|
+
const onBlurData = await (await useOnBlurOutCO.getOnBlurData()).getText();
|
|
43
|
+
await expect(onBlurData).toEqual('Parent 1, Child 1');
|
|
44
|
+
});
|
|
45
|
+
it('05: click children of different parent should trigger useOnBlurOut', async () => {
|
|
46
|
+
const childButton2 = await DSButtonV3CO.getButtonByIndex(1);
|
|
47
|
+
await childButton2.click();
|
|
48
|
+
const childButton3 = await DSButtonV3CO.getButtonByIndex(2);
|
|
49
|
+
await childButton3.click();
|
|
50
|
+
const onBlurData = await (await useOnBlurOutCO.getOnBlurData()).getText();
|
|
51
|
+
await expect(onBlurData).toEqual('Parent 1, Child 2');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe('PUI-12892 - UseOnBlurOut, Basic KB -Func', () => {
|
|
56
|
+
before(async () => {
|
|
57
|
+
const errorOnGo = await useOnBlurOutCO.basicTest.go();
|
|
58
|
+
if (errorOnGo) throw errorOnGo;
|
|
59
|
+
});
|
|
60
|
+
it('01: focusing child should not trigger useOnBlurOut', async () => {
|
|
61
|
+
const childButton1 = await DSButtonV3CO.getButtonByIndex(0);
|
|
62
|
+
await childButton1.waitForDisplayed();
|
|
63
|
+
await browser.keys(Key.Tab);
|
|
64
|
+
const onBlurData = await useOnBlurOutCO.getOnBlurData();
|
|
65
|
+
await expect(onBlurData).not.toBeDisplayed();
|
|
66
|
+
});
|
|
67
|
+
it('02: tabbing to differet child should not trigger useOnBlurOut', async () => {
|
|
68
|
+
await browser.keys(Key.Tab);
|
|
69
|
+
const onBlurData = await useOnBlurOutCO.getOnBlurData();
|
|
70
|
+
await expect(onBlurData).not.toBeDisplayed();
|
|
71
|
+
});
|
|
72
|
+
it('03: leaving parent with tab should trigger useOnBlurOut', async () => {
|
|
73
|
+
await browser.keys(Key.Tab);
|
|
74
|
+
const onBlurData = await (await useOnBlurOutCO.getOnBlurData()).getText();
|
|
75
|
+
await expect(onBlurData).toEqual('Parent 1, Child 2');
|
|
76
|
+
});
|
|
77
|
+
it('04: leaving parent with shift+tab should trigger useOnBlurOut', async () => {
|
|
78
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
79
|
+
const onBlurData = await (await useOnBlurOutCO.getOnBlurData()).getText();
|
|
80
|
+
await expect(onBlurData).toEqual('Parent 2, Child 1');
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable import/no-relative-packages */
|
|
2
|
+
import { PATH_E2E_USE_ON_BLUR_OUT } from '../../../environments/storybook/paths';
|
|
3
|
+
import { PageObject, Urlbuilder } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
export default class UseKeyboardNavCO extends PageObject {
|
|
6
|
+
static basicTest = new Urlbuilder(PATH_E2E_USE_ON_BLUR_OUT, 'basic-test');
|
|
7
|
+
|
|
8
|
+
static async getOnBlurData() {
|
|
9
|
+
return $('[data-testid="onblurdata"]');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import DSIconsCO from './DSIconsCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-8715 :: Icons, Showcase -Visual Test', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await DSIconsCO.showCaseTest.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('01: should display icons correctly', async () => {
|
|
10
|
+
await browser.eyesOpen();
|
|
11
|
+
const anyIcon = await DSIconsCO.getIconsByIndex(1);
|
|
12
|
+
await anyIcon.waitForDisplayed();
|
|
13
|
+
const snapshot = await browser.eyesCheckSnapshot(DSIconsCO.snapshotPath('icons-showcase-test'));
|
|
14
|
+
await expect(snapshot).toEqual(0);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe('PUI-4223 :: Icons, Showcase ICE -Visual Test', () => {
|
|
19
|
+
before('loading page', async () => {
|
|
20
|
+
const errorOnGo = await DSIconsCO.showCaseICETest.go();
|
|
21
|
+
if (errorOnGo) throw errorOnGo;
|
|
22
|
+
});
|
|
23
|
+
it('01: should display icons correctly', async () => {
|
|
24
|
+
await browser.eyesOpen();
|
|
25
|
+
const anyIcon = await DSIconsCO.getSVGByIndex(0);
|
|
26
|
+
await anyIcon.waitForDisplayed();
|
|
27
|
+
const snapshot = await browser.eyesCheckSnapshot(DSIconsCO.snapshotPath('icons-showcase-test'));
|
|
28
|
+
await expect(snapshot).toEqual(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe('01: PUI-6400 :: Icons, Showcase Products -Visual Test', () => {
|
|
33
|
+
before('loading page', async () => {
|
|
34
|
+
const errorOnGo = await DSIconsCO.showCaseProductsTest.go();
|
|
35
|
+
if (errorOnGo) throw errorOnGo;
|
|
36
|
+
});
|
|
37
|
+
it('should display icons correctly', async () => {
|
|
38
|
+
await browser.eyesOpen();
|
|
39
|
+
const anyIcon = await DSIconsCO.getIconsByIndex(1);
|
|
40
|
+
await anyIcon.waitForDisplayed();
|
|
41
|
+
const snapshot = await browser.eyesCheckSnapshot(DSIconsCO.snapshotPath('icons-showcase-test'));
|
|
42
|
+
await expect(snapshot).toEqual(0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable import/no-relative-packages */
|
|
2
|
+
import { PATH_E2E_ICONS } from '../../environments/storybook/paths';
|
|
3
|
+
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
|
+
|
|
5
|
+
export default class DSIconsCO extends PageObject {
|
|
6
|
+
// URL's
|
|
7
|
+
static showCaseTest = new Urlbuilder(PATH_E2E_ICONS, 'show-case-test');
|
|
8
|
+
|
|
9
|
+
static showCaseICETest = new Urlbuilder(PATH_E2E_ICONS, 'show-case-ice-test');
|
|
10
|
+
|
|
11
|
+
static showCaseProductsTest = new Urlbuilder(PATH_E2E_ICONS, 'show-case-products-test');
|
|
12
|
+
|
|
13
|
+
// Get's
|
|
14
|
+
static async getIconsByIndex(index = 0) {
|
|
15
|
+
return $$(`[data-testid="ds-icon-root"]`)[index];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static async getSVGByIndex(index = 0) {
|
|
19
|
+
return $$(`[data-testid="ds-icon-svg"]`)[index];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Snapshots
|
|
23
|
+
static snapshotPath(example = 'basic') {
|
|
24
|
+
return PageObject.getSnapshotPathBuilder('Icons', example);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getUrl(component = 'basic') {
|
|
28
|
+
return PageObject.getUrl(PATH_E2E_ICONS, component);
|
|
29
|
+
}
|
|
30
|
+
}
|
package/ds-image/DSImageCO.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IMAGE_DATA_TESTID } from '@elliemae/ds-legacy-image';
|
|
2
1
|
import { PATH_E2E_IMAGE } from '../../environments/storybook/paths';
|
|
3
2
|
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
3
|
|
|
4
|
+
// Literal on purpose: importing the package runtime here loads its CJS graph inside the wdio (node) process.
|
|
5
|
+
const IMAGE_DATA_TESTID = { ROOT: 'ds-image-wrapper' };
|
|
6
|
+
|
|
5
7
|
export default class DSImage extends PageObject {
|
|
6
8
|
static basic = new Urlbuilder(PATH_E2E_IMAGE, 'basic');
|
|
7
9
|
|