dimsum-e2e-tests 3.53.0-alpha.1 → 3.53.0-alpha.3
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 +8 -0
- package/ds-accordion/DSAccordionCO.js +15 -11
- 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.func.spec.js +12 -0
- package/ds-accordion/wrapLabel/DSAccordion.wrap-label.visual.spec.js +20 -0
- package/ds-autocomplete/DSAutocompleteCO.js +18 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.axe-core.func.spec.js +20 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.func.spec.js +45 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.visual.spec.js +21 -0
- package/ds-banner/DSBanner.func.spec.js +4 -60
- package/ds-banner/DSBanner.text-resize.visual.spec.js +15 -0
- package/ds-banner/DSBanner.text-wrapping.visual.spec.js +31 -0
- package/ds-banner/DSBanner.visual.spec.js +0 -29
- package/ds-banner/DSBannerCO.js +24 -2
- package/ds-banner/aria-and-role/DSBanner.aria-and-role.func.spec.js +63 -0
- package/ds-banner/slots/DSBanner.slots.func.spec.js +65 -0
- package/ds-banner/slots/DSBanner.slots.visual.spec.js +17 -0
- package/ds-breadcrumb/DSBreadcrumb.func.spec.js +5 -3
- package/ds-button-v3/DSButtonV3.type-submit.func.spec.js +28 -0
- package/ds-button-v3/DSButtonV3.visual.spec.js +7 -2
- package/ds-button-v3/DSButtonV3CO.js +2 -0
- package/ds-card-navigation/CardNavigationCO.js +56 -0
- package/ds-card-navigation/DSCardNavigation.func.spec.js +50 -1
- package/ds-card-navigation/DSCardNavigation.slots.func.spec.js +127 -0
- package/ds-card-navigation/DSCardNavigation.slots.visual.spec.js +26 -0
- package/ds-card-navigation/DSCardNavigation.visual.spec.js +16 -0
- package/ds-card-v3/DSCardV3CO.js +20 -0
- package/ds-card-v3/drag-n-drop/DSCardV3.DnD.visual.spec.js +1 -1
- package/ds-card-v3/slots/DSCardV3.slots.axe-core.spec.js +22 -0
- package/ds-card-v3/slots/DSCardV3.slots.func.spec.js +36 -0
- package/ds-card-v3/slots/DSCardV3.slots.visual.spec.js +18 -0
- package/ds-chat/DSChat.func.spec.js +3 -2
- package/ds-chat/DSChat.visual.spec.js +3 -2
- package/ds-chat/DSChatCO.js +0 -8
- package/ds-chat/floatingbutton/DSChat-floating-button.visual.spec.js +1 -1
- package/ds-chip/DSChipCO.js +24 -0
- package/ds-chip/slots/DSChip.slots.axe-core.spec.js +17 -0
- package/ds-chip/slots/DSChip.slots.func.spec.js +39 -0
- package/ds-chip/slots/DSChip.slots.visual.spec.js +17 -0
- package/ds-circular-indeterminate-indicator/DSCircularIndicator.visual.spec.js +2 -1
- package/ds-controlled-form/ds-combobox/creatable/DSCombobox.creatable.visual.spec.js +6 -4
- package/ds-controlled-form/ds-controlled-large-input-text/DSLargeInputTextCO.js +5 -0
- package/ds-controlled-form/ds-controlled-large-input-text/aria-disabled/DSLargeInputText.aria-disabled.func.spec.js +19 -0
- package/ds-controlled-form/ds-controlled-radio-group/DSControlledRadioGroup.axe-core.func.spec.js +31 -0
- package/ds-controlled-form/react-hook-form/ReactHook.visual.spec.js +1 -0
- package/ds-data-table-async/DSDataTableCO.js +173 -108
- package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +1 -45
- package/ds-data-table-async/components/FilterBarCO.js +8 -0
- package/ds-data-table-async/components/FiltersCO.js +12 -0
- package/ds-data-table-async/components/HeaderCO.js +5 -0
- package/ds-data-table-async/components/PaginationNavCO.js +1 -1
- package/ds-data-table-async/date-filters/DSDataTable.date-switcher.single.func.spec.js +1 -1
- package/ds-data-table-async/date-filters/DSDataTable.date-switcher.visual.spec.js +18 -8
- package/ds-data-table-async/dnd/DSDataTable.dnd.visual.spec.js +3 -1
- package/ds-data-table-async/dnd/DSDataTable.dnd_fixed-width.visual.spec.js +33 -0
- package/ds-data-table-async/empty-state/DSDataTable.empty-state.visual.spec.js +13 -0
- package/ds-data-table-async/filters/DSDataTable.filters-creatable.func.spec.js +5 -5
- package/ds-data-table-async/filters/DSDataTable.filters-creatable.visual.spec.js +1 -0
- package/ds-data-table-async/filters/DSDataTable.filters.visual.spec.js +18 -1
- package/ds-data-table-async/filters/DSDataTable.free-text-search.keyboard.func.spec.js +242 -0
- package/ds-data-table-async/filters/DSDataTable.free-text-search.visual.spec.js +54 -0
- package/ds-data-table-async/filters/DSDataTable.text-filters.func.spec.js +3 -3
- package/ds-data-table-async/menubutton/DSDataTable.MenuButton.keyboard.func.spec.js +56 -0
- package/ds-data-table-async/menubutton/DSDataTable.MenuButton.mouse.func.spec.js +55 -0
- package/ds-data-table-async/menubutton/DSDataTable.MenuButton.visual.spec.js +27 -0
- package/ds-data-table-async/more/DSDataTable.headers.visual.spec.js +0 -63
- package/ds-data-table-async/select/DSDataTable.select.func.spec.js +1 -1
- package/ds-data-table-async/slots/DSDataTable.slots.func.spec.js +40 -0
- package/ds-data-table-async/slots/DSDataTable.slots.visual.spec.js +19 -0
- package/ds-data-table-async/sorting/DSDataTable.sorting.visual.spec.js +118 -0
- package/ds-dataviz/DSDataViz.axis.visual.spec.js +2 -1
- package/ds-dataviz/DSDataViz.scroll.visual.spec.js +1 -0
- package/ds-dataviz/DSDataViz.ticks.visual.spec.js +2 -1
- package/ds-dialog/DSDialog.cases.visual.spec.js +3 -4
- package/ds-dialog/DSDialog.visual.spec.js +7 -14
- package/ds-dialog/DSDialogCO.js +5 -13
- package/ds-dialog/axe-core/DSDialog.error.axe-core.func.spec.js +24 -0
- package/ds-dialog/axe-core/DSDialog.info.axe-core.func.spec.js +24 -0
- package/ds-dialog/axe-core/DSDialog.scroll-body.axe-core.func.spec.js +24 -0
- package/ds-dialog/axe-core/DSDialog.success.axe-core.func.spec.js +24 -0
- package/ds-dialog/axe-core/DSDialog.warning.axe-core.spec.func.js +24 -0
- package/ds-dropdownmenu-v2/DSDDMenuV2.visual.spec.js +5 -5
- package/ds-form-combobox-multi/DSComboboxMultiCO.js +96 -1
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +7 -3
- package/ds-form-combobox-multi/disabled/DSComboboxMulti.disabled.mouse.func.spec.js +25 -0
- package/ds-form-combobox-multi/menu-position/DSComboboxMulti.menu-position.visual.spec.js +42 -0
- package/ds-form-combobox-multi/slots/DSComboboxMulti.slots.func.spec.js +100 -0
- package/ds-form-combobox-multi/slots/DSComboboxMulti.slots.visual.spec.js +51 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +97 -1
- package/ds-form-combobox-single/disabled/DSComboboxSingle.disabled.mouse.func.spec.js +25 -0
- package/ds-form-combobox-single/menu-position/DSComboboxSingle.menu-position.visual.spec.js +93 -0
- package/ds-form-combobox-single/slots/DSComboboxSingle.slots.func.spec.js +100 -0
- package/ds-form-combobox-single/slots/DSComboboxSingle.slots.visual.spec.js +53 -0
- package/ds-form-date-range-picker/aria-disabled/DateRangePicker.applyAriaDisabled.keyboard-nav.func.spec.js +31 -5
- package/ds-form-date-time-picker/DSControlledDateTimePickerCO.js +7 -5
- package/ds-form-date-time-picker/date-input/DateInput.keyboard-nav.func.spec.js +2 -2
- package/ds-form-date-time-picker/date-time-full/DateTimeFull.applyAriaDisabled.axe-core.func.spec.js +1 -1
- package/ds-form-date-time-picker/date-time-full/DateTimeFull.axe-core.func.spec.js +25 -0
- package/ds-form-date-time-picker/date-time-full/DateTimePicker.applyAriaDisabled.keyboard-nav.func.spec.js +6 -1
- package/ds-form-date-time-picker/date-time-full/DateTimePicker.func.spec.js +32 -2
- package/ds-form-date-time-picker/date-time-full/DateTimePicker.keyboard-nav.func.spec.js +6 -1
- package/ds-form-date-time-picker/date-time-full/DateTimePicker.readOnly.keyboard-nav.func.spec.js +6 -1
- package/ds-form-date-time-picker/date-time-input/DateTimeInput.applyAriaDisabled.keyboard-nav.func.spec.js +40 -4
- package/ds-form-date-time-picker/showcase/DateTimePicker.applyAriaDisabled-showcase.visual.spec.js +2 -2
- package/ds-form-date-time-picker/showcase/DateTimePicker.readOnly-showcase.visual.spec.js +2 -2
- package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItem.axe-core.func.spec.js +4 -1
- package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +4 -0
- package/ds-form-native-select/NativeSelect.axe-core.func.spec.js +57 -0
- package/ds-form-native-select/NativeSelectCO.js +35 -0
- package/{ds-toggle → ds-form-toggle}/DSToggle.axe-core.func.spec.js +6 -2
- package/{ds-toggle → ds-form-toggle}/DSToggle.func.spec.js +13 -8
- package/{ds-toggle → ds-form-toggle}/DSToggle.visual.spec.js +2 -2
- package/{ds-toggle → ds-form-toggle}/DSToggleCO.js +1 -1
- package/ds-global-header/GlobalHeader.axe-core.func.spec.js +13 -0
- package/ds-global-header/GlobalHeaderCO.js +2 -0
- package/{ds-controlled-form → ds-hooks}/useMask/Number/UseNumberMask.func.spec.js +25 -12
- package/{ds-controlled-form → ds-hooks}/useMask/Number/UseNumberMask.visual.spec.js +4 -1
- package/{ds-controlled-form → ds-hooks}/useMask/Phone/UsePhoneMask.func.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/Phone/UsePhoneMask.visual.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/ReackHookFormWithMask/ReactHookFormWithMask.func.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/ReackHookFormWithMask/ReactHookFormWithMask.visual.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/RegExp/UseRegExpMask.func.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/SSN/UseSsnMask.func.spec.js +1 -1
- package/{ds-controlled-form → ds-hooks}/useMask/ZipCode/UseZipCodeMask.func.spec.js +1 -1
- package/ds-indeterminate-progress-indicator/DSIndetermintateProgressIndicator.axe-core.func.spec.js +31 -0
- package/ds-menu-button/DSMenuButtonCO.js +2 -0
- package/ds-menu-button/basic/DSMenuButton.basic.func.spec.js +28 -0
- package/ds-menu-button/multiselect/DSMenuButton.axe-core.multiselect.func.spec.js +6 -1
- package/ds-menu-button/singleSelect/DSMenuButton.axe-core.singleSelect.func.spec.js +6 -1
- package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +7 -2
- package/ds-menu-item/DSMenuItems.visual.spec.js +8 -32
- package/ds-mobile/MobileDatePicker/MobileDatePicker.visual.spec.js +0 -13
- package/ds-modal-slide/ModalSlideCO.js +2 -0
- package/ds-notification-badge/DSNotificationBadge.axe-core.func.spec.js +1 -1
- package/ds-pagination/DSPagination.axe-core.func.spec.js +64 -0
- package/ds-pagination/DSPaginationCO.js +12 -0
- package/ds-pills-v2/DSPills.visual.spec.js +3 -1
- package/ds-pills-v2/selection/DSPills.axe-core.func.spec.js +6 -1
- package/ds-pills-v2/selection/DSPills.func.spec.js +32 -30
- package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +31 -0
- package/ds-progress-indicator/DSProgressIndicator.func.spec.js +8 -3
- package/ds-progress-indicator/DSProgressIndicator.visual.spec.js +12 -2
- package/ds-progress-indicator/DSProgressIndicatorCO.js +5 -3
- package/ds-query-builder/DSQueryBuilder.visual.spec.js +10 -3
- package/ds-read-more/DSReadMore.func.spec.js +0 -58
- package/ds-read-more/DSReadMore.keyboard-nav.func.spec.js +66 -0
- package/ds-read-more/DSReadMore.slots.func.spec.js +58 -0
- package/ds-read-more/DSReadMore.slots.visual.spec.js +23 -0
- package/ds-read-more/DSReadMore.visual.spec.js +41 -17
- package/ds-read-more/DSReadMore.width-change.visual.spec.js +85 -0
- package/ds-read-more/DSReadMore.with-tooltip.func.spec.js +63 -0
- package/ds-read-more/DSReadMoreCO.js +20 -0
- package/ds-shuttle-v2/Dnd/DSShuttleV2.DnD.visual.spec.js +3 -0
- package/ds-shuttle-v2/basic/DSShuttleV2.keyboard.func.spec.js +0 -79
- package/ds-shuttle-v2/extra/DSShuttleV2.extra.func.spec.js +6 -2
- package/ds-shuttle-v2/extra/DSShuttleV2.extra.visual.spec.js +21 -0
- package/ds-shuttle-v2/filtering/DSShuttleV2.filter.func.spec.js +8 -3
- package/ds-shuttle-v2/filtering/DSShuttleV2.filter.kb.func.spec.js +43 -0
- package/ds-shuttle-v2/items/DSShuttleV2.items.func.spec.js +3 -2
- package/ds-shuttle-v2/items/DSShuttleV2.items.kb.func.spec.js +1 -1
- package/ds-shuttle-v2/load-more/DSShuttleV2.load-more.keyboard.func.spec.js +61 -0
- package/ds-slider-v2/DSSliderV2.extra.func.spec.js +44 -0
- package/ds-slider-v2/DSSliderV2.func.spec.js +98 -0
- package/ds-slider-v2/DSSliderV2CO.js +8 -0
- package/ds-svg/DSSvg.axe-core.func.spec.js +32 -0
- package/ds-svg/DSSvgCO.js +2 -3
- package/ds-tabs/DSTabs.onTabChange.func.spec.js +33 -0
- package/ds-tabs/DSTabsCO.js +29 -1
- package/ds-tabs/slots/DSTabs.slots.func.spec.js +77 -0
- package/ds-tabs/slots/DSTabs.slots.visual.spec.js +49 -0
- package/ds-tabs/with-carousel/DSTabs.with-carousel.visual.spec.js +5 -4
- package/ds-tooltip-v3/DSTooltipV3CO.js +6 -2
- package/ds-treeview/DSTreeViewCO.js +8 -0
- package/ds-treeview/dragAndDrop/TreeView-dnd.func.spec.js +0 -50
- package/ds-treeview/dragAndDrop/TreeView-dnd_mouse.func.spec.js +61 -0
- package/package.json +188 -187
- package/paths.js +17 -1
- package/ds-dialog/DSDialog.smoke.spec.js +0 -133
- package/ds-slider-v2/DSSliderV2.skipped.js +0 -46
- /package/ds-form-combobox-multi/iframe/{DSComboboxMulti.insideIframe.func.spec.js → DSComboboxMulti.insideIframe.visual.spec.js} +0 -0
- /package/{ds-controlled-form → ds-hooks}/useMask/useMaskCO.js +0 -0
- /package/ds-indeterminate-progress-indicator/{DSIndetermintateProgressIndicator.func.spec.js → DSIndetermintateProgressIndicator.func.spec copy.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import DSProgressIndicatorCO from './DSProgressIndicatorCO';
|
|
2
|
+
import { axeCoreCheck } from '../helpers';
|
|
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-17521: Progress Indicator:: Basic - Axe Core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSProgressIndicatorCO.basicURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: should display basic progress indicator and pass axe-core', async () => {
|
|
16
|
+
await (await DSProgressIndicatorCO.getUploadLabel()).waitForDisplayed();
|
|
17
|
+
const result = await axeCoreCheck();
|
|
18
|
+
expect(result.length).toBe(0);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe('PUI-17524: Progress Indicator:: Others Test - Axe Core', () => {
|
|
22
|
+
before('loading page', async () => {
|
|
23
|
+
const errorOnGo = await DSProgressIndicatorCO.othersURL.go();
|
|
24
|
+
if (errorOnGo) throw errorOnGo;
|
|
25
|
+
});
|
|
26
|
+
it('01: should display progress indicator and pass axe-core', async () => {
|
|
27
|
+
const result = await axeCoreCheck();
|
|
28
|
+
expect(result.length).toBe(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import DSProgressIndicatorCO from './DSProgressIndicatorCO';
|
|
2
2
|
|
|
3
|
-
if (
|
|
4
|
-
|
|
3
|
+
if (
|
|
4
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
5
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
6
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
7
|
+
browser.capabilities.browserName === 'Chrome'
|
|
8
|
+
) {
|
|
9
|
+
describe('PUI-17522 - Progress Indicator:: Basic - Func', () => {
|
|
5
10
|
before('loading page', async () => {
|
|
6
11
|
const errorOnGo = await DSProgressIndicatorCO.basicURL.go();
|
|
7
12
|
if (errorOnGo) throw errorOnGo;
|
|
8
13
|
});
|
|
9
|
-
it('should show basic progress indicator', async () => {
|
|
14
|
+
it('01: should show basic progress indicator', async () => {
|
|
10
15
|
const progressIndicator = await DSProgressIndicatorCO.getUploadLabel();
|
|
11
16
|
await expect(progressIndicator).toBeDisplayed();
|
|
12
17
|
});
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import DSProgressIndicatorCO from './DSProgressIndicatorCO';
|
|
2
2
|
|
|
3
3
|
if (!browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('Progress Indicator', () => {
|
|
4
|
+
describe('PUI-17520 - Progress Indicator:: Basic - Visual', () => {
|
|
5
5
|
before('loading page', async () => {
|
|
6
6
|
const errorOnGo = await DSProgressIndicatorCO.basicURL.go();
|
|
7
7
|
if (errorOnGo) throw errorOnGo;
|
|
8
8
|
});
|
|
9
|
-
it('basic progress indicator', async () => {
|
|
9
|
+
it('01: should display basic progress indicator', async () => {
|
|
10
10
|
await (await DSProgressIndicatorCO.getUploadLabel()).waitForDisplayed();
|
|
11
11
|
const snapshot = await browser.checkSnapshot(DSProgressIndicatorCO.snapshotPath('progressindicator-basic'));
|
|
12
12
|
await expect(snapshot).toEqual(0);
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
|
+
describe('PUI-17523 - Progress Indicator:: Others Test - Visual', () => {
|
|
16
|
+
before('loading page', async () => {
|
|
17
|
+
const errorOnGo = await DSProgressIndicatorCO.othersURL.go();
|
|
18
|
+
if (errorOnGo) throw errorOnGo;
|
|
19
|
+
});
|
|
20
|
+
it('01: should display progress indicator', async () => {
|
|
21
|
+
const snapshot = await browser.checkSnapshot(DSProgressIndicatorCO.snapshotPath('progressindicator-others'));
|
|
22
|
+
await expect(snapshot).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
15
25
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PATH_E2E_PROGRESS_INDICATOR } from '../paths';
|
|
2
2
|
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
3
|
|
|
4
4
|
export default class DSProgressIndicatorCO extends PageObject {
|
|
5
5
|
// Desktop
|
|
6
|
-
static basicURL = new Urlbuilder(
|
|
6
|
+
static basicURL = new Urlbuilder(PATH_E2E_PROGRESS_INDICATOR, 'basic-test');
|
|
7
|
+
|
|
8
|
+
static othersURL = new Urlbuilder(PATH_E2E_PROGRESS_INDICATOR, 'others-test');
|
|
7
9
|
|
|
8
10
|
static getUrl(component = 'basic') {
|
|
9
|
-
return PageObject.getUrl(
|
|
11
|
+
return PageObject.getUrl(PATH_E2E_PROGRESS_INDICATOR, component);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
static async getUploadLabel() {
|
|
@@ -53,18 +53,25 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
53
53
|
if (errorOnGo) throw errorOnGo;
|
|
54
54
|
});
|
|
55
55
|
it('01: should display the combobox multi closed properly', async () => {
|
|
56
|
-
|
|
56
|
+
await browser.eyesOpen();
|
|
57
|
+
const snapshot = await browser.eyesCheckSnapshot(DSQueryBuilderCO.snapshotPath('qb-error-combo-multi-closed'));
|
|
57
58
|
await expect(snapshot).toEqual(0);
|
|
58
59
|
});
|
|
59
60
|
it('02: should display the combobox with all options selected properly opened', async () => {
|
|
61
|
+
await browser.eyesOpen();
|
|
60
62
|
await DSQueryBuilderCO.openComboBox(0);
|
|
61
63
|
await browser.keys([Key.Control, Key.Command, 'a']);
|
|
62
|
-
const snapshot = await browser.
|
|
64
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
65
|
+
DSQueryBuilderCO.snapshotPath('qb-error-combo-multi-all-selected'),
|
|
66
|
+
);
|
|
63
67
|
await expect(snapshot).toEqual(0);
|
|
64
68
|
});
|
|
65
69
|
it('03: should display the combobox with all options selected properly closed', async () => {
|
|
70
|
+
await browser.eyesOpen();
|
|
66
71
|
await $('body').click();
|
|
67
|
-
const snapshot = await browser.
|
|
72
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
73
|
+
DSQueryBuilderCO.snapshotPath('qb-error-combo-multi-all-selected'),
|
|
74
|
+
);
|
|
68
75
|
await expect(snapshot).toEqual(0);
|
|
69
76
|
});
|
|
70
77
|
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Key } from 'webdriverio';
|
|
2
|
-
import { mouseOver } from '../helpers';
|
|
3
1
|
import DSReadMoreCO from './DSReadMoreCO';
|
|
4
2
|
|
|
5
3
|
if (!browser.capabilities['ice:options'].isPhone) {
|
|
@@ -45,21 +43,6 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
45
43
|
});
|
|
46
44
|
});
|
|
47
45
|
|
|
48
|
-
if (!browser.capabilities['ice:options'].isTablet) {
|
|
49
|
-
describe('PUI-9561: Read More, with tooltip -func', () => {
|
|
50
|
-
before('loading page', async () => {
|
|
51
|
-
const errorOnGo = await DSReadMoreCO.withTooltip.go();
|
|
52
|
-
if (errorOnGo) throw errorOnGo;
|
|
53
|
-
});
|
|
54
|
-
it('Should display tooltip on trigger hover', async () => {
|
|
55
|
-
const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
|
|
56
|
-
await mouseOver(tooltipTrigger, 1, 1);
|
|
57
|
-
const tooltip = await DSReadMoreCO.getTooltip();
|
|
58
|
-
await expect(tooltip).toBeDisplayed();
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
46
|
describe('PUI-9562: Read More, not truncated on short texts -func', () => {
|
|
64
47
|
before('loading page', async () => {
|
|
65
48
|
const errorOnGo = await DSReadMoreCO.notTruncatedUrl.go();
|
|
@@ -73,45 +56,4 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
73
56
|
await expect(moreLessBtn).not.toBeDisplayed();
|
|
74
57
|
});
|
|
75
58
|
});
|
|
76
|
-
if (!browser.capabilities['ice:options'].isTablet) {
|
|
77
|
-
describe('PUI-9612: Read More: withTooltip on responsive (zoom) -func', () => {
|
|
78
|
-
before('loading page', async () => {
|
|
79
|
-
const errorOnGo = await DSReadMoreCO.widthChange.go();
|
|
80
|
-
if (errorOnGo) throw errorOnGo;
|
|
81
|
-
});
|
|
82
|
-
it('01: should display tooltip on 100px width', async () => {
|
|
83
|
-
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
84
|
-
expect(tooltipTriggerBtns).toHaveLength(2);
|
|
85
|
-
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
86
|
-
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
87
|
-
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
88
|
-
await mouseOver(tooltipTriggerBtns[1], 1, 1);
|
|
89
|
-
const secondTooltip = await DSReadMoreCO.getTooltip();
|
|
90
|
-
await expect(secondTooltip).toBeDisplayedInViewport();
|
|
91
|
-
});
|
|
92
|
-
it('02: should display tooltip on 200px width', async () => {
|
|
93
|
-
const changeWidthBtn = await DSReadMoreCO.getButton();
|
|
94
|
-
await changeWidthBtn.click();
|
|
95
|
-
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
96
|
-
expect(tooltipTriggerBtns).toHaveLength(2);
|
|
97
|
-
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
98
|
-
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
99
|
-
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
100
|
-
await mouseOver(tooltipTriggerBtns[1], 1, 1);
|
|
101
|
-
const secondTooltip = await DSReadMoreCO.getTooltip();
|
|
102
|
-
await expect(secondTooltip).toBeDisplayedInViewport();
|
|
103
|
-
});
|
|
104
|
-
it('03: should display tooltip on 300px width', async () => {
|
|
105
|
-
// close tooltip
|
|
106
|
-
await browser.keys(Key.Escape);
|
|
107
|
-
const changeWidthBtn = await DSReadMoreCO.getButton();
|
|
108
|
-
await changeWidthBtn.click();
|
|
109
|
-
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
110
|
-
expect(tooltipTriggerBtns).toHaveLength(1);
|
|
111
|
-
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
112
|
-
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
113
|
-
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
59
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import DSReadMoreCO from './DSReadMoreCO';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-16388: Read More, Kb with tooltip -func', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSReadMoreCO.withTooltip.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('Should display tooltip on focus', async () => {
|
|
12
|
+
const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
|
|
13
|
+
await tooltipTrigger.waitForDisplayed();
|
|
14
|
+
await browser.keys(Key.Tab);
|
|
15
|
+
const tooltip = await DSReadMoreCO.getTooltip();
|
|
16
|
+
await expect(tooltip).toBeDisplayed();
|
|
17
|
+
});
|
|
18
|
+
it('Should not display tooltip after ESC is pressed', async () => {
|
|
19
|
+
await browser.keys(Key.Escape);
|
|
20
|
+
const tooltip = await DSReadMoreCO.getTooltip();
|
|
21
|
+
await expect(tooltip).not.toBeDisplayed();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('PUI-16387: Read More, Kb with readmore btn -func', () => {
|
|
26
|
+
before('loading page', async () => {
|
|
27
|
+
const errorOnGo = await DSReadMoreCO.truncatedUrl.go();
|
|
28
|
+
if (errorOnGo) throw errorOnGo;
|
|
29
|
+
});
|
|
30
|
+
it('01: Should focus readmore button after tab is pressed', async () => {
|
|
31
|
+
const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
|
|
32
|
+
await readMoreBtn.waitForDisplayed();
|
|
33
|
+
const moreLessText = await DSReadMoreCO.getMoreLessText();
|
|
34
|
+
await browser.keys(Key.Tab);
|
|
35
|
+
await expect(readMoreBtn).toBeFocused();
|
|
36
|
+
await expect(moreLessText).toHaveText(
|
|
37
|
+
expect.stringContaining(
|
|
38
|
+
'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is',
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
it('02: Should display more content on readmore button trigger (enter/return)', async () => {
|
|
43
|
+
const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
|
|
44
|
+
await browser.keys(Key.Return);
|
|
45
|
+
const moreLessText = await DSReadMoreCO.getMoreLessText();
|
|
46
|
+
await expect(readMoreBtn).toBeFocused();
|
|
47
|
+
await expect(moreLessText).toHaveText(
|
|
48
|
+
expect.stringContaining(
|
|
49
|
+
// eslint-disable-next-line max-len
|
|
50
|
+
'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes.',
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
it('03: Should display more content on readmore button trigger (enter/return)', async () => {
|
|
55
|
+
const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
|
|
56
|
+
await browser.keys(Key.Return);
|
|
57
|
+
const moreLessText = await DSReadMoreCO.getMoreLessText();
|
|
58
|
+
await expect(readMoreBtn).toBeFocused();
|
|
59
|
+
await expect(moreLessText).toHaveText(
|
|
60
|
+
expect.stringContaining(
|
|
61
|
+
'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is',
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import DSReadMoreCO from './DSReadMoreCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone) {
|
|
4
|
+
describe('PUI-17108: Read More, Slots -Func', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await DSReadMoreCO.slotsTest.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('01: Should have custom aria and data for button slot', async () => {
|
|
10
|
+
const buttonSlot1 = await DSReadMoreCO.getButtonSlotByIndex(0);
|
|
11
|
+
const buttonSlot2 = await DSReadMoreCO.getButtonSlotByIndex(1);
|
|
12
|
+
const buttonAria1 = await buttonSlot1.getAttribute('aria-label');
|
|
13
|
+
const buttonData1 = await buttonSlot1.getAttribute('data-testid');
|
|
14
|
+
const buttonAria2 = await buttonSlot2.getAttribute('aria-label');
|
|
15
|
+
const buttonData2 = await buttonSlot2.getAttribute('data-testid');
|
|
16
|
+
await expect(buttonAria1).toEqual('button aria');
|
|
17
|
+
await expect(buttonData1).toEqual('button data');
|
|
18
|
+
await expect(buttonAria2).toEqual('button aria');
|
|
19
|
+
await expect(buttonData2).toEqual('button data');
|
|
20
|
+
});
|
|
21
|
+
it('02: Should have custom aria and data for buttonWrapper slot', async () => {
|
|
22
|
+
const buttonWrapperSlot1 = await DSReadMoreCO.getButtonWrapperSlotByIndex(0);
|
|
23
|
+
const buttonWrapperSlot2 = await DSReadMoreCO.getButtonWrapperSlotByIndex(1);
|
|
24
|
+
const buttonWrapperAria1 = await buttonWrapperSlot1.getAttribute('aria-label');
|
|
25
|
+
const buttonWrapperData1 = await buttonWrapperSlot1.getAttribute('data-testid');
|
|
26
|
+
const buttonWrapperAria2 = await buttonWrapperSlot2.getAttribute('aria-label');
|
|
27
|
+
const buttonWrapperData2 = await buttonWrapperSlot2.getAttribute('data-testid');
|
|
28
|
+
await expect(buttonWrapperAria1).toEqual('button wrapper aria');
|
|
29
|
+
await expect(buttonWrapperData1).toEqual('button wrapper data');
|
|
30
|
+
await expect(buttonWrapperAria2).toEqual('button wrapper aria');
|
|
31
|
+
await expect(buttonWrapperData2).toEqual('button wrapper data');
|
|
32
|
+
});
|
|
33
|
+
it('03: Should have custom aria and data for root slot', async () => {
|
|
34
|
+
const rootSlot1 = await DSReadMoreCO.getRootSlotByIndex(0);
|
|
35
|
+
const rootSlot2 = await DSReadMoreCO.getRootSlotByIndex(1);
|
|
36
|
+
const rootAria1 = await rootSlot1.getAttribute('aria-label');
|
|
37
|
+
const rootData1 = await rootSlot1.getAttribute('data-testid');
|
|
38
|
+
const rootAria2 = await rootSlot2.getAttribute('aria-label');
|
|
39
|
+
const rootData2 = await rootSlot2.getAttribute('data-testid');
|
|
40
|
+
await expect(rootAria1).toEqual('root aria');
|
|
41
|
+
await expect(rootData1).toEqual('root data');
|
|
42
|
+
await expect(rootAria2).toEqual('root aria');
|
|
43
|
+
await expect(rootData2).toEqual('root data');
|
|
44
|
+
});
|
|
45
|
+
it('04: Should have custom aria and data for textcontent slot', async () => {
|
|
46
|
+
const textContentSlot1 = await DSReadMoreCO.getContentSlotByIndex(0);
|
|
47
|
+
const textContentSlot2 = await DSReadMoreCO.getContentSlotByIndex(1);
|
|
48
|
+
const textContentAria1 = await textContentSlot1.getAttribute('aria-label');
|
|
49
|
+
const textContentData1 = await textContentSlot1.getAttribute('data-testid');
|
|
50
|
+
const textContentAria2 = await textContentSlot2.getAttribute('aria-label');
|
|
51
|
+
const textContentData2 = await textContentSlot2.getAttribute('data-testid');
|
|
52
|
+
await expect(textContentAria1).toEqual('text content aria');
|
|
53
|
+
await expect(textContentData1).toEqual('text content data');
|
|
54
|
+
await expect(textContentAria2).toEqual('text content aria');
|
|
55
|
+
await expect(textContentData2).toEqual('text content data');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSReadMoreCO from './DSReadMoreCO';
|
|
3
|
+
import { mouseOver } from '../helpers';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-17107: Read More, Slots -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSReadMoreCO.slotsTest.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
await browser.maximizeWindow();
|
|
11
|
+
});
|
|
12
|
+
it('01: Should display ReadMore customized colors for each slot', async () => {
|
|
13
|
+
await browser.eyesOpen();
|
|
14
|
+
await (await DSReadMoreCO.getButtonWrapperSlotByIndex()).waitForDisplayed();
|
|
15
|
+
await browser.keys(Key.Tab);
|
|
16
|
+
await browser.keys(Key.Return);
|
|
17
|
+
const secondReadmore = await DSReadMoreCO.getButtonWrapperSlotByIndex(1);
|
|
18
|
+
await mouseOver(secondReadmore);
|
|
19
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-slots'));
|
|
20
|
+
await expect(snapshot).toEqual(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
1
2
|
import DSReadMoreCO from './DSReadMoreCO';
|
|
2
3
|
import { mouseOver } from '../helpers';
|
|
3
4
|
|
|
@@ -8,14 +9,19 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
10
|
});
|
|
10
11
|
it('01: Should display ReadMore truncated with the MORE button', async () => {
|
|
12
|
+
await browser.eyesOpen();
|
|
13
|
+
if (!browser.capabilities['ice:options'].isTablet) {
|
|
14
|
+
await browser.maximizeWindow();
|
|
15
|
+
}
|
|
11
16
|
await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
|
|
12
|
-
const snapshot = await browser.
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('truncated-more'));
|
|
13
18
|
await expect(snapshot).toEqual(0);
|
|
14
19
|
});
|
|
15
20
|
it('02: Should display ReadMore not truncated after click with LESS button', async () => {
|
|
21
|
+
await browser.eyesOpen();
|
|
16
22
|
const button = await DSReadMoreCO.getMoreLessButton();
|
|
17
23
|
await button.click();
|
|
18
|
-
const snapshot = await browser.
|
|
24
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('truncated-less'));
|
|
19
25
|
await expect(snapshot).toEqual(0);
|
|
20
26
|
});
|
|
21
27
|
});
|
|
@@ -25,8 +31,12 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
25
31
|
if (errorOnGo) throw errorOnGo;
|
|
26
32
|
});
|
|
27
33
|
it('Should display ReadMore not truncated', async () => {
|
|
34
|
+
await browser.eyesOpen();
|
|
35
|
+
if (!browser.capabilities['ice:options'].isTablet) {
|
|
36
|
+
await browser.maximizeWindow();
|
|
37
|
+
}
|
|
28
38
|
await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
|
|
29
|
-
const snapshot = await browser.
|
|
39
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('not-truncated'));
|
|
30
40
|
await expect(snapshot).toEqual(0);
|
|
31
41
|
});
|
|
32
42
|
});
|
|
@@ -36,31 +46,45 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
36
46
|
if (errorOnGo) throw errorOnGo;
|
|
37
47
|
});
|
|
38
48
|
it('01: Should display ReadMore truncated with the MORE!!! button', async () => {
|
|
49
|
+
await browser.eyesOpen();
|
|
50
|
+
if (!browser.capabilities['ice:options'].isTablet) {
|
|
51
|
+
await browser.maximizeWindow();
|
|
52
|
+
}
|
|
39
53
|
await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
|
|
40
|
-
const snapshot = await browser.
|
|
54
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('custom-button-more'));
|
|
41
55
|
await expect(snapshot).toEqual(0);
|
|
42
56
|
});
|
|
43
57
|
it('02: Should display ReadMore not truncated after click with LESS!!! button', async () => {
|
|
58
|
+
await browser.eyesOpen();
|
|
44
59
|
const button = await DSReadMoreCO.getMoreLessButton();
|
|
45
60
|
await button.click();
|
|
46
|
-
const snapshot = await browser.
|
|
61
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('custom-button-less'));
|
|
47
62
|
await expect(snapshot).toEqual(0);
|
|
48
63
|
});
|
|
49
64
|
});
|
|
50
65
|
|
|
51
66
|
if (!browser.capabilities['ice:options'].isTablet) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
if (browser.capabilities.browserName !== 'Safari') {
|
|
68
|
+
describe('PUI-9566: Read More, with tooltip -Visual', () => {
|
|
69
|
+
before('loading page', async () => {
|
|
70
|
+
const errorOnGo = await DSReadMoreCO.withTooltip.go();
|
|
71
|
+
if (errorOnGo) throw errorOnGo;
|
|
72
|
+
});
|
|
73
|
+
it('01: Should display tooltip on trigger hover', async () => {
|
|
74
|
+
await browser.eyesOpen();
|
|
75
|
+
await browser.maximizeWindow();
|
|
76
|
+
const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
|
|
77
|
+
await mouseOver(tooltipTrigger, 1, 1);
|
|
78
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-tooltip'));
|
|
79
|
+
await expect(snapshot).toEqual(0);
|
|
80
|
+
});
|
|
81
|
+
it('02: Should display tooltip (& focusring) on trigger hover', async () => {
|
|
82
|
+
await browser.eyesOpen();
|
|
83
|
+
await browser.keys(Key.Tab);
|
|
84
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-focusring'));
|
|
85
|
+
await expect(snapshot).toEqual(0);
|
|
86
|
+
});
|
|
56
87
|
});
|
|
57
|
-
|
|
58
|
-
await browser.eyesOpen();
|
|
59
|
-
const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
|
|
60
|
-
await mouseOver(tooltipTrigger, 1, 1);
|
|
61
|
-
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-tooltip'));
|
|
62
|
-
await expect(snapshot).toEqual(0);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
88
|
+
}
|
|
65
89
|
}
|
|
66
90
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSReadMoreCO from './DSReadMoreCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-17358 - Read More:: width change -Visual', () => {
|
|
6
|
+
beforeEach('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSReadMoreCO.widthChange.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display readmore at 100px width - read more', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readmore'));
|
|
13
|
+
await expect(snapshot).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it('02: should display readmore at 100px width - read less', async () => {
|
|
16
|
+
await browser.eyesOpen();
|
|
17
|
+
await browser.keys(Key.Tab);
|
|
18
|
+
await browser.keys(Key.Enter);
|
|
19
|
+
await browser.keys(Key.Tab);
|
|
20
|
+
await browser.keys(Key.Enter);
|
|
21
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readless'));
|
|
22
|
+
await expect(snapshot).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
it('03: should display readmore at 200px width - read more', async () => {
|
|
25
|
+
await browser.eyesOpen();
|
|
26
|
+
await $('button*=Change the widths').click();
|
|
27
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readmore'));
|
|
28
|
+
await expect(snapshot).toEqual(0);
|
|
29
|
+
});
|
|
30
|
+
it('04: should display readmore at 200px width - read less', async () => {
|
|
31
|
+
await browser.eyesOpen();
|
|
32
|
+
await $('button*=Change the widths').click();
|
|
33
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
34
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
35
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
36
|
+
await browser.keys(Key.Enter);
|
|
37
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
38
|
+
await browser.keys(Key.Enter);
|
|
39
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readless'));
|
|
40
|
+
await expect(snapshot).toEqual(0);
|
|
41
|
+
});
|
|
42
|
+
it('05: should display readmore at 300px width - read more', async () => {
|
|
43
|
+
await browser.eyesOpen();
|
|
44
|
+
await $('button*=Change the widths').click();
|
|
45
|
+
await $('button*=Change the widths').click();
|
|
46
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readmore'));
|
|
47
|
+
await expect(snapshot).toEqual(0);
|
|
48
|
+
});
|
|
49
|
+
it('06: should display readmore at 300px width - read less', async () => {
|
|
50
|
+
await browser.eyesOpen();
|
|
51
|
+
await $('button*=Change the widths').click();
|
|
52
|
+
await $('button*=Change the widths').click();
|
|
53
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
54
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
55
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
56
|
+
await browser.keys(Key.Enter);
|
|
57
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
58
|
+
await browser.keys(Key.Enter);
|
|
59
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readless'));
|
|
60
|
+
await expect(snapshot).toEqual(0);
|
|
61
|
+
});
|
|
62
|
+
it('07: should display readmore at 400px width - read more', async () => {
|
|
63
|
+
await browser.eyesOpen();
|
|
64
|
+
await $('button*=Change the widths').click();
|
|
65
|
+
await $('button*=Change the widths').click();
|
|
66
|
+
await $('button*=Change the widths').click();
|
|
67
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readmore'));
|
|
68
|
+
await expect(snapshot).toEqual(0);
|
|
69
|
+
});
|
|
70
|
+
it('08: should display readmore at 400px width - read less', async () => {
|
|
71
|
+
await browser.eyesOpen();
|
|
72
|
+
await $('button*=Change the widths').click();
|
|
73
|
+
await $('button*=Change the widths').click();
|
|
74
|
+
await $('button*=Change the widths').click();
|
|
75
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
76
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
77
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
78
|
+
await browser.keys(Key.Enter);
|
|
79
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
80
|
+
await browser.keys(Key.Enter);
|
|
81
|
+
const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readless'));
|
|
82
|
+
await expect(snapshot).toEqual(0);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import { mouseOver } from '../helpers';
|
|
3
|
+
import DSReadMoreCO from './DSReadMoreCO';
|
|
4
|
+
|
|
5
|
+
if (
|
|
6
|
+
!browser.capabilities['ice:options'].isPhone &&
|
|
7
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
8
|
+
browser.capabilities.browserName !== 'Safari'
|
|
9
|
+
) {
|
|
10
|
+
// Readmore tooltip trigger raises error: Element not interactable with safari. False negative
|
|
11
|
+
describe('PUI-9561: Read More, with tooltip -func', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSReadMoreCO.withTooltip.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('Should display tooltip on trigger hover', async () => {
|
|
17
|
+
const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
|
|
18
|
+
await mouseOver(tooltipTrigger, 1, 1);
|
|
19
|
+
const tooltip = await DSReadMoreCO.getTooltip();
|
|
20
|
+
await expect(tooltip).toBeDisplayed();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe('PUI-9612: Read More: withTooltip on responsive (zoom) -func', () => {
|
|
25
|
+
before('loading page', async () => {
|
|
26
|
+
const errorOnGo = await DSReadMoreCO.widthChange.go();
|
|
27
|
+
if (errorOnGo) throw errorOnGo;
|
|
28
|
+
});
|
|
29
|
+
it('01: should display tooltip on 100px width', async () => {
|
|
30
|
+
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
31
|
+
expect(tooltipTriggerBtns).toHaveLength(2);
|
|
32
|
+
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
33
|
+
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
34
|
+
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
35
|
+
await mouseOver(tooltipTriggerBtns[1], 1, 1);
|
|
36
|
+
const secondTooltip = await DSReadMoreCO.getTooltip();
|
|
37
|
+
await expect(secondTooltip).toBeDisplayedInViewport();
|
|
38
|
+
});
|
|
39
|
+
it('02: should display tooltip on 200px width', async () => {
|
|
40
|
+
const changeWidthBtn = await DSReadMoreCO.getButton();
|
|
41
|
+
await changeWidthBtn.click();
|
|
42
|
+
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
43
|
+
expect(tooltipTriggerBtns).toHaveLength(2);
|
|
44
|
+
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
45
|
+
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
46
|
+
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
47
|
+
await mouseOver(tooltipTriggerBtns[1], 1, 1);
|
|
48
|
+
const secondTooltip = await DSReadMoreCO.getTooltip();
|
|
49
|
+
await expect(secondTooltip).toBeDisplayedInViewport();
|
|
50
|
+
});
|
|
51
|
+
it('03: should display tooltip on 300px width', async () => {
|
|
52
|
+
// close tooltip
|
|
53
|
+
await browser.keys(Key.Escape);
|
|
54
|
+
const changeWidthBtn = await DSReadMoreCO.getButton();
|
|
55
|
+
await changeWidthBtn.click();
|
|
56
|
+
const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
|
|
57
|
+
expect(tooltipTriggerBtns).toHaveLength(1);
|
|
58
|
+
await mouseOver(tooltipTriggerBtns[0], 1, 1);
|
|
59
|
+
const firstTooltip = await DSReadMoreCO.getTooltip();
|
|
60
|
+
await expect(firstTooltip).toBeDisplayedInViewport();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -13,6 +13,8 @@ export default class DSReadMoreCO extends PageObject {
|
|
|
13
13
|
|
|
14
14
|
static widthChange = new Urlbuilder(PATH_E2E_READMORE, 'width-change');
|
|
15
15
|
|
|
16
|
+
static slotsTest = new Urlbuilder(PATH_E2E_READMORE, 'slots-test');
|
|
17
|
+
|
|
16
18
|
static async getMoreLessButton() {
|
|
17
19
|
return $('[data-testid="ds-read_more-button"]');
|
|
18
20
|
}
|
|
@@ -41,6 +43,24 @@ export default class DSReadMoreCO extends PageObject {
|
|
|
41
43
|
return $('[data-testid="ds-button"]');
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
// Slots
|
|
47
|
+
|
|
48
|
+
static async getButtonWrapperSlotByIndex(index = 0) {
|
|
49
|
+
return $$('[data-dimsum-slot="dsReadmoreButtonWrapper"]')[index];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static async getButtonSlotByIndex(index = 0) {
|
|
53
|
+
return $$('[data-dimsum-slot="dsButtonRoot"]')[index];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static async getContentSlotByIndex(index = 0) {
|
|
57
|
+
return $$('[data-dimsum-slot="dsReadmoreTextContent"]')[index];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static async getRootSlotByIndex(index = 0) {
|
|
61
|
+
return $$('[data-dimsum-slot="dsReadmoreRoot"]')[index];
|
|
62
|
+
}
|
|
63
|
+
|
|
44
64
|
// Snapshots
|
|
45
65
|
static snapshotPath(example = 'truncated') {
|
|
46
66
|
return PageObject.getSnapshotPathBuilder('ReadMore', example);
|
|
@@ -10,6 +10,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
10
10
|
});
|
|
11
11
|
it('01: Should display a focused DND handler', async () => {
|
|
12
12
|
await browser.eyesOpen();
|
|
13
|
+
await browser.maximizeWindow();
|
|
13
14
|
await browser.keys(Key.Tab);
|
|
14
15
|
await browser.keys(Key.Tab);
|
|
15
16
|
await browser.keys(Key.ArrowDown);
|
|
@@ -19,6 +20,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
19
20
|
});
|
|
20
21
|
it('02: Should display an item being dragged', async () => {
|
|
21
22
|
await browser.eyesOpen();
|
|
23
|
+
await browser.maximizeWindow();
|
|
22
24
|
await browser.keys(Key.Tab);
|
|
23
25
|
await browser.keys(Key.Tab);
|
|
24
26
|
await browser.keys(Key.ArrowDown);
|
|
@@ -30,6 +32,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
30
32
|
});
|
|
31
33
|
it('03: Should display the dropped item', async () => {
|
|
32
34
|
await browser.eyesOpen();
|
|
35
|
+
await browser.maximizeWindow();
|
|
33
36
|
await browser.keys(Key.Tab);
|
|
34
37
|
await browser.keys(Key.Tab);
|
|
35
38
|
await browser.keys(Key.ArrowDown);
|