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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable wdio/no-pause */
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
import DSMenuItems from '../DSMenuItemsCO';
|
|
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-14414 - [MenuItems] applyAriaDisabled prop - axe-core test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSMenuItems.applyAriaDisabled.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should display single menu items with aria-disabled focused and pass axecore test', async () => {
|
|
17
|
+
const menuItem2 = await DSMenuItems.getMenuItem('2');
|
|
18
|
+
await menuItem2.click();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
it('02: should display action menu items with aria-disabled focused and pass axecore test', async () => {
|
|
23
|
+
const menuItem6 = await DSMenuItems.getMenuItem('6');
|
|
24
|
+
await menuItem6.click();
|
|
25
|
+
const result = await axeCoreCheck();
|
|
26
|
+
expect(result.length).toBe(0);
|
|
27
|
+
});
|
|
28
|
+
it('03: should display multi menu items with aria-disabled focused and pass axecore test', async () => {
|
|
29
|
+
const menuItem10 = await DSMenuItems.getMenuItem('10');
|
|
30
|
+
await menuItem10.click();
|
|
31
|
+
const result = await axeCoreCheck();
|
|
32
|
+
expect(result.length).toBe(0);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSMenuItems from '../DSMenuItemsCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-14413 - [MenuItems] applyAriaDisabled prop - visual Test', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSMenuItems.applyAriaDisabled.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: aria-disabled single menu item should be focused and not selected - mouse', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
const menuItem2 = await DSMenuItems.getMenuItem('2');
|
|
13
|
+
await menuItem2.click();
|
|
14
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
15
|
+
DSMenuItems.snapshotPath('ds-menu-items-single-aria-disabled-mouse'),
|
|
16
|
+
);
|
|
17
|
+
await expect(snapshot).toEqual(0);
|
|
18
|
+
});
|
|
19
|
+
it('02: aria-disabled single menu item should be focused and not selected', async () => {
|
|
20
|
+
await browser.eyesOpen();
|
|
21
|
+
await browser.keys(Key.ArrowDown);
|
|
22
|
+
await browser.keys(Key.ArrowDown);
|
|
23
|
+
await browser.keys(Key.Space);
|
|
24
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
25
|
+
DSMenuItems.snapshotPath('ds-menu-items-single-aria-disabled-kb-nav'),
|
|
26
|
+
);
|
|
27
|
+
await expect(snapshot).toEqual(0);
|
|
28
|
+
});
|
|
29
|
+
it('03: aria-disabled action menu item should be focused and not selected - mouse', async () => {
|
|
30
|
+
await browser.eyesOpen();
|
|
31
|
+
const menuItem6 = await DSMenuItems.getMenuItem('6');
|
|
32
|
+
await menuItem6.click();
|
|
33
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
34
|
+
DSMenuItems.snapshotPath('ds-menu-items-action-aria-disabled-mouse'),
|
|
35
|
+
);
|
|
36
|
+
await expect(snapshot).toEqual(0);
|
|
37
|
+
});
|
|
38
|
+
it('04: aria-disabled action menu item should be focused and not selected', async () => {
|
|
39
|
+
await browser.eyesOpen();
|
|
40
|
+
await browser.keys(Key.Tab);
|
|
41
|
+
await browser.keys(Key.Tab);
|
|
42
|
+
await browser.keys(Key.Enter);
|
|
43
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
44
|
+
DSMenuItems.snapshotPath('ds-menu-items-action-aria-disabled-kb-nav'),
|
|
45
|
+
);
|
|
46
|
+
await expect(snapshot).toEqual(0);
|
|
47
|
+
});
|
|
48
|
+
it('05: aria-disabled multi menu item should be focused and not selected - mouse', async () => {
|
|
49
|
+
await browser.eyesOpen();
|
|
50
|
+
const menuItem10 = await DSMenuItems.getMenuItem('10');
|
|
51
|
+
await menuItem10.click();
|
|
52
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
53
|
+
DSMenuItems.snapshotPath('ds-menu-items-multi-aria-disabled-mouse'),
|
|
54
|
+
);
|
|
55
|
+
await expect(snapshot).toEqual(0);
|
|
56
|
+
});
|
|
57
|
+
it('06: aria-disabled multi menu item should be focused and not selected', async () => {
|
|
58
|
+
await browser.eyesOpen();
|
|
59
|
+
await browser.keys(Key.Tab);
|
|
60
|
+
await browser.keys(Key.Tab);
|
|
61
|
+
await browser.keys(Key.Enter);
|
|
62
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
63
|
+
DSMenuItems.snapshotPath('ds-menu-items-multi-aria-disabled-kb-nav'),
|
|
64
|
+
);
|
|
65
|
+
await expect(snapshot).toEqual(0);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable wdio/no-pause */
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
import DSMenuItems from '../DSMenuItemsCO';
|
|
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-15352 - [MenuItems] readOnly prop - axe-core test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSMenuItems.readOnly.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should display single menu items with readOnly focused and pass axecore test', async () => {
|
|
17
|
+
const menuItem2 = await DSMenuItems.getMenuItem('2');
|
|
18
|
+
await menuItem2.click();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
it('02: should display action menu items with readOnly focused and pass axecore test', async () => {
|
|
23
|
+
const menuItem6 = await DSMenuItems.getMenuItem('6');
|
|
24
|
+
await menuItem6.click();
|
|
25
|
+
const result = await axeCoreCheck();
|
|
26
|
+
expect(result.length).toBe(0);
|
|
27
|
+
});
|
|
28
|
+
it('03: should display multi menu items with readOnly focused and pass axecore test', async () => {
|
|
29
|
+
const menuItem10 = await DSMenuItems.getMenuItem('10');
|
|
30
|
+
await menuItem10.click();
|
|
31
|
+
const result = await axeCoreCheck();
|
|
32
|
+
expect(result.length).toBe(0);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSMenuItems from '../DSMenuItemsCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-15353 - [MenuItems] applyAriaDisabled prop - visual Test', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSMenuItems.readOnly.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: read-only single menu item should be focused and not selected - mouse', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
const menuItem2 = await DSMenuItems.getMenuItem('2');
|
|
13
|
+
await menuItem2.click();
|
|
14
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
15
|
+
DSMenuItems.snapshotPath('ds-menu-items-single-read-only-mouse'),
|
|
16
|
+
);
|
|
17
|
+
await expect(snapshot).toEqual(0);
|
|
18
|
+
});
|
|
19
|
+
it('02: read-only single menu item should be focused and not selected', async () => {
|
|
20
|
+
await browser.eyesOpen();
|
|
21
|
+
await browser.keys(Key.ArrowDown);
|
|
22
|
+
await browser.keys(Key.ArrowDown);
|
|
23
|
+
await browser.keys(Key.Space);
|
|
24
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
25
|
+
DSMenuItems.snapshotPath('ds-menu-items-single-read-only-kb-nav'),
|
|
26
|
+
);
|
|
27
|
+
await expect(snapshot).toEqual(0);
|
|
28
|
+
});
|
|
29
|
+
it('03: read-only action menu item should be focused and not selected - mouse', async () => {
|
|
30
|
+
await browser.eyesOpen();
|
|
31
|
+
const menuItem6 = await DSMenuItems.getMenuItem('6');
|
|
32
|
+
await menuItem6.click();
|
|
33
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
34
|
+
DSMenuItems.snapshotPath('ds-menu-items-action-read-only-mouse'),
|
|
35
|
+
);
|
|
36
|
+
await expect(snapshot).toEqual(0);
|
|
37
|
+
});
|
|
38
|
+
it('04: read-only action menu item should be focused and not selected', async () => {
|
|
39
|
+
await browser.eyesOpen();
|
|
40
|
+
await browser.keys(Key.Tab);
|
|
41
|
+
await browser.keys(Key.Tab);
|
|
42
|
+
await browser.keys(Key.Space);
|
|
43
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
44
|
+
DSMenuItems.snapshotPath('ds-menu-items-action-read-only-kb-nav'),
|
|
45
|
+
);
|
|
46
|
+
await expect(snapshot).toEqual(0);
|
|
47
|
+
});
|
|
48
|
+
it('05: read-only multi menu item should be focused and not selected - mouse', async () => {
|
|
49
|
+
await browser.eyesOpen();
|
|
50
|
+
const menuItem10 = await DSMenuItems.getMenuItem('10');
|
|
51
|
+
await menuItem10.click();
|
|
52
|
+
const snapshot = await browser.eyesCheckSnapshot(DSMenuItems.snapshotPath('ds-menu-items-multi-read-only-mouse'));
|
|
53
|
+
await expect(snapshot).toEqual(0);
|
|
54
|
+
});
|
|
55
|
+
it('06: read-only multi menu item should be focused and not selected', async () => {
|
|
56
|
+
await browser.eyesOpen();
|
|
57
|
+
await browser.keys(Key.Tab);
|
|
58
|
+
await browser.keys(Key.Tab);
|
|
59
|
+
await browser.keys(Key.Enter);
|
|
60
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
61
|
+
DSMenuItems.snapshotPath('ds-menu-items-multi-read-only-kb-nav'),
|
|
62
|
+
);
|
|
63
|
+
await expect(snapshot).toEqual(0);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -119,7 +119,7 @@ export default class DSQueryBuilderCO extends PageObject {
|
|
|
119
119
|
static async getTextBox(tbNumber) {
|
|
120
120
|
return browser.waitUntil(
|
|
121
121
|
async () => {
|
|
122
|
-
const tb = await $$('[data-testid="ds-
|
|
122
|
+
const tb = await $$('[data-testid="ds-inputtext-input"]');
|
|
123
123
|
return tb.length > tbNumber ? tb[tbNumber] : false;
|
|
124
124
|
},
|
|
125
125
|
{
|
|
@@ -70,11 +70,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
70
70
|
it('01: should not move the item when the disabled move action button is clicked', async () => {
|
|
71
71
|
const testItem = await DSShuttleV2CO.getItemWrapper(1);
|
|
72
72
|
const testItemMoveBtn = await DSShuttleV2CO.getActionButtonByItemAndIndex(testItem, 1);
|
|
73
|
-
const testItemMoveBtnDisabled = await testItemMoveBtn.getAttribute('aria-disabled');
|
|
74
73
|
const testItemText = await testItem.getText();
|
|
75
74
|
await testItemMoveBtn.click();
|
|
76
75
|
await expect(testItemText).toBe('Source 0.1');
|
|
77
|
-
|
|
76
|
+
// PUI-17909: a natively disabled DSButton emits the native `disabled` attribute and
|
|
77
|
+
// intentionally omits aria-disabled (that is reserved for applyAriaDisabled). Assert the
|
|
78
|
+
// native disabled state instead of the now-absent aria-disabled.
|
|
79
|
+
await expect(testItemMoveBtn).toBeDisabled();
|
|
78
80
|
});
|
|
79
81
|
it('02: should not display the BAB when a disabled item is clicked', async () => {
|
|
80
82
|
const testItem = await DSShuttleV2CO.getItemWrapper(1);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import DSSystemCO from './DSSystemCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-12550 [DSSystem] Html Elements - visual', () => {
|
|
5
|
+
before(async () => {
|
|
6
|
+
const errorOnGo = await DSSystemCO.htmlElements.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('01: should display stlyling of html elements correctly', async () => {
|
|
10
|
+
// This test also verifies the functionality of the `innerRef` prop.
|
|
11
|
+
// It confirms that the `innerRef` prop is correctly implemented by
|
|
12
|
+
// capturing and asserting the message "The Div element is successfully referenced."
|
|
13
|
+
const div = await DSSystemCO.getDiv();
|
|
14
|
+
await div.waitForDisplayed();
|
|
15
|
+
const snapshot = await browser.checkSnapshot(DSSystemCO.snapshotPath('html-elements-innerRef'));
|
|
16
|
+
await expect(snapshot).toEqual(0);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PATH_E2E_SYSTEM } from '../../environments/storybook/paths';
|
|
2
|
+
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
+
|
|
4
|
+
export default class DSSystemCO extends PageObject {
|
|
5
|
+
static htmlElements = new Urlbuilder(PATH_E2E_SYSTEM, 'html-elements-test');
|
|
6
|
+
|
|
7
|
+
static async getDiv() {
|
|
8
|
+
return $('//div[@data-testid="custom-data-testid"]');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Snapshots
|
|
12
|
+
static snapshotPath(example = 'basic') {
|
|
13
|
+
return PageObject.getSnapshotPathBuilder('System', example, 'ds-system');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -6,17 +6,17 @@ import DSTypographyCO from './DSTypographyCO';
|
|
|
6
6
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
7
7
|
describe('PUI-11020 - Typography, tabStop for link/btn -Func', () => {
|
|
8
8
|
before('loading page', async () => {
|
|
9
|
-
const errorOnGo = await DSTypographyCO.
|
|
9
|
+
const errorOnGo = await DSTypographyCO.interactiveURL.go();
|
|
10
10
|
if (errorOnGo) throw errorOnGo;
|
|
11
11
|
});
|
|
12
|
-
it('should tab to first Button typography', async () => {
|
|
12
|
+
it('01: should tab to first Button typography', async () => {
|
|
13
13
|
await browser.keys(Key.Tab);
|
|
14
|
-
const buttonTypo = await DSTypographyCO.
|
|
14
|
+
const buttonTypo = await DSTypographyCO.getTypographyByVariant('button');
|
|
15
15
|
await expect(buttonTypo).toBeFocused();
|
|
16
16
|
});
|
|
17
|
-
it('should tab to first LINK typography', async () => {
|
|
17
|
+
it('02: should tab to first LINK typography', async () => {
|
|
18
18
|
await browser.keys(Key.Tab);
|
|
19
|
-
const linkTypo = await DSTypographyCO.
|
|
19
|
+
const linkTypo = await DSTypographyCO.getTypographyByVariant('a');
|
|
20
20
|
await expect(linkTypo).toBeFocused();
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -2,31 +2,38 @@
|
|
|
2
2
|
import { mouseOver } from '../helpers';
|
|
3
3
|
import DSTypographyCO from './DSTypographyCO';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-8687 - Typography, card', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSTypographyCO.cardURL.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('should display typography on a card', async () => {
|
|
12
|
+
const typography = await DSTypographyCO.getTypographys();
|
|
13
|
+
const snapshot = await browser.checkSnapshot(DSTypographyCO.snapshotPath('typography-card'));
|
|
14
|
+
await expect(snapshot).toEqual(0);
|
|
15
|
+
});
|
|
16
|
+
it('should display title hovered', async () => {
|
|
17
|
+
const hoverableTypography = await DSTypographyCO.getTypographyByText('Jessica Smith');
|
|
18
|
+
await hoverableTypography.scrollIntoView();
|
|
19
|
+
await mouseOver(hoverableTypography, 60, 10);
|
|
20
|
+
const snapshot = await browser.checkSnapshot(DSTypographyCO.snapshotPath('typography-card-hovered-sc'));
|
|
21
|
+
await expect(snapshot).toEqual(0);
|
|
22
|
+
});
|
|
14
23
|
});
|
|
15
|
-
});
|
|
16
24
|
|
|
17
|
-
describe('PUI-8688 - Typography, within form', () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
describe('PUI-8688 - Typography, within form', () => {
|
|
26
|
+
before('loading page', async () => {
|
|
27
|
+
const errorOnGo = await DSTypographyCO.formURl.go();
|
|
28
|
+
if (errorOnGo) throw errorOnGo;
|
|
29
|
+
});
|
|
30
|
+
it('should display typography on a form', async () => {
|
|
31
|
+
const typography = await DSTypographyCO.getTypographys();
|
|
32
|
+
const snapshot = await browser.checkSnapshot(DSTypographyCO.snapshotPath('typography-form'));
|
|
33
|
+
await expect(snapshot).toEqual(0);
|
|
34
|
+
});
|
|
26
35
|
});
|
|
27
|
-
});
|
|
28
36
|
|
|
29
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
30
37
|
describe('PUI-8689 - Typography, within a dialog', () => {
|
|
31
38
|
before('loading page', async () => {
|
|
32
39
|
const errorOnGo = await DSTypographyCO.dialogURL.go();
|
|
@@ -39,34 +46,29 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
39
46
|
await expect(snapshot).toEqual(0);
|
|
40
47
|
});
|
|
41
48
|
});
|
|
42
|
-
}
|
|
43
49
|
|
|
44
|
-
describe('PUI-8690 - Typography, showcase', () => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const hoverableTypography = await DSTypographyCO.getTypographyByIndex(6);
|
|
56
|
-
await mouseOver(hoverableTypography);
|
|
57
|
-
const snapshot = await browser.checkSnapshot(DSTypographyCO.snapshotPath('typography-hovered-sc'));
|
|
58
|
-
await expect(snapshot).toEqual(0);
|
|
50
|
+
describe('PUI-8690 - Typography, showcase', () => {
|
|
51
|
+
before('loading page', async () => {
|
|
52
|
+
const errorOnGo = await DSTypographyCO.showcaseURL.go();
|
|
53
|
+
if (errorOnGo) throw errorOnGo;
|
|
54
|
+
});
|
|
55
|
+
it('should display typography showcase', async () => {
|
|
56
|
+
await browser.eyesOpen();
|
|
57
|
+
const typography = await DSTypographyCO.getTypographys();
|
|
58
|
+
const snapshot = await browser.eyesCheckSnapshot(DSTypographyCO.snapshotPath('typography-showcase'));
|
|
59
|
+
await expect(snapshot).toEqual(0);
|
|
60
|
+
});
|
|
59
61
|
});
|
|
60
|
-
});
|
|
61
62
|
|
|
62
|
-
describe('PUI-10576 - Typography, wrapping rule prop', () => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
describe('PUI-10576 - Typography, wrapping rule prop', () => {
|
|
64
|
+
before('loading page', async () => {
|
|
65
|
+
const errorOnGo = await DSTypographyCO.truncationURL.go();
|
|
66
|
+
if (errorOnGo) throw errorOnGo;
|
|
67
|
+
});
|
|
68
|
+
it('01: should display typography showcase', async () => {
|
|
69
|
+
const typography = await DSTypographyCO.getTypographys();
|
|
70
|
+
const snapshot = await browser.checkSnapshot(DSTypographyCO.snapshotPath('typography-truncation'));
|
|
71
|
+
await expect(snapshot).toEqual(0);
|
|
72
|
+
});
|
|
71
73
|
});
|
|
72
|
-
}
|
|
74
|
+
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PATH_E2E_TYPOGRAPHY } from '../../environments/storybook/paths';
|
|
2
2
|
import { PageObject, Urlbuilder, getElementByIndex } from '../helpers';
|
|
3
3
|
|
|
4
4
|
export default class DSTypographyCO extends PageObject {
|
|
5
5
|
// Desktop
|
|
6
|
-
static cardURL = new Urlbuilder(
|
|
6
|
+
static cardURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'card');
|
|
7
7
|
|
|
8
|
-
static formURl = new Urlbuilder(
|
|
8
|
+
static formURl = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'form');
|
|
9
9
|
|
|
10
|
-
static dialogURL = new Urlbuilder(
|
|
10
|
+
static dialogURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'dialog');
|
|
11
11
|
|
|
12
|
-
static showcaseURL = new Urlbuilder(
|
|
12
|
+
static showcaseURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'show-case');
|
|
13
13
|
|
|
14
14
|
static truncationURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'truncation-test');
|
|
15
15
|
|
|
16
|
+
static interactiveURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'interactive-test');
|
|
17
|
+
|
|
18
|
+
static themeFontURL = new Urlbuilder(PATH_E2E_TYPOGRAPHY, 'theme-font-family-test');
|
|
19
|
+
|
|
16
20
|
// Snapshots
|
|
17
21
|
static snapshotPath(example = 'basic') {
|
|
18
22
|
return PageObject.getSnapshotPathBuilder('Typography', example);
|
|
@@ -26,9 +30,25 @@ export default class DSTypographyCO extends PageObject {
|
|
|
26
30
|
return $$('[data-testid="ds-typography-element"]');
|
|
27
31
|
}
|
|
28
32
|
|
|
33
|
+
static async getTypographyByVariant(variant) {
|
|
34
|
+
return $(`${variant}[data-testid="ds-typography-element"]`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static async getTypographyByText(text) {
|
|
38
|
+
return $(`[data-testid="ds-typography-element"]*=${text}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
static getTypographyByIndex = async (index) => getElementByIndex(this.getTypographys, index);
|
|
30
42
|
|
|
31
43
|
static async getOpenDialog() {
|
|
32
44
|
return $('[data-testid="open-dialog-button"]');
|
|
33
45
|
}
|
|
46
|
+
|
|
47
|
+
static async getThemedTypography() {
|
|
48
|
+
return $('[data-testid="theme-font-sentinel"] [data-testid="ds-typography-element"]');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static async getFallbackTypography() {
|
|
52
|
+
return $('[data-testid="theme-font-fallback"] [data-testid="ds-typography-element"]');
|
|
53
|
+
}
|
|
34
54
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import DSTypographyCO from '../DSTypographyCO';
|
|
2
|
+
|
|
3
|
+
// Tests the theme-driven font-family mechanism shipped under PUI-18210
|
|
4
|
+
// (ds-typography/src/parts/styled.ts + typographyFontFamily.ts read theme.fonts.default,
|
|
5
|
+
// falling back to proxima-nova). Theme-agnostic: uses a sentinel font, never the
|
|
6
|
+
// dsConsumer POC theme values, so it survives any future theme change.
|
|
7
|
+
if (
|
|
8
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
9
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
10
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
11
|
+
browser.capabilities.browserName === 'Chrome'
|
|
12
|
+
) {
|
|
13
|
+
describe('PUI-18707 - DSTypography:: theme font-family wiring - Func', () => {
|
|
14
|
+
before('loading page', async () => {
|
|
15
|
+
const errorOnGo = await DSTypographyCO.themeFontURL.go();
|
|
16
|
+
if (errorOnGo) throw errorOnGo;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('01: should read font-family from theme with proxima-nova fallback', async () => {
|
|
20
|
+
const themed = await DSTypographyCO.getThemedTypography();
|
|
21
|
+
await themed.waitForDisplayed();
|
|
22
|
+
const themedFont = (await themed.getCSSProperty('font-family')).value.toLowerCase();
|
|
23
|
+
await expect(themedFont).toContain('sentinelfont');
|
|
24
|
+
|
|
25
|
+
const fallback = await DSTypographyCO.getFallbackTypography();
|
|
26
|
+
const fallbackFont = (await fallback.getCSSProperty('font-family')).value.toLowerCase();
|
|
27
|
+
await expect(fallbackFont).toContain('proxima-nova');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|