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
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { Key } from 'webdriverio';
|
|
2
|
-
import DSButtonV2CO from './DSButtonV2CO';
|
|
3
|
-
import { mouseOver, type } from '../helpers';
|
|
4
|
-
|
|
5
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
-
describe('PUI-9507 - ButtonV2 - React events', () => {
|
|
7
|
-
before('loading page', async () => {
|
|
8
|
-
const errorOnGo = await DSButtonV2CO.callbacks.go();
|
|
9
|
-
if (errorOnGo) throw errorOnGo;
|
|
10
|
-
});
|
|
11
|
-
it('01: should perform mouseOver action and increase the counter by one', async () => {
|
|
12
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
13
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
14
|
-
await mouseOver(button);
|
|
15
|
-
const testData = await (await DSButtonV2CO.getTestData(5)).getText();
|
|
16
|
-
await expect(testData).toEqual('MouseOver counter 1');
|
|
17
|
-
});
|
|
18
|
-
it('02: should perform click action and increase the counter by one (also focus counter)', async () => {
|
|
19
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
20
|
-
await button.click();
|
|
21
|
-
if (browser.capabilities.browserName === 'Safari') {
|
|
22
|
-
// Safaris doesn't mantain focus on click
|
|
23
|
-
await browser.keys([Key.Shift, Key.Tab]); // Focus with keyboard to match other browsers
|
|
24
|
-
}
|
|
25
|
-
const testData = await (await DSButtonV2CO.getTestData(2)).getText();
|
|
26
|
-
await expect(testData).toEqual('Click counter 1');
|
|
27
|
-
const testData2 = await (await DSButtonV2CO.getTestData(3)).getText();
|
|
28
|
-
await expect(testData2).toEqual('Focus counter 1');
|
|
29
|
-
});
|
|
30
|
-
// eslint-disable-next-line max-len
|
|
31
|
-
it('03: should perform keyDown action (enter and space) and increase the counter by two (also click counter)', async () => {
|
|
32
|
-
await browser.keys(Key.Return);
|
|
33
|
-
await browser.keys(Key.Space);
|
|
34
|
-
const testData = await (await DSButtonV2CO.getTestData(1)).getText();
|
|
35
|
-
await expect(testData).toEqual('KeyDown counter 2');
|
|
36
|
-
const testData2 = await (await DSButtonV2CO.getTestData(2)).getText();
|
|
37
|
-
await expect(testData2).toEqual('Click counter 3');
|
|
38
|
-
});
|
|
39
|
-
// eslint-disable-next-line max-len
|
|
40
|
-
it('04: should perform keyDown action (NOT enter and space) and increase the counter by one (NOT click counter)', async () => {
|
|
41
|
-
await type('j');
|
|
42
|
-
const testData = await (await DSButtonV2CO.getTestData(1)).getText();
|
|
43
|
-
await expect(testData).toEqual('KeyDown counter 3');
|
|
44
|
-
const testData2 = await (await DSButtonV2CO.getTestData(2)).getText();
|
|
45
|
-
await expect(testData2).toEqual('Click counter 3');
|
|
46
|
-
});
|
|
47
|
-
it('05: should perform blur action and increase the counter by one', async () => {
|
|
48
|
-
const textUsedToBlur = await DSButtonV2CO.getTestData(1);
|
|
49
|
-
await textUsedToBlur.click();
|
|
50
|
-
const testData = await (await DSButtonV2CO.getTestData(4)).getText();
|
|
51
|
-
await expect(testData).toEqual('Blur counter 1');
|
|
52
|
-
});
|
|
53
|
-
it('06: should focus with keyboard and check all the counters', async () => {
|
|
54
|
-
await browser.keys([Key.Shift, Key.Tab]);
|
|
55
|
-
const testData1 = await (await DSButtonV2CO.getTestData(1)).getText();
|
|
56
|
-
const testData2 = await (await DSButtonV2CO.getTestData(2)).getText();
|
|
57
|
-
const testData3 = await (await DSButtonV2CO.getTestData(3)).getText();
|
|
58
|
-
const testData4 = await (await DSButtonV2CO.getTestData(4)).getText();
|
|
59
|
-
const testData5 = await (await DSButtonV2CO.getTestData(5)).getText();
|
|
60
|
-
await expect(testData1).toEqual('KeyDown counter 3');
|
|
61
|
-
await expect(testData2).toEqual('Click counter 3');
|
|
62
|
-
await expect(testData3).toEqual('Focus counter 2');
|
|
63
|
-
await expect(testData4).toEqual('Blur counter 1');
|
|
64
|
-
await expect(testData5).toEqual('MouseOver counter 1');
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
describe('PUI-9508 - ButtonV2 - Toggle, pressed attribute', () => {
|
|
69
|
-
before('loading page', async () => {
|
|
70
|
-
const errorOnGo = await DSButtonV2CO.asToggle.go();
|
|
71
|
-
if (errorOnGo) throw errorOnGo;
|
|
72
|
-
});
|
|
73
|
-
it('01: should press the button as a toggle and have its aria-attribute as true', async () => {
|
|
74
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
75
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
76
|
-
await button.click();
|
|
77
|
-
const isPressed = await button.getAttribute('aria-pressed');
|
|
78
|
-
await expect(isPressed).toEqual('true');
|
|
79
|
-
});
|
|
80
|
-
it('02: should press again the button as a toggle and have its aria-attribute as false', async () => {
|
|
81
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
82
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
83
|
-
await button.click();
|
|
84
|
-
const isPressed = await button.getAttribute('aria-pressed');
|
|
85
|
-
await expect(isPressed).toEqual('false');
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
describe('PUI-9641 - ButtonV2 - Tooltip enabled/disabled, mouse/keyboard', () => {
|
|
90
|
-
before('loading page', async () => {
|
|
91
|
-
const errorOnGo = await DSButtonV2CO.tooltip.go();
|
|
92
|
-
if (errorOnGo) throw errorOnGo;
|
|
93
|
-
});
|
|
94
|
-
it('01: should hover enabled button and display tooltip', async () => {
|
|
95
|
-
const button = await DSButtonV2CO.getButtonByIndex(1);
|
|
96
|
-
await mouseOver(button);
|
|
97
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
98
|
-
await expect(tooltip).toBeDisplayedInViewport();
|
|
99
|
-
});
|
|
100
|
-
it('02: should hover disabled button and display tooltip', async () => {
|
|
101
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
102
|
-
await mouseOver(button);
|
|
103
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
104
|
-
await expect(tooltip).toBeDisplayedInViewport();
|
|
105
|
-
});
|
|
106
|
-
it('03: should not display tooltip when not hovering the button', async () => {
|
|
107
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
108
|
-
await mouseOver(button, 200, 200);
|
|
109
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
110
|
-
await expect(tooltip).not.toBeDisplayedInViewport();
|
|
111
|
-
});
|
|
112
|
-
it('04: should focus with tab enabled button and display tooltip', async () => {
|
|
113
|
-
await browser.keys(Key.Tab);
|
|
114
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
115
|
-
await expect(tooltip).toBeDisplayedInViewport();
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
describe('PUI-9642 - ButtonV2 - Button, onClick close popups even when disabled', () => {
|
|
120
|
-
before('loading page', async () => {
|
|
121
|
-
const errorOnGo = await DSButtonV2CO.disabledTest.go();
|
|
122
|
-
if (errorOnGo) throw errorOnGo;
|
|
123
|
-
});
|
|
124
|
-
it('01: should expand popup (cant be closed with click at the disabled generic button)', async () => {
|
|
125
|
-
const appPickerTrigger = await DSButtonV2CO.getToolbarItemByIndex(0);
|
|
126
|
-
await appPickerTrigger.waitForDisplayed({ timeout: 5000 });
|
|
127
|
-
await appPickerTrigger.click();
|
|
128
|
-
const appPicker = await $$('[data-testid="app-picker__wrapper"]');
|
|
129
|
-
await expect(appPicker).toBeDisplayedInViewport();
|
|
130
|
-
});
|
|
131
|
-
it('02: should close the popup when clicking the disabled ds-button-v2', async () => {
|
|
132
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
133
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
134
|
-
await button.click();
|
|
135
|
-
const appPicker = await $$('[data-testid="app-picker__wrapper"]');
|
|
136
|
-
await expect(appPicker).not.toBeDisplayedInViewport();
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { Key } from 'webdriverio';
|
|
2
|
-
import DSButtonV2CO from './DSButtonV2CO';
|
|
3
|
-
import { mouseOver } from '../helpers';
|
|
4
|
-
|
|
5
|
-
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
-
describe('PUI-7782 - ButtonV2 - Interaction States showcase', () => {
|
|
7
|
-
before('loading page', async () => {
|
|
8
|
-
const errorOnGo = await DSButtonV2CO.interactionStates.go();
|
|
9
|
-
if (errorOnGo) throw errorOnGo;
|
|
10
|
-
});
|
|
11
|
-
it('should display button showcase correctly', async () => {
|
|
12
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
13
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
14
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-interaction-states'));
|
|
15
|
-
await expect(snapshot).toEqual(0);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
describe('PUI-9509 - ButtonV2 - Toggle + Real interaction states', () => {
|
|
20
|
-
before('loading page', async () => {
|
|
21
|
-
const errorOnGo = await DSButtonV2CO.asToggle.go();
|
|
22
|
-
if (errorOnGo) throw errorOnGo;
|
|
23
|
-
});
|
|
24
|
-
it('should display the button as a toggle with default state', async () => {
|
|
25
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
26
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
27
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-toggle-default'));
|
|
28
|
-
await expect(snapshot).toEqual(0);
|
|
29
|
-
});
|
|
30
|
-
it('should display the button as a toggle with focus state and pressed', async () => {
|
|
31
|
-
await browser.keys(Key.Tab);
|
|
32
|
-
await browser.keys(Key.Enter);
|
|
33
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-toggle-focus'));
|
|
34
|
-
await expect(snapshot).toEqual(0);
|
|
35
|
-
});
|
|
36
|
-
it('should display the button as a toggle with focus + hover state', async () => {
|
|
37
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
38
|
-
await mouseOver(button);
|
|
39
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-toggle-focusandhover'));
|
|
40
|
-
await expect(snapshot).toEqual(0);
|
|
41
|
-
});
|
|
42
|
-
it('should display the button as a toggle with hover state', async () => {
|
|
43
|
-
await browser.keys(Key.Tab);
|
|
44
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
45
|
-
await mouseOver(button);
|
|
46
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-toggle-hover'));
|
|
47
|
-
await expect(snapshot).toEqual(0);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
describe('PUI-7892 - ButtonV2 - Variants showcase', () => {
|
|
52
|
-
before('loading page', async () => {
|
|
53
|
-
const errorOnGo = await DSButtonV2CO.showcaseURL.go();
|
|
54
|
-
if (errorOnGo) throw errorOnGo;
|
|
55
|
-
});
|
|
56
|
-
it('should display button showcase correctly', async () => {
|
|
57
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
58
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
59
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-showcase'));
|
|
60
|
-
await expect(snapshot).toEqual(0);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
describe('PUI-7891 - ButtonV2 - enable/disabled - should show tooltip - keyboard', () => {
|
|
65
|
-
before('loading page', async () => {
|
|
66
|
-
const errorOnGo = await DSButtonV2CO.tooltip.go();
|
|
67
|
-
if (errorOnGo) throw errorOnGo;
|
|
68
|
-
});
|
|
69
|
-
it('should display tooltip over enabled text button', async () => {
|
|
70
|
-
const button = await DSButtonV2CO.getButtonByIndex(1);
|
|
71
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
72
|
-
await browser.keys(Key.Tab);
|
|
73
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
74
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
75
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-focused-btn'));
|
|
76
|
-
await expect(snapshot).toEqual(0);
|
|
77
|
-
});
|
|
78
|
-
it('should display tooltip over enabled icon button', async () => {
|
|
79
|
-
await browser.keys(Key.Tab);
|
|
80
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
81
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
82
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-focused-icon-btn'));
|
|
83
|
-
await expect(snapshot).toEqual(0);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
describe('PUI-8371 - ButtonV2 - Sizes showcase', () => {
|
|
88
|
-
before('loading page', async () => {
|
|
89
|
-
const errorOnGo = await DSButtonV2CO.sizes.go();
|
|
90
|
-
if (errorOnGo) throw errorOnGo;
|
|
91
|
-
});
|
|
92
|
-
it('should display the buttons v2 different sizes', async () => {
|
|
93
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-sizes'));
|
|
94
|
-
await expect(snapshot).toEqual(0);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
describe('PUI-7890 - ButtonV2 - enable/disabled - should show tooltip - hover', () => {
|
|
99
|
-
before('loading page', async () => {
|
|
100
|
-
const errorOnGo = await DSButtonV2CO.tooltip.go();
|
|
101
|
-
if (errorOnGo) throw errorOnGo;
|
|
102
|
-
});
|
|
103
|
-
it('should display tooltip over enabled text button', async () => {
|
|
104
|
-
const button = await DSButtonV2CO.getButtonByIndex(1);
|
|
105
|
-
await button.waitForDisplayed({ timeout: 5000 });
|
|
106
|
-
mouseOver(button);
|
|
107
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
108
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
109
|
-
const snapshot = await browser.checkSnapshot(DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-hover-enabled-btn'));
|
|
110
|
-
await expect(snapshot).toEqual(0);
|
|
111
|
-
});
|
|
112
|
-
// known issue in Safari - react
|
|
113
|
-
// https://github.com/facebook/react/issues/4251
|
|
114
|
-
// https://github.com/facebook/react/issues/19419
|
|
115
|
-
if (browser.capabilities.browserName !== 'Safari') {
|
|
116
|
-
it('should display tooltip over disabled text button', async () => {
|
|
117
|
-
const button = await DSButtonV2CO.getButtonByIndex(0);
|
|
118
|
-
mouseOver(button);
|
|
119
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
120
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
121
|
-
const snapshot = await browser.checkSnapshot(
|
|
122
|
-
DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-hover-disabled-btn'),
|
|
123
|
-
);
|
|
124
|
-
await expect(snapshot).toEqual(0);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
it('should display tooltip over enabled icon button', async () => {
|
|
128
|
-
const button = await DSButtonV2CO.getButtonByIndex(3);
|
|
129
|
-
mouseOver(button);
|
|
130
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
131
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
132
|
-
const snapshot = await browser.checkSnapshot(
|
|
133
|
-
DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-hover-enabled-icon-btn'),
|
|
134
|
-
);
|
|
135
|
-
await expect(snapshot).toEqual(0);
|
|
136
|
-
});
|
|
137
|
-
// known issue in Safari - react
|
|
138
|
-
// https://github.com/facebook/react/issues/4251
|
|
139
|
-
// https://github.com/facebook/react/issues/19419
|
|
140
|
-
if (browser.capabilities.browserName !== 'Safari') {
|
|
141
|
-
it('should display tooltip over disabled icon button', async () => {
|
|
142
|
-
const button = await DSButtonV2CO.getButtonByIndex(2);
|
|
143
|
-
mouseOver(button);
|
|
144
|
-
const tooltip = await DSButtonV2CO.getTooltip();
|
|
145
|
-
await tooltip.waitForDisplayed({ timeout: 5000 });
|
|
146
|
-
const snapshot = await browser.checkSnapshot(
|
|
147
|
-
DSButtonV2CO.snapshotPath('ds-button-v2-tooltip-hover-disabled-icon-btn'),
|
|
148
|
-
);
|
|
149
|
-
await expect(snapshot).toEqual(0);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { PATH_E2E_BUTTON_V2 } from '../../environments/storybook/paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
export default class DSButtonV2CO extends PageObject {
|
|
4
|
-
// Atomic
|
|
5
|
-
static showcaseURL = new Urlbuilder(PATH_E2E_BUTTON_V2, 'showcase-test');
|
|
6
|
-
|
|
7
|
-
static asToggle = new Urlbuilder(PATH_E2E_BUTTON_V2, 'button-as-toggle-test');
|
|
8
|
-
|
|
9
|
-
static callbacks = new Urlbuilder(PATH_E2E_BUTTON_V2, 'callbacks-test');
|
|
10
|
-
|
|
11
|
-
static disabledTest = new Urlbuilder(PATH_E2E_BUTTON_V2, 'disabled-test');
|
|
12
|
-
|
|
13
|
-
static tooltip = new Urlbuilder(PATH_E2E_BUTTON_V2, 'button-with-tooltip-test');
|
|
14
|
-
|
|
15
|
-
static sizes = new Urlbuilder(PATH_E2E_BUTTON_V2, 'size-test');
|
|
16
|
-
|
|
17
|
-
static interactionStates = new Urlbuilder(PATH_E2E_BUTTON_V2, 'interaction-states-showcase-test');
|
|
18
|
-
|
|
19
|
-
// Snapshot
|
|
20
|
-
static snapshotPath(example = 'basic') {
|
|
21
|
-
return PageObject.getSnapshotPathBuilder('ButtonV2', example);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// selectors
|
|
25
|
-
static async getButtonByIndex(index) {
|
|
26
|
-
return $$('[data-testid="ds-button"]')[index];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static async getToolbarItemByIndex(index) {
|
|
30
|
-
return $$('[data-testid="gh-toolbar-item"]')[index];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static async getTooltip() {
|
|
34
|
-
return $('[data-testid="ds-tooltip-v3-tooltip-text-wrapper"]');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static async getTestData(index) {
|
|
38
|
-
return $(`[data-testid="test-data-${index}"]`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// actions
|
|
42
|
-
// utils
|
|
43
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
|
-
/* eslint-disable wdio/no-pause */
|
|
3
|
-
import { Key } from 'webdriverio';
|
|
4
|
-
import DSControlledCheckboxCO from './DSControlledCheckboxCO';
|
|
5
|
-
|
|
6
|
-
if (
|
|
7
|
-
!browser.capabilities['ice:options'].isPhone &&
|
|
8
|
-
!browser.capabilities['ice:options'].isTablet &&
|
|
9
|
-
browser.capabilities.browserName !== 'Firefox'
|
|
10
|
-
) {
|
|
11
|
-
describe('PUI-7099 - DSControlledCheckbox:: checked and unchecked states', () => {
|
|
12
|
-
before('loading page', async () => {
|
|
13
|
-
const errorOnGo = await DSControlledCheckboxCO.basicURL.go();
|
|
14
|
-
if (errorOnGo) throw errorOnGo;
|
|
15
|
-
});
|
|
16
|
-
it('should uncheck the checkbox on click', async () => {
|
|
17
|
-
const checkbox = await DSControlledCheckboxCO.getCustomCheckbox();
|
|
18
|
-
await checkbox.waitForExist({ timeout: 120000 });
|
|
19
|
-
await checkbox.click();
|
|
20
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
21
|
-
await expect(checkedCheckbox).toBe(false);
|
|
22
|
-
});
|
|
23
|
-
it('should check checkbox clicking label', async () => {
|
|
24
|
-
const label = await DSControlledCheckboxCO.getCheckboxLabel();
|
|
25
|
-
const checkbox = await DSControlledCheckboxCO.getCustomCheckbox();
|
|
26
|
-
await label.click();
|
|
27
|
-
await browser.pause(1000);
|
|
28
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
29
|
-
await expect(checkedCheckbox).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it('should uncheck checkbox by clicking label', async () => {
|
|
32
|
-
const label = await DSControlledCheckboxCO.getCheckboxLabel();
|
|
33
|
-
const checkbox = await DSControlledCheckboxCO.getCustomCheckbox();
|
|
34
|
-
await label.click();
|
|
35
|
-
await browser.pause(1000);
|
|
36
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
37
|
-
await expect(checkedCheckbox).toBe(false);
|
|
38
|
-
});
|
|
39
|
-
it('should check checkbox clicking checkbox', async () => {
|
|
40
|
-
const checkbox = await DSControlledCheckboxCO.getCustomCheckbox();
|
|
41
|
-
await checkbox.click();
|
|
42
|
-
await browser.pause(1000);
|
|
43
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
44
|
-
await expect(checkedCheckbox).toBe(true);
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
describe('PUI-8282 - DSControlledCheckbox:: mixed states', () => {
|
|
48
|
-
beforeEach('loading page', async () => {
|
|
49
|
-
const errorOnGo = await DSControlledCheckboxCO.mixed.go();
|
|
50
|
-
if (errorOnGo) throw errorOnGo;
|
|
51
|
-
});
|
|
52
|
-
it('should have custom data-testid for group container', async () => {
|
|
53
|
-
const checkboxGroup = await DSControlledCheckboxCO.getCheckboxGroup();
|
|
54
|
-
await expect(checkboxGroup).toBeDisplayed();
|
|
55
|
-
});
|
|
56
|
-
it('should check all the checkboxes when checking the global one', async () => {
|
|
57
|
-
const globalCheckbox = await DSControlledCheckboxCO.getCheckboxByIndex(0);
|
|
58
|
-
await globalCheckbox.click();
|
|
59
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(globalCheckbox);
|
|
60
|
-
const checkbox2 = await DSControlledCheckboxCO.getCheckboxByIndex(1);
|
|
61
|
-
const checkedCheckbox2 = await DSControlledCheckboxCO.isChecked(checkbox2);
|
|
62
|
-
const checkbox3 = await DSControlledCheckboxCO.getCheckboxByIndex(2);
|
|
63
|
-
const checkedCheckbox3 = await DSControlledCheckboxCO.isChecked(checkbox3);
|
|
64
|
-
await expect(checkedCheckbox).toBe(true);
|
|
65
|
-
await expect(checkedCheckbox2).toBe(true);
|
|
66
|
-
await expect(checkedCheckbox3).toBe(true);
|
|
67
|
-
});
|
|
68
|
-
it('should uncheck all the checkboxes when unchecking the global one', async () => {
|
|
69
|
-
const globalCheckbox = await DSControlledCheckboxCO.getCheckboxByIndex(0);
|
|
70
|
-
await globalCheckbox.click();
|
|
71
|
-
await globalCheckbox.click();
|
|
72
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(globalCheckbox);
|
|
73
|
-
const checkbox2 = await DSControlledCheckboxCO.getCheckboxByIndex(1);
|
|
74
|
-
const checkedCheckbox2 = await DSControlledCheckboxCO.isChecked(checkbox2);
|
|
75
|
-
const checkbox3 = await DSControlledCheckboxCO.getCheckboxByIndex(2);
|
|
76
|
-
const checkedCheckbox3 = await DSControlledCheckboxCO.isChecked(checkbox3);
|
|
77
|
-
await expect(checkedCheckbox).toBe(false);
|
|
78
|
-
await expect(checkedCheckbox2).toBe(false);
|
|
79
|
-
await expect(checkedCheckbox3).toBe(false);
|
|
80
|
-
});
|
|
81
|
-
it('should check the global checkbox when checking all the others', async () => {
|
|
82
|
-
const checkbox = await DSControlledCheckboxCO.getCheckboxByIndex(2);
|
|
83
|
-
await checkbox.click();
|
|
84
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
85
|
-
await expect(checkedCheckbox).toBe(true);
|
|
86
|
-
});
|
|
87
|
-
it('should uncheck the global checkbox when unchecking all the others', async () => {
|
|
88
|
-
const checkbox = await DSControlledCheckboxCO.getCheckboxByIndex(1);
|
|
89
|
-
await checkbox.click();
|
|
90
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(checkbox);
|
|
91
|
-
await expect(checkedCheckbox).toBe(false);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe('PUI-8649 - DSControlledCheckbox:: Keyboard behavior global checkbox', () => {
|
|
95
|
-
before('loading page', async () => {
|
|
96
|
-
const errorOnGo = await DSControlledCheckboxCO.mixed.go();
|
|
97
|
-
if (errorOnGo) throw errorOnGo;
|
|
98
|
-
});
|
|
99
|
-
it('should check all the checkboxes when checking the global one', async () => {
|
|
100
|
-
await browser.keys(Key.Tab);
|
|
101
|
-
await browser.keys(Key.Space);
|
|
102
|
-
const globalCheckbox = await DSControlledCheckboxCO.getCheckboxByIndex(0);
|
|
103
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(globalCheckbox);
|
|
104
|
-
const checkbox2 = await DSControlledCheckboxCO.getCheckboxByIndex(1);
|
|
105
|
-
const checkedCheckbox2 = await DSControlledCheckboxCO.isChecked(checkbox2);
|
|
106
|
-
const checkbox3 = await DSControlledCheckboxCO.getCheckboxByIndex(2);
|
|
107
|
-
const checkedCheckbox3 = await DSControlledCheckboxCO.isChecked(checkbox3);
|
|
108
|
-
await expect(checkedCheckbox).toBe(true);
|
|
109
|
-
await expect(checkedCheckbox2).toBe(true);
|
|
110
|
-
await expect(checkedCheckbox3).toBe(true);
|
|
111
|
-
});
|
|
112
|
-
it('should uncheck all the checkboxes when unchecking the global one', async () => {
|
|
113
|
-
await browser.keys(Key.Space);
|
|
114
|
-
const globalCheckbox = await DSControlledCheckboxCO.getCheckboxByIndex(0);
|
|
115
|
-
const checkedCheckbox = await DSControlledCheckboxCO.isChecked(globalCheckbox);
|
|
116
|
-
const checkbox2 = await DSControlledCheckboxCO.getCheckboxByIndex(1);
|
|
117
|
-
const checkedCheckbox2 = await DSControlledCheckboxCO.isChecked(checkbox2);
|
|
118
|
-
const checkbox3 = await DSControlledCheckboxCO.getCheckboxByIndex(2);
|
|
119
|
-
const checkedCheckbox3 = await DSControlledCheckboxCO.isChecked(checkbox3);
|
|
120
|
-
await expect(checkedCheckbox).toBe(false);
|
|
121
|
-
await expect(checkedCheckbox2).toBe(false);
|
|
122
|
-
await expect(checkedCheckbox3).toBe(false);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import DSIndeterminateProgressIndicatorCO from './DSIndeterminateProgressIndicatorCO';
|
|
2
|
-
|
|
3
|
-
if (!browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-11864 - IndeterminateProgressIndicator - dynamic title', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSIndeterminateProgressIndicatorCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('01: should display a diferent title after 3 seconds', async () => {
|
|
10
|
-
const title = await DSIndeterminateProgressIndicatorCO.getIndeterminateProgressIndicatorTitle();
|
|
11
|
-
await title.waitForDisplayed();
|
|
12
|
-
// eslint-disable-next-line wdio/no-pause
|
|
13
|
-
await browser.pause(3000);
|
|
14
|
-
await expect(title).toHaveTextContaining('Title changed');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
/package/ds-typography/{DSTypography.resize.visual.spec.js → DSTypography.resize.skipped.js}
RENAMED
|
File without changes
|