dimsum-e2e-tests 3.80.0-next.12 → 3.80.0-next.13
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 +6 -0
- package/ds-apppicker/aria-disabled/DSAppPicker.aria-disabled.visual.spec.js +14 -1
- package/ds-apppicker/basic/DSAppPicker.basic.visual.spec.js +12 -7
- package/ds-pills-v2/DSPillsV2CO.js +53 -1
- package/ds-pills-v2/pitfalls/DSPills.inputPill.func.spec.js +26 -0
- package/ds-pills-v2/pitfalls/DSPills.inputWithFormItemBlockURL.axe-core.func.spec.js +38 -0
- package/ds-pills-v2/pitfalls/DSPills.inputWithFormItemBlockURL.func.spec.js +72 -0
- package/package.json +148 -149
- package/paths.js +2 -47
- package/ds-mobile/Accordion/DSAccordion.visual.spec.js +0 -33
- package/ds-mobile/Accordion/DSAccordionCO.js +0 -37
- package/ds-mobile/CategoryBox/CategoryBox.visual.spec.js +0 -18
- package/ds-mobile/CategoryBox/CategoryBoxCO.js +0 -17
- package/ds-mobile/CollectionBox/CollectionBox.visual.spec.js +0 -16
- package/ds-mobile/CollectionBox/CollectionBoxCO.js +0 -15
- package/ds-mobile/GlobalHeader/DSGlobalHeader.visual.spec.js +0 -55
- package/ds-mobile/GlobalHeader/DSGlobalHeaderCO.js +0 -36
- package/ds-mobile/GroupBox/GroupBox.visual.spec.js +0 -15
- package/ds-mobile/GroupBox/GroupBoxCO.js +0 -15
- package/ds-mobile/InfiniteLoader/InfiniteLoader.func.spec.js +0 -90
- package/ds-mobile/InfiniteLoader/InfiniteLoaderCO.js +0 -29
- package/ds-mobile/MobileActionToolbar/MobileActionToolbar.visual.spec.js +0 -39
- package/ds-mobile/MobileActionToolbar/MobileActionToolbarCO.js +0 -19
- package/ds-mobile/MobileBanner/MobileBanner.visual.spec.js +0 -23
- package/ds-mobile/MobileBanner/MobileBannerCO.js +0 -23
- package/ds-mobile/MobileCard/Card.func.spec.js +0 -38
- package/ds-mobile/MobileCard/Card.visual.spec.js +0 -103
- package/ds-mobile/MobileCard/MobileCardCO.js +0 -42
- package/ds-mobile/MobileContextMenu/MobileContextMenu.func.spec.js +0 -88
- package/ds-mobile/MobileContextMenu/MobileContextMenu.visual.spec.js +0 -31
- package/ds-mobile/MobileContextMenu/MobileContextMenuCO.js +0 -72
- package/ds-mobile/MobileDatePicker/MobileDatePicker.func.spec.js +0 -15
- package/ds-mobile/MobileDatePicker/MobileDatePicker.visual.spec.js +0 -15
- package/ds-mobile/MobileDatePicker/MobileDatePickerCO.js +0 -35
- package/ds-mobile/MobileDropdownMenu/MobileDropdownMenu.func.spec.js +0 -38
- package/ds-mobile/MobileDropdownMenu/MobileDropdownMenu.visual.spec.js +0 -16
- package/ds-mobile/MobileDropdownMenu/MobileDropdownMenuCO.js +0 -37
- package/ds-mobile/MobileEmptyState/MobileEmptyState.visual.spec.js +0 -15
- package/ds-mobile/MobileEmptyState/MobileEmptyStateCO.js +0 -14
- package/ds-mobile/MobileFilterbar/MobileFilterbar.visual.spec.js +0 -39
- package/ds-mobile/MobileFilterbar/MobileFilterbarCO.js +0 -19
- package/ds-mobile/MobileFooter/MobileFooter.func.spec.js +0 -26
- package/ds-mobile/MobileFooter/MobileFooter.visual.spec.js +0 -51
- package/ds-mobile/MobileFooter/MobileFooterCO.js +0 -27
- package/ds-mobile/MobileListItem/MobileListItem.visual.spec.js +0 -56
- package/ds-mobile/MobileListItem/MobileListItemCO.js +0 -19
- package/ds-mobile/MobileLoadingPage/MobileLoadingPage.visual.spec.js +0 -37
- package/ds-mobile/MobileLoadingPage/MobileLoadingPageCO.js +0 -23
- package/ds-mobile/MobilePageHeader/MobilePageHeader.func.spec.js +0 -22
- package/ds-mobile/MobilePageHeader/MobilePageHeader.visual.spec.js +0 -135
- package/ds-mobile/MobilePageHeader/MobilePageHeaderCO.js +0 -67
- package/ds-mobile/MobileSelectList/MobileSelectList.visual.spec.js +0 -56
- package/ds-mobile/MobileSelectList/MobileSelectListCO.js +0 -21
- package/ds-mobile/MobileSeparator/MobileSeparator.visual.spec.js +0 -28
- package/ds-mobile/MobileSeparator/MobileSeparatorCO.js +0 -17
- package/ds-mobile/MobileTimePicker/MobileTimePickerCO.js +0 -41
- package/ds-mobile/Modal/MobileModal.visual.spec.js +0 -56
- package/ds-mobile/Modal/MobileModalCO.js +0 -28
- package/ds-mobile/PageFilter/PageFilter.visual.spec.js +0 -46
- package/ds-mobile/PageFilter/PageFilterCO.js +0 -19
- package/ds-mobile/PageForm/PageForm.visual.spec.js +0 -14
- package/ds-mobile/PageForm/PageFormCO.js +0 -11
- package/ds-mobile/PageList/PageList.visual.spec.js +0 -31
- package/ds-mobile/PageList/PageListCO.js +0 -19
- package/ds-mobile/PageSummary/PageSummary.visual.spec.js +0 -20
- package/ds-mobile/PageSummary/PageSummaryCO.js +0 -11
- package/ds-mobile/SwipeToRefresh/SwipeToRefresh.func.spec.js +0 -26
- package/ds-mobile/SwipeToRefresh/SwipeToRefreshCO.js +0 -20
- package/ds-mobile/Tabs/MobileTabs.visual.spec.js +0 -91
- package/ds-mobile/Tabs/TabsCO.js +0 -37
- package/ds-mobile/Tooltip/MobileTooltip.func.spec.js +0 -17
- package/ds-mobile/Tooltip/MobileTooltip.visual.spec.js +0 -16
- package/ds-mobile/Tooltip/TooltipCO.js +0 -23
- package/ds-mobile/helpers.js +0 -7
package/paths.js
CHANGED
|
@@ -24,7 +24,6 @@ export const PATH_PIE_CHART = `${PATH_CHART_SERIES_TYPES}/Pie`;
|
|
|
24
24
|
export const PATH_GETTING_STARTED = 'Getting Started';
|
|
25
25
|
export const PATH_COMPONENTS = 'Components';
|
|
26
26
|
export const PATH_MOBILE = 'Components Mobile';
|
|
27
|
-
export const PATH_MOBILE_PAGE_TEMPLATES = `${PATH_MOBILE}/ZZZ Templates`;
|
|
28
27
|
export const PATH_DESKTOP = `${PATH_COMPONENTS}/Desktop Components`;
|
|
29
28
|
export const PATH_DESKTOP_PAGE_TEMPLATES = `${PATH_COMPONENTS}/ZZZ Templates`;
|
|
30
29
|
export const PATH_ADVANCES = 'Advanced examples';
|
|
@@ -38,7 +37,6 @@ export const PATH_UTILITIES_HOOKS_MASKS = `${PATH_UTILITIES_HOOKS}/Masks`;
|
|
|
38
37
|
export const PATH_USE_CASES = 'Use cases';
|
|
39
38
|
export const PATH_ATOMIC_USE_CASES = `${PATH_USE_CASES}/Atomic Components`;
|
|
40
39
|
export const PATH_DESKTOP_USE_CASES = `${PATH_USE_CASES}/Desktop Components`;
|
|
41
|
-
export const PATH_MOBILE_USE_CASES = `${PATH_USE_CASES}/Mobile Components`;
|
|
42
40
|
export const PATH_ADVANCED = 'Advanced';
|
|
43
41
|
export const PATH_CUSTOMIZATION = `${PATH_ADVANCED}/Customization`;
|
|
44
42
|
export const PATH_CUSTOMIZATION_USECASES = `${PATH_ADVANCED}/Customization/Usecases`;
|
|
@@ -46,35 +44,8 @@ export const PATH_HOOKS = 'Hooks';
|
|
|
46
44
|
export const PATH_HOOKS_MASKS = `${PATH_HOOKS}/Masks`;
|
|
47
45
|
export const PATH_THEME = `${PATH_GETTING_STARTED}/-C-Theme`;
|
|
48
46
|
|
|
49
|
-
// mobile components
|
|
47
|
+
// mobile components (ds-stepper only; ds-mobile moved to dimsum-legacy - PUI-18696)
|
|
50
48
|
export const PATH_MOBILE_PACKAGE = `${PATH_MOBILE}`;
|
|
51
|
-
export const PATH_MOBILE_ACCORDION = `${PATH_MOBILE_PACKAGE}/Accordion`;
|
|
52
|
-
export const PATH_MOBILE_ACCORDION_EXAMPLES = `${PATH_MOBILE_ACCORDION}/Examples`;
|
|
53
|
-
export const PATH_MOBILE_BANNER = `${PATH_MOBILE_PACKAGE}/MobileBanner/Examples`;
|
|
54
|
-
export const PATH_MOBILE_PAGE_HEADER = `${PATH_MOBILE_PACKAGE}/MobilePageHeader/Examples`;
|
|
55
|
-
export const PATH_MOBILE_FOOTER = `${PATH_MOBILE_PACKAGE}/Footer/Examples`;
|
|
56
|
-
export const PATH_MOBILE_TABS = `${PATH_MOBILE_PACKAGE}/MobileTabs/Examples`;
|
|
57
|
-
export const PATH_MOBILE_TOOLTIP = `${PATH_MOBILE_PACKAGE}/MobileTooltip/Examples`;
|
|
58
|
-
export const PATH_MOBILE_CARD = `${PATH_MOBILE_PACKAGE}/MobileCard/Examples`;
|
|
59
|
-
export const PATH_MOBILE_CONTEXT_MENU = `${PATH_MOBILE_PACKAGE}/MobileContextMenu/Examples`;
|
|
60
|
-
export const PATH_MOBILE_FILTER_BAR = `${PATH_MOBILE_PACKAGE}/MobileFilterbar/Examples`;
|
|
61
|
-
export const PATH_MOBILE_LIST_ITEM = `${PATH_MOBILE_PACKAGE}/MobileListItem/Examples`;
|
|
62
|
-
export const PATH_MOBILE_COMBOBOX = `${PATH_MOBILE_PACKAGE}/MobileCombobox/Examples`;
|
|
63
|
-
export const PATH_MOBILE_SEPARATOR = `${PATH_MOBILE_PACKAGE}/MobileSeparator/Examples`;
|
|
64
|
-
export const PATH_MOBILE_DATE_PICKER = `${PATH_MOBILE_PACKAGE}/MobileDatePicker/Examples`;
|
|
65
|
-
export const PATH_MOBILE_TIME_PICKER = `${PATH_MOBILE_PACKAGE}/MobileTimePicker/Examples`;
|
|
66
|
-
export const PATH_MOBILE_ACTION_TOOLBAR = `${PATH_MOBILE_PACKAGE}/MobileActionToolbar/Examples`;
|
|
67
|
-
export const PATH_MOBILE_EMPTY_STATE = `${PATH_MOBILE_PACKAGE}/MobileEmptyState/Examples`;
|
|
68
|
-
export const PATH_MOBILE_DROPDOWN_MENU = `${PATH_MOBILE_PACKAGE}/MobileDropdownMenu/Examples`;
|
|
69
|
-
export const PATH_MOBILE_COLLECTION_BOX = `${PATH_MOBILE_PACKAGE}/CollectionBox/Examples`;
|
|
70
|
-
export const PATH_MOBILE_CATEGORY_BOX = `${PATH_MOBILE_PACKAGE}/CategoryBox/Examples`;
|
|
71
|
-
export const PATH_MOBILE_GROUP_BOX = `${PATH_MOBILE_PACKAGE}/GroupBox/Examples`;
|
|
72
|
-
export const PATH_MOBILE_SWIPE_TO_REFRESH = `${PATH_MOBILE_PACKAGE}/SwipeToRefresh/Examples`;
|
|
73
|
-
export const PATH_MOBILE_INFINITE_LOADER = `${PATH_MOBILE_PACKAGE}/InfiniteLoader/Examples`;
|
|
74
|
-
export const PATH_MOBILE_GLOBAL_HEADER = `${PATH_MOBILE_PACKAGE}/GlobalHeader/Examples`;
|
|
75
|
-
export const PATH_MOBILE_SIDE_NAV = `${PATH_MOBILE_PACKAGE}/SideNav/Examples`;
|
|
76
|
-
export const PATH_MOBILE_MODAL = `${PATH_MOBILE_PACKAGE}/Modal/Examples`;
|
|
77
|
-
export const PATH_MOBILE_TRUNCATE_EXPANDABLE_TEXT = `${PATH_MOBILE_PACKAGE}/TruncateExpandableText/Examples`;
|
|
78
49
|
export const PATH_MOBILE_STEPPER = `${PATH_MOBILE_PACKAGE}/Stepper/Examples`;
|
|
79
50
|
export const PATH_MOBILE_STEPPER_E2E = `${PATH_MOBILE_PACKAGE}/Stepper/e2e`;
|
|
80
51
|
|
|
@@ -245,15 +216,6 @@ export const PATH_FORM_LAYOUT_LABEL = `${PATH_COMPONENTS}/FormLayoutLabel/Exampl
|
|
|
245
216
|
export const PATH_HOOKS_FONTSIZE_DETECTOR = `${PATH_COMPONENTS}/HooksFontsizeDetector`;
|
|
246
217
|
export const PATH_BUTTON_V_1 = `${PATH_COMPONENTS}/ButtonV1`;
|
|
247
218
|
|
|
248
|
-
// mobile page templates
|
|
249
|
-
export const PATH_MOBILE_LOADING_PAGE = `${PATH_MOBILE_PAGE_TEMPLATES}/Loading Page/Examples`;
|
|
250
|
-
export const PATH_MOBILE_SELECT_LIST = `${PATH_MOBILE_PAGE_TEMPLATES}/Select List/Examples`;
|
|
251
|
-
export const PATH_MOBILE_PAGE_FORM = `${PATH_MOBILE_PAGE_TEMPLATES}/Form/Examples`;
|
|
252
|
-
export const PATH_MOBILE_PAGE_LIST = `${PATH_MOBILE_PAGE_TEMPLATES}/Page List/Examples`;
|
|
253
|
-
export const PATH_MOBILE_PAGE_SEARCH = `${PATH_MOBILE_PAGE_TEMPLATES}/Search/Examples`;
|
|
254
|
-
export const PATH_MOBILE_PAGE_SUMMARY = `${PATH_MOBILE_PAGE_TEMPLATES}/Summary/Examples`;
|
|
255
|
-
export const PATH_MOBILE_PAGE_FILTER = `${PATH_MOBILE_PAGE_TEMPLATES}/Filter/Examples`;
|
|
256
|
-
|
|
257
219
|
// desktop templates
|
|
258
220
|
export const PATH_SLIDE_PANEL_TEMPLATE = `${PATH_DESKTOP_PAGE_TEMPLATES}/TemplateBasicWithSidePanel`;
|
|
259
221
|
export const PATH_PAGE_LAYOUT_TEMPLATE = `${PATH_DESKTOP_PAGE_TEMPLATES}/PageLayout/Examples`;
|
|
@@ -294,6 +256,7 @@ export const PATH_E2E_USE_FONT_SIZE_DETECTOR = `${PATH_E2E_HOOKS}/UseFontSizeDet
|
|
|
294
256
|
export const PATH_E2E_USE_FONT_SIZE_MEDIA = `${PATH_E2E_HOOKS}/UseFontSizeMedia`;
|
|
295
257
|
export const PATH_E2E_PILLS = `${PATH_E2E}/Pills/Examples`;
|
|
296
258
|
export const PATH_E2E_PILLS_V2 = `${PATH_E2E}/PillsV2`;
|
|
259
|
+
export const PATH_E2E_PILLS_V2_PITFALLS = `${PATH_E2E_PILLS_V2}/Pitfalls`;
|
|
297
260
|
export const PATH_E2E_LEFT_NAVIGATION = `${PATH_E2E}/LeftNavigation`;
|
|
298
261
|
export const PATH_E2E_CARD = `${PATH_E2E}/Card`;
|
|
299
262
|
export const PATH_E2E_BREADCRUMB = `${PATH_E2E}/Breadcrumb`;
|
|
@@ -409,17 +372,9 @@ export const PATH_E2E_BUTTON = `${PATH_E2E}/Button`;
|
|
|
409
372
|
export const PATH_E2E_INPUT_MASK = `${PATH_E2E_END_OF_LIFE}/Input Mask`;
|
|
410
373
|
export const PATH_E2E_INPUT_PROTECTED = `${PATH_E2E}/InputProtected`;
|
|
411
374
|
export const PATH_E2E_NOTIFICATION_BADGE = `${PATH_E2E}/Notification Badge`;
|
|
412
|
-
export const PATH_E2E_MOBILE_INFINITE_LOADER = `${PATH_E2E}/InfiniteLoader`;
|
|
413
375
|
export const PATH_E2E_CIRCULAR_INDET_INDICATOR = `${PATH_E2E}/CircularIndeterminateIndicator`;
|
|
414
|
-
export const PATH_E2E_MOBILE_PAGELIST = `${PATH_E2E}/MobilePageList`;
|
|
415
376
|
export const PATH_E2E_FLOATING_CONTEXT = `${PATH_E2E}/FloatingContext`;
|
|
416
377
|
|
|
417
|
-
// e2e mobile components (e2e)
|
|
418
|
-
export const PATH_E2E_MOBILE_TIME_PICKER = `${PATH_E2E}/MobileTimePicker`;
|
|
419
|
-
export const PATH_E2E_MOBILE_CONTEXT_MENU = `${PATH_E2E}/MobileContextMenu`;
|
|
420
|
-
export const PATH_E2E_MOBILE_CARD = `${PATH_E2E}/MobileCard`;
|
|
421
|
-
export const PATH_E2E_MOBILE_PAGE_HEADER = `${PATH_E2E}/MobilePageHeader`;
|
|
422
|
-
|
|
423
378
|
// Utilities
|
|
424
379
|
export const PATH_UTILITIES_HOOKS_USE_FOCUS_TRAP = `${PATH_UTILITIES_HOOKS}/Use Focus Trap`;
|
|
425
380
|
export const PATH_UTILITIES_HOOKS_USE_IS_MOBILE = `${PATH_UTILITIES_HOOKS}/Use Is Mobile`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import DSAccordionCO from './DSAccordionCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-7858 - M-Accordion, open and close - visual', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSAccordionCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should display all closed', async () => {
|
|
10
|
-
await (await DSAccordionCO.getAccordionItem(0)).waitForDisplayed();
|
|
11
|
-
const snapshot = await browser.checkSnapshot(DSAccordionCO.snapshotPath('accordion-basic'));
|
|
12
|
-
await expect(snapshot).toEqual(0);
|
|
13
|
-
});
|
|
14
|
-
it('should display open second one', async () => {
|
|
15
|
-
await (await DSAccordionCO.getHeaderClickableElement(1)).waitForDisplayed();
|
|
16
|
-
await (await DSAccordionCO.getHeaderClickableElement(1)).click();
|
|
17
|
-
await (await DSAccordionCO.getContent(1)).waitForDisplayed();
|
|
18
|
-
const snapshot = await browser.checkSnapshot(DSAccordionCO.snapshotPath('accordion-open'));
|
|
19
|
-
await expect(snapshot).toEqual(0);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe('Mobile Accordion:: Truncated rule', () => {
|
|
23
|
-
before('loading page', async () => {
|
|
24
|
-
const errorOnGo = await DSAccordionCO.truncatedURL.go();
|
|
25
|
-
if (errorOnGo) throw errorOnGo;
|
|
26
|
-
});
|
|
27
|
-
it('should display accordion with truncate rule', async () => {
|
|
28
|
-
await (await DSAccordionCO.getAccordionItem(0)).waitForDisplayed();
|
|
29
|
-
const snapshot = await browser.checkSnapshot(DSAccordionCO.snapshotPath('accordion-truncate'));
|
|
30
|
-
await expect(snapshot).toEqual(0);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-relative-packages */
|
|
2
|
-
import { PATH_MOBILE_ACCORDION_EXAMPLES } from '../../paths';
|
|
3
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
|
-
|
|
5
|
-
export const knobs = {
|
|
6
|
-
title: 'knob-Accordion%20Item%20title%200',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
class DSAccordionCO {
|
|
10
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_ACCORDION_EXAMPLES, 'basic');
|
|
11
|
-
|
|
12
|
-
static truncatedURL = new Urlbuilder(PATH_MOBILE_ACCORDION_EXAMPLES, 'truncated-title');
|
|
13
|
-
|
|
14
|
-
static getUrl(example = 'basic') {
|
|
15
|
-
return PageObject.getUrl(PATH_MOBILE_ACCORDION_EXAMPLES, example);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Snapshots
|
|
19
|
-
static snapshotPath(example = 'basic') {
|
|
20
|
-
return PageObject.getSnapshotPathBuilder('Accordion', example, 'ds-mobile');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// selectors
|
|
24
|
-
static async getAccordionItem(index) {
|
|
25
|
-
return $$('[data-testid="ds-accordion_item"]')[index];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static async getHeaderClickableElement(index) {
|
|
29
|
-
return $$('[data-testid="ds-accordion_item-header"]')[index];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static async getContent() {
|
|
33
|
-
return $('[data-testid="ds-accordion_item-content"]');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default DSAccordionCO;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import CategoryBoxCO from './CategoryBoxCO';
|
|
2
|
-
|
|
3
|
-
// PUI-3907 - Mobile CategoryBox
|
|
4
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
5
|
-
describe('Mobile CategoryBox', () => {
|
|
6
|
-
describe('Mobile CategoryBox:: Basic', () => {
|
|
7
|
-
before('loading page', async () => {
|
|
8
|
-
const errorOnGo = await CategoryBoxCO.basicURL.go();
|
|
9
|
-
if (errorOnGo) throw errorOnGo;
|
|
10
|
-
});
|
|
11
|
-
it('basic snapshot', async () => {
|
|
12
|
-
await (await CategoryBoxCO.getHeaderText()).waitForDisplayed({ timeout: 5000 });
|
|
13
|
-
const snapshot = await browser.checkSnapshot(CategoryBoxCO.snapshotPath());
|
|
14
|
-
await expect(snapshot).toEqual(0);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_CATEGORY_BOX } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class CategoryBox extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_CATEGORY_BOX, 'basic');
|
|
6
|
-
|
|
7
|
-
static actionsURL = new Urlbuilder(PATH_MOBILE_CATEGORY_BOX, 'actions');
|
|
8
|
-
|
|
9
|
-
static async getHeaderText() {
|
|
10
|
-
return $('div*=Category box title');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Snapshots
|
|
14
|
-
static snapshotPath(example = 'basic') {
|
|
15
|
-
return PageObject.getSnapshotPathBuilder('CategoryBox', example, 'ds-mobile');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import CollectionBoxCO from './CollectionBoxCO';
|
|
2
|
-
|
|
3
|
-
// PUI-3906 - CollectionBox
|
|
4
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
5
|
-
describe('Mobile CollectionBox:: Basic', () => {
|
|
6
|
-
before('loading page', async () => {
|
|
7
|
-
const errorOnGo = await CollectionBoxCO.basicURL.go();
|
|
8
|
-
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
});
|
|
10
|
-
it('basic snapshot', async () => {
|
|
11
|
-
await (await CollectionBoxCO.getHeaderText()).waitForDisplayed({ timeout: 5000 });
|
|
12
|
-
const snapshot = await browser.checkSnapshot(CollectionBoxCO.snapshotPath());
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_COLLECTION_BOX } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class CollectionBox extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_COLLECTION_BOX, 'basic');
|
|
6
|
-
|
|
7
|
-
static async getHeaderText() {
|
|
8
|
-
return $('div*=Header');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Snapshots
|
|
12
|
-
static snapshotPath(example = 'basic') {
|
|
13
|
-
return PageObject.getSnapshotPathBuilder('CollectionBox', example, 'ds-mobile');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import DSGlobalHeaderCO from './DSGlobalHeaderCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-4522 - Mobile Global Header, visual test', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await DSGlobalHeaderCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('01: should display mobileGlobalHeader basic', async () => {
|
|
10
|
-
await (await DSGlobalHeaderCO.getGlobalHeaderItem(0)).waitForDisplayed();
|
|
11
|
-
const snapshot = await browser.checkSnapshot(DSGlobalHeaderCO.snapshotPath('mobile-global-header-basic'));
|
|
12
|
-
await expect(snapshot).toEqual(0);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
describe('PUI-10842 - MobileGlobalHeader, with icon', () => {
|
|
16
|
-
before('loading page', async () => {
|
|
17
|
-
const errorOnGo = await DSGlobalHeaderCO.withIconURL.go();
|
|
18
|
-
if (errorOnGo) throw errorOnGo;
|
|
19
|
-
});
|
|
20
|
-
it('01: should display mobileGlobalHeader with icon', async () => {
|
|
21
|
-
await (await DSGlobalHeaderCO.getGlobalHeaderItem(0)).waitForDisplayed();
|
|
22
|
-
const snapshot = await browser.checkSnapshot(DSGlobalHeaderCO.snapshotPath('mobile-global-header-withIcon'));
|
|
23
|
-
await expect(snapshot).toEqual(0);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
describe('PUI-10843 - MobileGlobalHeader, menu opened', () => {
|
|
27
|
-
before('loading page', async () => {
|
|
28
|
-
const errorOnGo = await DSGlobalHeaderCO.withMenuURL.go();
|
|
29
|
-
if (errorOnGo) throw errorOnGo;
|
|
30
|
-
});
|
|
31
|
-
it('01: should display mobielGlobalHeader with menu opened', async () => {
|
|
32
|
-
await (await DSGlobalHeaderCO.getGlobalHeaderItem(0)).waitForDisplayed();
|
|
33
|
-
const r = await DSGlobalHeaderCO.getMenuClickableElement();
|
|
34
|
-
await r.click();
|
|
35
|
-
await (await DSGlobalHeaderCO.getGlobalHeaderMenu()).waitForDisplayed();
|
|
36
|
-
const snapshot = await browser.checkSnapshot(DSGlobalHeaderCO.snapshotPath('mobile-global-header-menu-opened'));
|
|
37
|
-
await expect(snapshot).toEqual(0);
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe('PUI-10844 - MobileGlobalHeader, searchbox opened', () => {
|
|
41
|
-
before('loading page', async () => {
|
|
42
|
-
const errorOnGo = await DSGlobalHeaderCO.basicURL.go();
|
|
43
|
-
if (errorOnGo) throw errorOnGo;
|
|
44
|
-
});
|
|
45
|
-
it('01: should display searchbox open', async () => {
|
|
46
|
-
await (await DSGlobalHeaderCO.getGlobalHeaderItem(0)).waitForDisplayed();
|
|
47
|
-
await (await DSGlobalHeaderCO.getSearchIconDisplay()).waitForDisplayed();
|
|
48
|
-
const r = await DSGlobalHeaderCO.getSearchIconDisplay();
|
|
49
|
-
await r.click();
|
|
50
|
-
await (await DSGlobalHeaderCO.getSearchBox()).waitForDisplayed({ timeout: 5000 });
|
|
51
|
-
const snapshot = await browser.checkSnapshot(DSGlobalHeaderCO.snapshotPath('mobile-global-header-search-open'));
|
|
52
|
-
await expect(snapshot).toEqual(0);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_GLOBAL_HEADER } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
class DSGlobalHeaderCO {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_GLOBAL_HEADER, 'basic');
|
|
6
|
-
|
|
7
|
-
static withIconURL = new Urlbuilder(PATH_MOBILE_GLOBAL_HEADER, 'with-icon');
|
|
8
|
-
|
|
9
|
-
static withMenuURL = new Urlbuilder(PATH_MOBILE_GLOBAL_HEADER, 'with-menu');
|
|
10
|
-
|
|
11
|
-
static async getGlobalHeaderItem(index) {
|
|
12
|
-
return $$('[data-testid="global-header-wrapper"]')[index];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
static snapshotPath(example = 'basic') {
|
|
16
|
-
return PageObject.getSnapshotPathBuilder('GlobalHeader', example, 'ds-mobile');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static async getMenuClickableElement() {
|
|
20
|
-
return (await DSGlobalHeaderCO.getGlobalHeaderItem(0)).$(`div`).$('div');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static async getSearchIconDisplay() {
|
|
24
|
-
return $('[data-testid="mobile-global-header-search"]');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static async getGlobalHeaderMenu() {
|
|
28
|
-
return $('[data-testid="global-header-menu"]');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
static async getSearchBox() {
|
|
32
|
-
return $('[data-testid="ds-input_main-component"]');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export default DSGlobalHeaderCO;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import GroupBoxCO from './GroupBoxCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-3909 - MobileGroupBox:: Basic', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await GroupBoxCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('basic snapshot', async () => {
|
|
10
|
-
await (await GroupBoxCO.getGroupBoxHeader()).waitForDisplayed({ timeout: 5000 });
|
|
11
|
-
const snapshot = await browser.checkSnapshot(GroupBoxCO.snapshotPath());
|
|
12
|
-
await expect(snapshot).toEqual(0);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_GROUP_BOX } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class GroupBox extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_GROUP_BOX, 'basic');
|
|
6
|
-
|
|
7
|
-
static async getGroupBoxHeader() {
|
|
8
|
-
return $('div*=Group box title');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Snapshots
|
|
12
|
-
static snapshotPath(example = 'basic') {
|
|
13
|
-
return PageObject.getSnapshotPathBuilder('GroupBox', example, 'ds-mobile');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/* eslint-disable wdio/no-pause */
|
|
2
|
-
import InfiniteLoaderCO from './InfiniteLoaderCO';
|
|
3
|
-
|
|
4
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
5
|
-
describe('PUI-4353 - InfiniteLoader - display Loader', () => {
|
|
6
|
-
before('loading page', async () => {
|
|
7
|
-
const errorOnGo = await InfiniteLoaderCO.basic.go();
|
|
8
|
-
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
});
|
|
10
|
-
it('should display loader when scroll down', async () => {
|
|
11
|
-
const card7 = await InfiniteLoaderCO.getCard(7);
|
|
12
|
-
await card7.waitForDisplayed();
|
|
13
|
-
await card7.scrollIntoView();
|
|
14
|
-
const loaderIndicator = await InfiniteLoaderCO.getLoaderIndicator();
|
|
15
|
-
await loaderIndicator.waitForDisplayed();
|
|
16
|
-
await expect(loaderIndicator).toBeDisplayed();
|
|
17
|
-
});
|
|
18
|
-
it('should display more cards', async () => {
|
|
19
|
-
const card7 = await InfiniteLoaderCO.getCard(7);
|
|
20
|
-
await card7.waitForDisplayed();
|
|
21
|
-
await card7.scrollIntoView();
|
|
22
|
-
const card8 = await InfiniteLoaderCO.getCard(8);
|
|
23
|
-
await card8.waitForDisplayed();
|
|
24
|
-
await card8.scrollIntoView();
|
|
25
|
-
const card9 = await InfiniteLoaderCO.getCard(9);
|
|
26
|
-
await expect(card9).toBeDisplayed();
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
describe('PUI-8865 - InfiniteLoader - hasMoreItems prop', () => {
|
|
30
|
-
before('loading page', async () => {
|
|
31
|
-
const errorOnGo = await InfiniteLoaderCO.hasMoreItems.go();
|
|
32
|
-
if (errorOnGo) throw errorOnGo;
|
|
33
|
-
});
|
|
34
|
-
it('should display loader when scroll down', async () => {
|
|
35
|
-
const card7 = await InfiniteLoaderCO.getCard(7);
|
|
36
|
-
await card7.waitForDisplayed();
|
|
37
|
-
await card7.scrollIntoView();
|
|
38
|
-
const loaderIndicator = await InfiniteLoaderCO.getLoaderIndicator();
|
|
39
|
-
await expect(loaderIndicator).toBeDisplayed();
|
|
40
|
-
});
|
|
41
|
-
it('should display loader when scroll down - 2nd scroll', async () => {
|
|
42
|
-
await browser.pause(800);
|
|
43
|
-
const loaderIndicator = await InfiniteLoaderCO.getLoaderIndicator();
|
|
44
|
-
await loaderIndicator.waitForDisplayed({ reverse: true });
|
|
45
|
-
const card9 = await InfiniteLoaderCO.getCard(9);
|
|
46
|
-
await card9.waitForDisplayed();
|
|
47
|
-
await card9.scrollIntoView();
|
|
48
|
-
await expect(loaderIndicator).toBeDisplayed();
|
|
49
|
-
});
|
|
50
|
-
it('should not display loading indicator', async () => {
|
|
51
|
-
await browser.pause(800);
|
|
52
|
-
const loaderIndicator = await InfiniteLoaderCO.getLoaderIndicator();
|
|
53
|
-
await loaderIndicator.waitForDisplayed({ reverse: true });
|
|
54
|
-
const card10 = await InfiniteLoaderCO.getCard(10);
|
|
55
|
-
await card10.waitForDisplayed();
|
|
56
|
-
await card10.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
|
57
|
-
await expect(loaderIndicator).not.toBeDisplayed();
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// to improve, is not working as expected and with intermitent issues
|
|
62
|
-
// describe('PUI-4571 - InfiniteLoader - combine with swipe', () => {
|
|
63
|
-
// beforeEach('loading page', async () => {
|
|
64
|
-
// const errorOnGo = await InfiniteLoaderCO.basic.go();
|
|
65
|
-
// if (errorOnGo) throw errorOnGo;
|
|
66
|
-
// });
|
|
67
|
-
// it('scroll down and then swipe to refresh', async () => {
|
|
68
|
-
// InfiniteLoaderCO.getCard(7).waitForDisplayed();
|
|
69
|
-
// InfiniteLoaderCO.getCard(9).scrollIntoView();
|
|
70
|
-
// InfiniteLoaderCO.getLoaderIndicator().waitForDisplayed();
|
|
71
|
-
// expect(await InfiniteLoaderCO.getLoaderIndicator()).toBeDisplayedInViewport();
|
|
72
|
-
// expect(await $('div*=20')).toBeDisplayed();
|
|
73
|
-
// InfiniteLoaderCO.getCard(0).scrollIntoView();
|
|
74
|
-
// await browser.pause(500);
|
|
75
|
-
// Gestures.swipeDown();
|
|
76
|
-
// InfiniteLoaderCO.getLoaderBox().waitForDisplayed();
|
|
77
|
-
// expect(await InfiniteLoaderCO.getLoaderBox()).toBeDisplayedInViewport();
|
|
78
|
-
// });
|
|
79
|
-
// it('swipe to refresh and then scroll down', async () => {
|
|
80
|
-
// InfiniteLoaderCO.getCard(9).waitForDisplayed();
|
|
81
|
-
// Gestures.swipeDown();
|
|
82
|
-
// InfiniteLoaderCO.getLoaderBox().waitForDisplayed();
|
|
83
|
-
// expect(await InfiniteLoaderCO.getLoaderBox()).toBeDisplayedInViewport();
|
|
84
|
-
// InfiniteLoaderCO.getCard(9).scrollIntoView();
|
|
85
|
-
// InfiniteLoaderCO.getLoaderIndicator().waitForDisplayed();
|
|
86
|
-
// expect(await InfiniteLoaderCO.getLoaderIndicator()).toBeDisplayedInViewport();
|
|
87
|
-
// expect(await $('div*=20')).toBeDisplayed();
|
|
88
|
-
// });
|
|
89
|
-
// });
|
|
90
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-relative-packages
|
|
2
|
-
import { PATH_MOBILE_INFINITE_LOADER } from '../../paths';
|
|
3
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
|
-
|
|
5
|
-
export default class InfiniteLoader extends PageObject {
|
|
6
|
-
static basic = new Urlbuilder(PATH_MOBILE_INFINITE_LOADER, 'basic');
|
|
7
|
-
|
|
8
|
-
static conbineWithSwipe = new Urlbuilder(PATH_MOBILE_INFINITE_LOADER, 'combine-with-swipe');
|
|
9
|
-
|
|
10
|
-
static hasMoreItems = new Urlbuilder(PATH_MOBILE_INFINITE_LOADER, 'has-more-items');
|
|
11
|
-
|
|
12
|
-
// Selectors
|
|
13
|
-
static async getLoaderIndicator() {
|
|
14
|
-
return $('.opened');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static async getCard(index) {
|
|
18
|
-
return $$('[data-testid="card-title"]')[index];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static async getLoaderBox() {
|
|
22
|
-
return $('[data-testid="loader-box"]');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Snapshots
|
|
26
|
-
static snapshotPath(example = 'actions') {
|
|
27
|
-
return PageObject.getSnapshotPathBuilder('InfiniteLoader', example, 'ds-mobile');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import MATCO from './MobileActionToolbarCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('Mobile Action Toolbar', () => {
|
|
5
|
-
describe('ActionToolbar - no border', () => {
|
|
6
|
-
before('loading page', async () => {
|
|
7
|
-
const errorOnGo = await MATCO.noBorderUrl.go();
|
|
8
|
-
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
});
|
|
10
|
-
it('should display mobile action toolbar without border', async () => {
|
|
11
|
-
await (await MATCO.getTopContent()).waitForDisplayed({ timeout: 10000 });
|
|
12
|
-
const snapshot = await browser.checkSnapshot(MATCO.snapshotPath('no-border'));
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
describe('ActionToolbar - more items', () => {
|
|
17
|
-
before('loading page', async () => {
|
|
18
|
-
const errorOnGo = await MATCO.moreItemsUrl.go();
|
|
19
|
-
if (errorOnGo) throw errorOnGo;
|
|
20
|
-
});
|
|
21
|
-
it('should display mobile action toolbar with five buttons', async () => {
|
|
22
|
-
await (await MATCO.getTopContent()).waitForDisplayed({ timeout: 10000 });
|
|
23
|
-
const snapshot = await browser.checkSnapshot(MATCO.snapshotPath('more-items'));
|
|
24
|
-
await expect(snapshot).toEqual(0);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
describe('ActionToolbar - basic', () => {
|
|
28
|
-
before('loading page', async () => {
|
|
29
|
-
const errorOnGo = await MATCO.basicURL.go();
|
|
30
|
-
if (errorOnGo) throw errorOnGo;
|
|
31
|
-
});
|
|
32
|
-
it('should display mobile action toolbar basic', async () => {
|
|
33
|
-
await (await MATCO.getTopContent()).waitForDisplayed({ timeout: 10000 });
|
|
34
|
-
const snapshot = await browser.checkSnapshot(MATCO.snapshotPath('basic'));
|
|
35
|
-
await expect(snapshot).toEqual(0);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_ACTION_TOOLBAR } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class MobileActionToolbar extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_ACTION_TOOLBAR, 'basic');
|
|
6
|
-
|
|
7
|
-
static noBorderUrl = new Urlbuilder(PATH_MOBILE_ACTION_TOOLBAR, 'without-border');
|
|
8
|
-
|
|
9
|
-
static moreItemsUrl = new Urlbuilder(PATH_MOBILE_ACTION_TOOLBAR, 'more-items');
|
|
10
|
-
|
|
11
|
-
static async getTopContent() {
|
|
12
|
-
return $('div*=Top Content');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Snapshots
|
|
16
|
-
static snapshotPath(example = 'basic') {
|
|
17
|
-
return PageObject.getSnapshotPathBuilder('MobileActionToolbar', example, 'ds-mobile');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import MobileBannerCO from './MobileBannerCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-6716 - MobileBanner: types - visual test', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await MobileBannerCO.type.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should display all mobile banner types', async () => {
|
|
10
|
-
const container = await MobileBannerCO.getContainer(0);
|
|
11
|
-
await container.waitForDisplayed();
|
|
12
|
-
const snapshot = await browser.checkSnapshot(MobileBannerCO.snapshotPath('types'));
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
it('should close correctly info mobile banner', async () => {
|
|
16
|
-
const closeBtn = await MobileBannerCO.getCloseBtn(1);
|
|
17
|
-
await closeBtn.click();
|
|
18
|
-
await browser.pause(500);
|
|
19
|
-
const snapshot = await browser.checkSnapshot(MobileBannerCO.snapshotPath('one-closed'));
|
|
20
|
-
await expect(snapshot).toEqual(0);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_BANNER } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class MobileBanner extends PageObject {
|
|
5
|
-
static type = new Urlbuilder(PATH_MOBILE_BANNER, 'type');
|
|
6
|
-
|
|
7
|
-
static async getContainers() {
|
|
8
|
-
return $$('[data-testid="ds-mobile-banner-container"]');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static async getContainer(index) {
|
|
12
|
-
return (await this.getContainers())[index];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
static async getCloseBtn(index) {
|
|
16
|
-
return $$('[data-testid="ds-mobile-banner-close-button"]')[index];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Snapshots
|
|
20
|
-
static snapshotPath(example = 'with-props') {
|
|
21
|
-
return PageObject.getSnapshotPathBuilder('MobileBanner', example, 'ds-mobile-banner');
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import MobileCardCO from './MobileCardCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-4696 - MobileCard expand cards', () => {
|
|
5
|
-
// to be refactored in the future
|
|
6
|
-
// describe('Expand cards', () => {
|
|
7
|
-
// before('loading page', async () => {
|
|
8
|
-
// const errorOnGo = await MobileCardCO.expandableURL.go();
|
|
9
|
-
// if (errorOnGo) throw errorOnGo;
|
|
10
|
-
// });
|
|
11
|
-
// it('expands expandable touchable card', async () => {
|
|
12
|
-
// await (await MobileCardCO.expandCard(0)).waitForDisplayed();
|
|
13
|
-
// let cardContent = await MobileCardCO.getCardContent('111111');
|
|
14
|
-
// await expect(cardContent).not.toBeDisplayedInViewport();
|
|
15
|
-
// await (await MobileCardCO.expandCard(0)).click();
|
|
16
|
-
// cardContent = await MobileCardCO.getCardContent('111111');
|
|
17
|
-
// await expect(cardContent).toBeDisplayedInViewport();
|
|
18
|
-
// });
|
|
19
|
-
// });
|
|
20
|
-
describe('Expand cards with allowMultipleOpen prop', () => {
|
|
21
|
-
before('loading page', async () => {
|
|
22
|
-
const errorOnGo = await MobileCardCO.multiExpandableURL.go();
|
|
23
|
-
if (errorOnGo) throw errorOnGo;
|
|
24
|
-
});
|
|
25
|
-
it('expands multiple expandable touchable card', async () => {
|
|
26
|
-
await (await MobileCardCO.expandCard(0)).waitForDisplayed();
|
|
27
|
-
await (await MobileCardCO.expandCard(0)).click();
|
|
28
|
-
let cardContent = await MobileCardCO.getCardContent('215693');
|
|
29
|
-
await expect(cardContent).toBeDisplayedInViewport();
|
|
30
|
-
await (await MobileCardCO.expandCard(1)).click();
|
|
31
|
-
cardContent = await MobileCardCO.getCardContent('215693');
|
|
32
|
-
await expect(cardContent).toBeDisplayedInViewport();
|
|
33
|
-
cardContent = await MobileCardCO.getCardContent('215622');
|
|
34
|
-
await expect(cardContent).toBeDisplayedInViewport();
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
}
|