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,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-len */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
4
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
4
5
|
import { axeCoreCheck, type } from '../../../helpers';
|
|
5
6
|
|
|
6
7
|
if (
|
|
@@ -15,13 +16,13 @@ if (
|
|
|
15
16
|
if (errorOnGo) throw errorOnGo;
|
|
16
17
|
});
|
|
17
18
|
it('01: should pass axe-core scan without violations', async () => {
|
|
18
|
-
const input = await
|
|
19
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
19
20
|
await input.waitForDisplayed();
|
|
20
21
|
const result = await axeCoreCheck();
|
|
21
22
|
expect(result.length).toBe(0);
|
|
22
23
|
});
|
|
23
24
|
it('02: should pass axe-core scan without violations after type', async () => {
|
|
24
|
-
const input = await
|
|
25
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
25
26
|
await input.waitForDisplayed();
|
|
26
27
|
await browser.keys(Key.Tab);
|
|
27
28
|
await browser.keys(Key.Tab);
|
|
@@ -32,7 +33,7 @@ if (
|
|
|
32
33
|
expect(result.length).toBe(0);
|
|
33
34
|
});
|
|
34
35
|
it('03: should pass axe-core scan without violations after select an option', async () => {
|
|
35
|
-
const input = await
|
|
36
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
36
37
|
await input.waitForDisplayed();
|
|
37
38
|
await browser.keys(Key.Tab);
|
|
38
39
|
await browser.keys(Key.Tab);
|
|
@@ -40,9 +41,7 @@ if (
|
|
|
40
41
|
const menuList = await DSControlledInputGroupCO.getAutocompleteMenuList();
|
|
41
42
|
await menuList.waitForDisplayed();
|
|
42
43
|
await browser.keys(Key.Enter);
|
|
43
|
-
const inputValue = await
|
|
44
|
-
'Luke Skywalker too long this text is super long',
|
|
45
|
-
);
|
|
44
|
+
const inputValue = await DSInputTextCO.getInputValue('Luke Skywalker too long this text is super long');
|
|
46
45
|
await inputValue.waitForDisplayed();
|
|
47
46
|
const result = await axeCoreCheck();
|
|
48
47
|
expect(result.length).toBe(0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-len */
|
|
2
2
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
import { axeCoreCheck } from '../../../helpers';
|
|
4
5
|
|
|
5
6
|
if (
|
|
@@ -14,13 +15,13 @@ if (
|
|
|
14
15
|
if (errorOnGo) throw errorOnGo;
|
|
15
16
|
});
|
|
16
17
|
it('01: should pass axe-core scan without violations', async () => {
|
|
17
|
-
const input = await
|
|
18
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
19
|
await input.waitForDisplayed();
|
|
19
20
|
const result = await axeCoreCheck();
|
|
20
21
|
expect(result.length).toBe(0);
|
|
21
22
|
});
|
|
22
23
|
it('02: should pass axe-core scan without violations after type', async () => {
|
|
23
|
-
const input = await
|
|
24
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
24
25
|
await input.setValue('Test');
|
|
25
26
|
const result = await axeCoreCheck();
|
|
26
27
|
expect(result.length).toBe(0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
2
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
2
3
|
import { mouseOver } from '../../../helpers';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
@@ -9,7 +10,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
});
|
|
10
11
|
it('should display the basic group inputs correctly - hover addon', async () => {
|
|
11
12
|
await browser.eyesOpen();
|
|
12
|
-
const input = await
|
|
13
|
+
const input = await DSInputTextCO.getInputTextByIndex(1);
|
|
13
14
|
const addon = await DSControlledInputGroupCO.getButtonByIndex(2);
|
|
14
15
|
await input.click();
|
|
15
16
|
await mouseOver(addon);
|
|
@@ -20,7 +21,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
20
21
|
});
|
|
21
22
|
it('should display the basic group inputs correctly - hover input', async () => {
|
|
22
23
|
await browser.eyesOpen();
|
|
23
|
-
const input = await
|
|
24
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
24
25
|
const addon = await DSControlledInputGroupCO.getButtonByIndex(1);
|
|
25
26
|
await addon.click();
|
|
26
27
|
await mouseOver(input);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-len */
|
|
2
2
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
import { axeCoreCheck } from '../../../helpers';
|
|
4
5
|
|
|
5
6
|
if (
|
|
@@ -14,7 +15,7 @@ if (
|
|
|
14
15
|
if (errorOnGo) throw errorOnGo;
|
|
15
16
|
});
|
|
16
17
|
it('01: should pass axe-core scan without violations', async () => {
|
|
17
|
-
const input = await
|
|
18
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
19
|
await input.waitForDisplayed();
|
|
19
20
|
const result = await axeCoreCheck();
|
|
20
21
|
expect(result.length).toBe(0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
2
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
2
3
|
|
|
3
4
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
5
|
describe('PUI-8336 - DSControlledInputGroupCO - Disable input addon -func ', () => {
|
|
@@ -7,13 +8,13 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
7
8
|
if (errorOnGo) throw errorOnGo;
|
|
8
9
|
});
|
|
9
10
|
it('should display the input default', async () => {
|
|
10
|
-
const input = await
|
|
11
|
+
const input = await DSInputTextCO.getInputText();
|
|
11
12
|
await expect(input).toBeClickable();
|
|
12
13
|
});
|
|
13
14
|
it('should display the input disabled after clicking the disable addon', async () => {
|
|
14
15
|
const disableAddon = await DSControlledInputGroupCO.getLeftAddOnByIndex(0);
|
|
15
16
|
await disableAddon.click();
|
|
16
|
-
const input = await
|
|
17
|
+
const input = await DSInputTextCO.getInputText();
|
|
17
18
|
await expect(input).toBeDisabled();
|
|
18
19
|
});
|
|
19
20
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-len */
|
|
2
2
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
import { axeCoreCheck } from '../../../helpers';
|
|
4
5
|
|
|
5
6
|
if (
|
|
@@ -14,13 +15,13 @@ if (
|
|
|
14
15
|
if (errorOnGo) throw errorOnGo;
|
|
15
16
|
});
|
|
16
17
|
it('01: should pass axe-core scan without violations', async () => {
|
|
17
|
-
const input = await
|
|
18
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
19
|
await input.waitForDisplayed();
|
|
19
20
|
const result = await axeCoreCheck();
|
|
20
21
|
expect(result.length).toBe(0);
|
|
21
22
|
});
|
|
22
23
|
it('02: should pass axe-core scan without violations after type', async () => {
|
|
23
|
-
const input = await
|
|
24
|
+
const input = await DSInputTextCO.getInputTextByIndex(0);
|
|
24
25
|
await input.setValue('Test');
|
|
25
26
|
const result = await axeCoreCheck();
|
|
26
27
|
expect(result.length).toBe(0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type } from '../../../helpers';
|
|
2
2
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-8650 - DSControlledInputGroupCO - No text value on html - Visual Test ', () => {
|
|
@@ -8,7 +9,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
10
|
});
|
|
10
11
|
it('01: should not get the text value from the html', async () => {
|
|
11
|
-
const input = await
|
|
12
|
+
const input = await DSInputTextCO.getInputText();
|
|
12
13
|
await input.click();
|
|
13
14
|
await type('Obi Juan Quenovi');
|
|
14
15
|
const try1 = await input.getText();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type } from '../../../helpers';
|
|
2
2
|
import DSControlledInputGroupCO from '../DSControlledInputGroupCO';
|
|
3
|
+
import DSInputTextCO from '../../ds-input-text/DSInputTextCO';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-8335 - DSControlledInputGroupCO - Addons - Visual Test ', () => {
|
|
@@ -8,7 +9,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
10
|
});
|
|
10
11
|
it('01: should display the protected group input populated', async () => {
|
|
11
|
-
const input = await
|
|
12
|
+
const input = await DSInputTextCO.getInputText();
|
|
12
13
|
await input.click();
|
|
13
14
|
await type('Obi Juan Quenovi');
|
|
14
15
|
const snapshot = await browser.checkSnapshot(DSControlledInputGroupCO.snapshotPath('protectedinput-populated'));
|
|
@@ -27,7 +27,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
27
27
|
it('04: should type the input correctly', async () => {
|
|
28
28
|
const input = await DSInputTextCO.getInputText();
|
|
29
29
|
await type('1t2e3s5t');
|
|
30
|
-
await expect(input).
|
|
30
|
+
await expect(input).toHaveValue(expect.stringContaining('1t2e3s5t'));
|
|
31
31
|
});
|
|
32
32
|
it('05: should focus the clear btn correctly', async () => {
|
|
33
33
|
const clearBtn = await DSInputTextCO.getClearBtn();
|
|
@@ -39,7 +39,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
39
39
|
const clearBtn = await DSInputTextCO.getClearBtn();
|
|
40
40
|
const input = await DSInputTextCO.getInputText();
|
|
41
41
|
await expect(clearBtn).not.toBeDisplayed();
|
|
42
|
-
await expect(input).
|
|
42
|
+
await expect(input).toHaveValue(expect.stringContaining(''));
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
/* eslint-disable max-lines */
|
|
2
3
|
import { Key } from 'webdriverio';
|
|
3
4
|
import { type } from '../../helpers';
|
|
@@ -9,14 +10,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
9
10
|
const errorOnGo = await DSInputTextCO.clearable.go();
|
|
10
11
|
if (errorOnGo) throw errorOnGo;
|
|
11
12
|
});
|
|
12
|
-
it('should write some text on the input and change the input value', async () => {
|
|
13
|
+
it('01: should write some text on the input and change the input value', async () => {
|
|
13
14
|
const input = await DSInputTextCO.getInputText();
|
|
14
15
|
await input.click();
|
|
15
16
|
await type('Hola');
|
|
16
17
|
const inputValue = await input.getAttribute('value');
|
|
17
18
|
await expect(inputValue).toEqual('Hola');
|
|
18
19
|
});
|
|
19
|
-
it('should erase the content from within the input and have an empty value for the input', async () => {
|
|
20
|
+
it('02: should erase the content from within the input and have an empty value for the input', async () => {
|
|
20
21
|
const input = await DSInputTextCO.getInputText();
|
|
21
22
|
await input.click();
|
|
22
23
|
await browser.keys(Key.Backspace);
|
|
@@ -33,44 +34,45 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
33
34
|
const errorOnGo = await DSInputTextCO.autocompleteURL.go();
|
|
34
35
|
if (errorOnGo) throw errorOnGo;
|
|
35
36
|
});
|
|
36
|
-
it('should not open the autocomplete list if there are no characters even with focus', async () => {
|
|
37
|
+
it('01: should not open the autocomplete list if there are no characters even with focus', async () => {
|
|
37
38
|
const input = await DSInputTextCO.getInputText();
|
|
38
39
|
await input.click();
|
|
39
40
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
40
41
|
await expect(autocompleteList).not.toBeDisplayedInViewport();
|
|
41
42
|
});
|
|
42
|
-
it('should display autocomplete list after getting one character in the input', async () => {
|
|
43
|
+
it('02: should display autocomplete list after getting one character in the input', async () => {
|
|
43
44
|
await type('4');
|
|
44
45
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
45
46
|
await expect(autocompleteList).toBeDisplayedInViewport();
|
|
46
47
|
});
|
|
47
|
-
it('should not close the autocomplete list after getting more characters', async () => {
|
|
48
|
+
it('03: should not close the autocomplete list after getting more characters', async () => {
|
|
48
49
|
await type('4');
|
|
49
50
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
50
51
|
await expect(autocompleteList).toBeDisplayedInViewport();
|
|
51
52
|
});
|
|
52
|
-
it('should close the autocomplete list after getting more characters which dont match any option', async () => {
|
|
53
|
+
it('04: should close the autocomplete list after getting more characters which dont match any option', async () => {
|
|
53
54
|
await type('Z');
|
|
54
55
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
55
56
|
await expect(autocompleteList).not.toBeDisplayedInViewport();
|
|
56
57
|
});
|
|
57
|
-
it('should display autocomplete options after erasing the character which caused a mismatch', async () => {
|
|
58
|
+
it('05: should display autocomplete options after erasing the character which caused a mismatch', async () => {
|
|
58
59
|
await browser.keys(Key.Backspace);
|
|
59
60
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
60
61
|
await expect(autocompleteList).toBeDisplayedInViewport();
|
|
61
62
|
});
|
|
62
|
-
it('should not close the autocomplete list after deleting a character if there are characters left', async () => {
|
|
63
|
+
it('06: should not close the autocomplete list after deleting a character if there are characters left', async () => {
|
|
63
64
|
await browser.keys(Key.Backspace);
|
|
64
65
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
65
66
|
await expect(autocompleteList).toBeDisplayedInViewport();
|
|
66
67
|
});
|
|
67
|
-
it('should close the autocomplete list after deleting a character if there are no characters left', async () => {
|
|
68
|
+
it('07: should close the autocomplete list after deleting a character if there are no characters left', async () => {
|
|
68
69
|
await browser.keys(Key.Backspace);
|
|
69
70
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
70
71
|
await expect(autocompleteList).not.toBeDisplayedInViewport();
|
|
71
72
|
});
|
|
72
|
-
it('should select the first autocomplete list item and change the value of the input', async () => {
|
|
73
|
+
it('08: should select the first autocomplete list item and change the value of the input', async () => {
|
|
73
74
|
await type('4');
|
|
75
|
+
await browser.keys(Key.ArrowDown);
|
|
74
76
|
await browser.keys(Key.Enter);
|
|
75
77
|
const input = await DSInputTextCO.getInputText();
|
|
76
78
|
const autocompleteList = await DSInputTextCO.getAutocompleteMenuList();
|
|
@@ -85,7 +87,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
85
87
|
const errorOnGo = await DSInputTextCO.autocompleteURL.go();
|
|
86
88
|
if (errorOnGo) throw errorOnGo;
|
|
87
89
|
});
|
|
88
|
-
it('should click an autocomplete option and the input should have that value', async () => {
|
|
90
|
+
it('01: should click an autocomplete option and the input should have that value', async () => {
|
|
89
91
|
const input = await DSInputTextCO.getInputText();
|
|
90
92
|
await input.click();
|
|
91
93
|
await type('44');
|
|
@@ -103,7 +105,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
103
105
|
const errorOnGo = await DSInputTextCO.clearable.go();
|
|
104
106
|
if (errorOnGo) throw errorOnGo;
|
|
105
107
|
});
|
|
106
|
-
it('should click an autocomplete option and the input should have that value', async () => {
|
|
108
|
+
it('01: should click an autocomplete option and the input should have that value', async () => {
|
|
107
109
|
const input = await DSInputTextCO.getInputText();
|
|
108
110
|
await input.click();
|
|
109
111
|
await type('Hola');
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-relative-packages
|
|
2
|
+
import { DSInputTextDataTestIds } from '@elliemae/ds-legacy-form-input-text';
|
|
2
3
|
import { PATH_E2E_CONTROLLEDINPUT } from '../../../environments/storybook/paths';
|
|
3
4
|
import { PageObject, Urlbuilder, getElementByIndex } from '../../helpers';
|
|
4
5
|
|
|
5
|
-
export default class
|
|
6
|
+
export default class DSInputTextCO extends PageObject {
|
|
6
7
|
static clearable = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'clearable-E-2-e');
|
|
7
8
|
|
|
8
9
|
static formLayoutBlockURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'with-form-layout-block-item');
|
|
9
10
|
|
|
10
11
|
static stylesURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'default-styles');
|
|
11
12
|
|
|
13
|
+
static slotsURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'slots-test');
|
|
14
|
+
|
|
12
15
|
static disabledURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'disabled-test');
|
|
13
16
|
|
|
14
17
|
static sizesURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'sizes-E-2-e');
|
|
@@ -19,6 +22,14 @@ export default class DSLargeInputCO extends PageObject {
|
|
|
19
22
|
|
|
20
23
|
static autocompleteURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'with-autocomplete');
|
|
21
24
|
|
|
25
|
+
static applyAriaDisabled = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'apply-aria-disabled-test');
|
|
26
|
+
|
|
27
|
+
static placeholderURL = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'place-holder-test');
|
|
28
|
+
|
|
29
|
+
static readOnly = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'read-only-test');
|
|
30
|
+
|
|
31
|
+
static applyAriaDisabledOnChange = new Urlbuilder(PATH_E2E_CONTROLLEDINPUT, 'apply-aria-disabled-change');
|
|
32
|
+
|
|
22
33
|
static async getAutocompleteMenuList() {
|
|
23
34
|
return $('[data-testid="autocomplete-menu-list"]');
|
|
24
35
|
}
|
|
@@ -29,22 +40,34 @@ export default class DSLargeInputCO extends PageObject {
|
|
|
29
40
|
|
|
30
41
|
static getAutocompleteOptionByIndex = async (index) => getElementByIndex(this.getAutocompleteOptions, index);
|
|
31
42
|
|
|
32
|
-
static async getInputTexContainer() {
|
|
33
|
-
return $('//input[@data-testid="ds-input-text"]/ancestor::div');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
43
|
static async getInputText() {
|
|
37
|
-
return $(
|
|
44
|
+
return $(`[data-testid="${DSInputTextDataTestIds.INPUT}"]`);
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
static async getInputTexts() {
|
|
41
|
-
return $$(
|
|
48
|
+
return $$(`[data-testid="${DSInputTextDataTestIds.INPUT}"]`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static async getInputValue(value) {
|
|
52
|
+
return $(`[data-testid="${DSInputTextDataTestIds.INPUT}"][value="${value}"]`);
|
|
42
53
|
}
|
|
43
54
|
|
|
44
55
|
static getInputTextByIndex = async (index) => getElementByIndex(this.getInputTexts, index);
|
|
45
56
|
|
|
46
57
|
static async getClearBtn() {
|
|
47
|
-
return $(
|
|
58
|
+
return $(`[data-testid="${DSInputTextDataTestIds.CLEAR_BUTTON}"]`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static async getInputSlotByIndex(index = 0) {
|
|
62
|
+
return $$(`[data-dimsum-slot="dsInputtextInput"]`)[index];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static async getRootSlotByIndex(index = 0) {
|
|
66
|
+
return $$(`[data-dimsum-slot="dsInputtextRoot"]`)[index];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static async getClearBtnSlotByIndex(index = 0) {
|
|
70
|
+
return $$(`[data-dimsum-slot="dsButtonRoot"]`)[index];
|
|
48
71
|
}
|
|
49
72
|
|
|
50
73
|
static snapshotPath(example = 'basic') {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { axeCoreCheck } from '../../../helpers';
|
|
3
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
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-14407 - [InputText] applyAriaDisabled prop - axe-core test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSInputTextCO.applyAriaDisabled.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: first aria-disabled Input should be focused and pass axe-core scan', async () => {
|
|
17
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
|
+
await input1.click();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
3
|
+
import { type } 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-15257 - [InputText] applyAriaDisabled prop - func test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSInputTextCO.applyAriaDisabled.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: first aria-disabled Input should not display the caret', async () => {
|
|
17
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
|
+
await input1.click();
|
|
19
|
+
const caretColor = await input1.getCSSProperty('caret-color');
|
|
20
|
+
const caretValue = caretColor.value;
|
|
21
|
+
await expect(caretValue).toBe('rgba(0,0,0,0)');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
describe('PUI-15686 - [InputText] applyAriaDisabled - onChange - func test', () => {
|
|
25
|
+
before('loading page', async () => {
|
|
26
|
+
const errorOnGo = await DSInputTextCO.applyAriaDisabledOnChange.go();
|
|
27
|
+
if (errorOnGo) throw errorOnGo;
|
|
28
|
+
});
|
|
29
|
+
it('01: first aria-disabled Input should not allow to type', async () => {
|
|
30
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(0);
|
|
31
|
+
await input1.click();
|
|
32
|
+
await type('This is a test');
|
|
33
|
+
await expect(input1).toHaveValue('');
|
|
34
|
+
});
|
|
35
|
+
it('02: second aria-disabled Input should not change the value', async () => {
|
|
36
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(1);
|
|
37
|
+
await input1.click();
|
|
38
|
+
await type('This is a test');
|
|
39
|
+
await expect(input1).toHaveValue('Some Value');
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
package/ds-controlled-form/ds-input-text/aria-disabled/DSInputText.aria-disabled.visual.spec.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
/* eslint-disable prettier/prettier */
|
|
3
|
+
import { Key } from 'webdriverio';
|
|
4
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
5
|
+
import { type } from '../../../helpers';
|
|
6
|
+
|
|
7
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-14406 - [InputText] applyAriaDisabled prop - visual Test', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSInputTextCO.applyAriaDisabled.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
it('01: first aria-disabled Input should be focused', async () => {
|
|
14
|
+
await browser.eyesOpen();
|
|
15
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
16
|
+
await firstInput.click();
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-aria-disabled-mouse'));
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
it('02: second aria-disabled InputText should be focused and value not changed', async () => {
|
|
21
|
+
await browser.eyesOpen();
|
|
22
|
+
await browser.keys(Key.Tab);
|
|
23
|
+
await type('Test');
|
|
24
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-aria-disabled-kb-nav'));
|
|
25
|
+
await expect(snapshot).toEqual(0);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-14538 - [InputText] placeholder prop - visual Test', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await DSInputTextCO.placeholderURL.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('01: should display a showcase of InputText component with the prop placeholder', async () => {
|
|
10
|
+
await browser.eyesOpen();
|
|
11
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-placeholder'));
|
|
12
|
+
await expect(snapshot).toEqual(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
package/ds-controlled-form/ds-input-text/read-only/DSInputText.read-only.axe-core.func.spec.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { axeCoreCheck } from '../../../helpers';
|
|
3
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
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-15331 - [InputText] readOnly prop - axe-core test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSInputTextCO.readOnly.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: first readOnly Input should be focused and pass axe-core scan', async () => {
|
|
17
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(0);
|
|
18
|
+
await input1.click();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-15332 - [InputText] readOnly prop - func test', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSInputTextCO.readOnly.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: first readOnly Input should not display the caret', async () => {
|
|
16
|
+
const input1 = await DSInputTextCO.getInputTextByIndex(0);
|
|
17
|
+
await input1.click();
|
|
18
|
+
const caretColor = await input1.getCSSProperty('caret-color');
|
|
19
|
+
const caretValue = caretColor.value;
|
|
20
|
+
await expect(caretValue).toBe('rgba(0,0,0,0)');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
/* eslint-disable prettier/prettier */
|
|
3
|
+
import { Key } from 'webdriverio';
|
|
4
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
5
|
+
import { type } from '../../../helpers';
|
|
6
|
+
|
|
7
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-15330 - [InputText] readOnly prop - visual Test', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSInputTextCO.readOnly.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
it('01: first read-only Input should be focused', async () => {
|
|
14
|
+
await browser.eyesOpen();
|
|
15
|
+
const firstInput = await DSInputTextCO.getInputTextByIndex(0);
|
|
16
|
+
await firstInput.click();
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-read-only-mouse'));
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
it('02: second read-only InputText should be focused and value not changed', async () => {
|
|
21
|
+
await browser.eyesOpen();
|
|
22
|
+
await browser.keys(Key.Tab);
|
|
23
|
+
await type('Test');
|
|
24
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-read-only-kb-nav'));
|
|
25
|
+
await expect(snapshot).toEqual(0);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { axeCoreCheck } from '../../../helpers';
|
|
3
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
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-15312 - DSControlledInputText: Slots -AxeCore', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSInputTextCO.slotsURL.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should have customized slots input text and pass axe-core scan', async () => {
|
|
17
|
+
const input1 = await DSInputTextCO.getRootSlotByIndex();
|
|
18
|
+
await input1.waitForDisplayed();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
expect(result.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable max-lines */
|
|
3
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
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-15318 - DSControlledInputText - Slots: Basic Func', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSInputTextCO.slotsURL.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should have input text slots with custom aria-attributes', async () => {
|
|
17
|
+
const root = await DSInputTextCO.getRootSlotByIndex();
|
|
18
|
+
const input = await DSInputTextCO.getInputSlotByIndex();
|
|
19
|
+
const clearable = await DSInputTextCO.getClearBtnSlotByIndex();
|
|
20
|
+
await root.waitForDisplayed();
|
|
21
|
+
await expect(root).toHaveAttribute('aria-label', 'im input wrapper aria');
|
|
22
|
+
await expect(input).toHaveAttribute('aria-label', 'im input aria');
|
|
23
|
+
await expect(clearable).toHaveAttribute('aria-label', 'im clear button aria');
|
|
24
|
+
});
|
|
25
|
+
it('02: should have input text slots with custom data-attributes', async () => {
|
|
26
|
+
const root = await DSInputTextCO.getRootSlotByIndex();
|
|
27
|
+
const input = await DSInputTextCO.getInputSlotByIndex();
|
|
28
|
+
const clearable = await DSInputTextCO.getClearBtnSlotByIndex();
|
|
29
|
+
await root.waitForDisplayed();
|
|
30
|
+
await expect(root).toHaveAttribute('data-testid', 'im input wrapper data');
|
|
31
|
+
await expect(input).toHaveAttribute('data-testid', 'im input data');
|
|
32
|
+
await expect(clearable).toHaveAttribute('data-testid', 'im clear button data');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
/* eslint-disable prettier/prettier */
|
|
3
|
+
import DSInputTextCO from '../DSInputTextCO';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-15317 - DSControlledInputText: Slots - Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSInputTextCO.slotsURL.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('01: should display customized inputs (one clearable) matching baseline', async () => {
|
|
12
|
+
await browser.eyesOpen();
|
|
13
|
+
const input = await DSInputTextCO.getRootSlotByIndex();
|
|
14
|
+
await input.waitForDisplayed();
|
|
15
|
+
const snapshot = await browser.eyesCheckSnapshot(DSInputTextCO.snapshotPath('input-text-slots'));
|
|
16
|
+
await expect(snapshot).toEqual(0);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|