dimsum-e2e-tests 3.80.0-next.4 → 3.80.0-next.40
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 +164 -0
- package/DSStorybook/baseline.js +0 -186
- package/ds-accordion/DSAccordion.visual.spec.js +0 -14
- package/ds-accordion/DSAccordionCO.js +0 -2
- 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-banner/DSBanner.text-resize.visual.spec.js +2 -0
- package/ds-banner/DSBanner.text-wrapping.visual.spec.js +3 -6
- package/ds-banner/DSBanner.visual.spec.js +7 -8
- package/ds-banner/DSBannerCO.js +189 -4
- package/ds-banner/aria-and-role/DSBanner.aria-and-role.func.spec.js +113 -2
- package/ds-banner/ids/DSBanner.ids.func.spec.js +66 -0
- package/ds-banner/live-region-lang-dir/DSBanner.live-region-lang-dir.func.spec.js +54 -0
- package/ds-banner/slide-animation/DSBanner.slide-animation.func.spec.js +105 -0
- package/ds-banner/slots/DSBanner.slots.axe-core.func.spec.js +24 -0
- package/ds-banner/slots/DSBanner.slots.func.spec.js +13 -0
- package/ds-banner/slots/DSBanner.slots.visual.spec.js +3 -2
- package/ds-banner/title-element/DSBanner.title-element.func.spec.js +29 -0
- package/ds-chip/DSChip.axe-core.func.spec.js +0 -17
- package/ds-chip/DSChip.visual.spec.js +0 -22
- package/ds-chip/DSChipCO.js +0 -6
- package/ds-fast-list/DSFastListCO.js +37 -0
- package/ds-fast-list/basic/DSFastList.basic.axe-core.func.spec.js +28 -0
- package/ds-fast-list/basic/DSFastList.basic.visual.spec.js +23 -0
- package/ds-fast-list/scroll-to-index/DSFastList.scroll-to-index.func.spec.js +45 -0
- package/ds-indeterminate-progress-indicator/DSIndeterminateProgressIndicatorCO.js +4 -0
- package/ds-indeterminate-progress-indicator/accessible-name/DSIndeterminateProgressIndicator.accessible-name.func.spec.js +51 -0
- package/ds-leftnavigation/LeftNavigation.fullFeatures.axe-core.func.spec.js +37 -0
- package/ds-leftnavigation/LeftNavigation.isSkeleton.axe-core.func.spec.js +23 -0
- package/ds-leftnavigation/LeftNavigation.keepingItems.axe-core.func.spec.js +34 -0
- package/ds-leftnavigation/LeftNavigation.loadingIndicator.axe-core.func.spec.js +41 -0
- package/ds-leftnavigation/LeftNavigation.notificationBadge.axe-core.func.spec.js +21 -0
- package/ds-leftnavigation/LeftNavigation.searchBar.axe-core.func.spec.js +26 -0
- package/ds-leftnavigation/LeftNavigation.showCase.axe-core.func.spec.js +23 -0
- package/ds-leftnavigation/LeftNavigation.tooltip.axe-core.func.spec.js +28 -0
- package/ds-leftnavigation/LeftNavigation.wrappedText.axe-core.func.spec.js +27 -0
- package/ds-modal-slide/inside-dialog/ModalSlide.insideDialog.func.spec.js +45 -0
- package/ds-panel-header/DSPanelHeader.func.spec.js +24 -0
- package/ds-panel-header/DSPanelHeaderCO.js +17 -0
- 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/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +8 -5
- package/ds-progress-indicator/DSProgressIndicator.func.spec.js +31 -4
- package/ds-progress-indicator/DSProgressIndicator.visual.spec.js +14 -6
- package/ds-progress-indicator/DSProgressIndicatorCO.js +87 -9
- package/ds-progress-indicator/aria-contract/DSProgressIndicator.aria-contract.func.spec.js +104 -0
- package/ds-progress-indicator/slots/DSProgressIndicator.slots.axe-core.func.spec.js +31 -0
- package/ds-progress-indicator/slots/DSProgressIndicator.slots.func.spec.js +87 -0
- package/ds-progress-indicator/slots/DSProgressIndicator.slots.visual.spec.js +27 -0
- package/ds-progress-indicator/variant/DSProgressIndicator.single-bar-variant.func.spec.js +44 -0
- package/ds-progress-indicator/variant/DSProgressIndicator.single-bar-variant.visual.spec.js +19 -0
- package/ds-ribbon/DSRibbonCO.js +21 -0
- package/ds-ribbon/keyboard-accessible-row/DSRibbon.keyboard-accessible-row.visual.spec.js +40 -0
- package/ds-ribbon/wrap-columns/DSRibbon.wrap-columns.visual.spec.js +18 -0
- package/ds-shuttle-v2/load-more/DSShuttleV2.load-more.keyboard.func.spec.js +46 -17
- package/ds-slider-v2/DSSliderV2.axe-core.func.spec.js +21 -0
- package/ds-slider-v2/DSSliderV2.visual.spec.js +19 -1
- package/ds-slider-v2/DSSliderV2CO.js +6 -1
- package/ds-slider-v2/has-error/DSSliderV2.has-error.visual.spec.js +44 -0
- package/ds-slider-v2/interaction-states/DSSliderV2.interaction-states.visual.spec.js +53 -0
- package/ds-virtuallist/DSVirtualList.visual.spec.js +4 -5
- package/ds-virtuallist/DSVirtualListCO.js +28 -9
- package/ds-virtuallist/basic/DSVirtualList.basic.axe-core.func.spec.js +28 -0
- package/ds-virtuallist/scroll-to-index/DSVirtualList.scroll-to-index.func.spec.js +45 -0
- package/package.json +149 -149
- package/paths.js +3 -49
- package/ds-leftnavigation/LeftNavigation.axe-core.func.spec.js +0 -172
- 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
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import LeftNavCO from './LeftNavigationCO';
|
|
3
|
-
import { axeCoreCheck, mouseOver } from '../helpers';
|
|
4
|
-
|
|
5
|
-
if (
|
|
6
|
-
(!browser.capabilities['ice:options'].isPhone &&
|
|
7
|
-
!browser.capabilities['ice:options'].isTablet &&
|
|
8
|
-
browser.capabilities.browserName === 'Chrome') ||
|
|
9
|
-
browser.capabilities.browserName === 'chrome'
|
|
10
|
-
) {
|
|
11
|
-
describe('PUI-10670 - LeftNavigation: Axe-Core: Basic full features', () => {
|
|
12
|
-
before('loading page', async () => {
|
|
13
|
-
const errorOnGo = await LeftNavCO.fullFeatures.go();
|
|
14
|
-
if (errorOnGo) throw errorOnGo;
|
|
15
|
-
});
|
|
16
|
-
it('01: All collapsed (Section icons)', async () => {
|
|
17
|
-
const result = await axeCoreCheck();
|
|
18
|
-
expect(result.length).toBe(0);
|
|
19
|
-
});
|
|
20
|
-
it('02: Click Notifications and expand sections titles', async () => {
|
|
21
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
22
|
-
const result = await axeCoreCheck();
|
|
23
|
-
expect(result.length).toBe(0);
|
|
24
|
-
});
|
|
25
|
-
it('03: Click and expand Notifications to have items with subsections', async () => {
|
|
26
|
-
await (await LeftNavCO.leftNavItem(0)).click();
|
|
27
|
-
const result = await axeCoreCheck();
|
|
28
|
-
expect(result.length).toBe(0);
|
|
29
|
-
});
|
|
30
|
-
it('04: Collapse Notifications and open forms with plain items', async () => {
|
|
31
|
-
await (await LeftNavCO.leftChevron()).click();
|
|
32
|
-
await (await LeftNavCO.leftNavItem(2)).click();
|
|
33
|
-
const result = await axeCoreCheck();
|
|
34
|
-
expect(result.length).toBe(0);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
describe('PUI-10671 - LeftNavigation, Axe-Core: Loading indicator', () => {
|
|
38
|
-
before('loading page', async () => {
|
|
39
|
-
const errorOnGo = await LeftNavCO.loading.go();
|
|
40
|
-
if (errorOnGo) throw errorOnGo;
|
|
41
|
-
});
|
|
42
|
-
it('01: loading indicator in leftnav closed', async () => {
|
|
43
|
-
const loadingIndicator = await LeftNavCO.loadingIndicator();
|
|
44
|
-
await loadingIndicator.waitForDisplayed();
|
|
45
|
-
const result = await axeCoreCheck();
|
|
46
|
-
expect(result.length).toBe(0);
|
|
47
|
-
});
|
|
48
|
-
it('02: loading indicator with tooltip (leftnav closed)', async () => {
|
|
49
|
-
const loadingIndicator = await LeftNavCO.loadingIndicator();
|
|
50
|
-
await mouseOver(loadingIndicator);
|
|
51
|
-
const loadingIndicatorTooltip = await LeftNavCO.loadingIndicatorTooltip();
|
|
52
|
-
await loadingIndicatorTooltip.waitForDisplayed();
|
|
53
|
-
const result = await axeCoreCheck();
|
|
54
|
-
expect(result.length).toBe(0);
|
|
55
|
-
});
|
|
56
|
-
it('03: loading indicator in leftnav opened', async () => {
|
|
57
|
-
const loadingIndicator = await LeftNavCO.loadingIndicator();
|
|
58
|
-
await loadingIndicator.waitForDisplayed();
|
|
59
|
-
const footerBtn = await LeftNavCO.footerBtn();
|
|
60
|
-
const footerLabel = await LeftNavCO.footerLabel();
|
|
61
|
-
await footerBtn.click();
|
|
62
|
-
await footerLabel.waitForDisplayed();
|
|
63
|
-
const result = await axeCoreCheck();
|
|
64
|
-
expect(result.length).toBe(0);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('PUI-10672 - LeftNavigation, Axe-Core: Tooltip -func', () => {
|
|
68
|
-
before('loading page', async () => {
|
|
69
|
-
const errorOnGo = await LeftNavCO.fullFeatures.go();
|
|
70
|
-
if (errorOnGo) throw errorOnGo;
|
|
71
|
-
});
|
|
72
|
-
it('01: should display tooltip', async () => {
|
|
73
|
-
const notiItem = await LeftNavCO.leftNavItem(0);
|
|
74
|
-
await notiItem.click();
|
|
75
|
-
await notiItem.click();
|
|
76
|
-
const truncItem = await LeftNavCO.getTruncatedText(0);
|
|
77
|
-
await mouseOver(truncItem);
|
|
78
|
-
const tooltip = await LeftNavCO.getTooltip();
|
|
79
|
-
await tooltip.waitForDisplayed();
|
|
80
|
-
const result = await axeCoreCheck();
|
|
81
|
-
expect(result.length).toBe(0);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
describe('PUI-10673 - LeftNavigation, Axe-Core: Notification badge', () => {
|
|
85
|
-
before('loading page', async () => {
|
|
86
|
-
const errorOnGo = await LeftNavCO.notificationBadgingURL.go();
|
|
87
|
-
if (errorOnGo) throw errorOnGo;
|
|
88
|
-
});
|
|
89
|
-
it('01: should display integrated notification badge combinations', async () => {
|
|
90
|
-
const result = await axeCoreCheck();
|
|
91
|
-
expect(result.length).toBe(0);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe('PUI-10674 - LeftNavigation: Axe-Core: Keeping items', () => {
|
|
95
|
-
before('loading page', async () => {
|
|
96
|
-
const errorOnGo = await LeftNavCO.keepingItems.go();
|
|
97
|
-
if (errorOnGo) throw errorOnGo;
|
|
98
|
-
});
|
|
99
|
-
it('01: should expand notifications and keep the remaining sections', async () => {
|
|
100
|
-
const subItemBtn = await LeftNavCO.getSubItemBtn();
|
|
101
|
-
await subItemBtn.click();
|
|
102
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
103
|
-
const itemLabel = await LeftNavCO.itemLabel(0);
|
|
104
|
-
await itemLabel.waitForDisplayed();
|
|
105
|
-
const notificationHeader = await LeftNavCO.leftNavItem(0);
|
|
106
|
-
await notificationHeader.click();
|
|
107
|
-
const result = await axeCoreCheck();
|
|
108
|
-
expect(result.length).toBe(0);
|
|
109
|
-
});
|
|
110
|
-
it('02: should scroll down to display the remaining sections', async () => {
|
|
111
|
-
const menuItemBtn = await LeftNavCO.getMenuItemBtn();
|
|
112
|
-
await menuItemBtn.click();
|
|
113
|
-
const result = await axeCoreCheck();
|
|
114
|
-
expect(result.length).toBe(0);
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
describe('PUI-10676 - LeftNavigation, Axe-Core: Wrapped text -func', () => {
|
|
118
|
-
before('loading page', async () => {
|
|
119
|
-
const errorOnGo = await LeftNavCO.wrapped.go();
|
|
120
|
-
if (errorOnGo) throw errorOnGo;
|
|
121
|
-
});
|
|
122
|
-
it('01: should display truncated sections', async () => {
|
|
123
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
124
|
-
const result = await axeCoreCheck();
|
|
125
|
-
expect(result.length).toBe(0);
|
|
126
|
-
});
|
|
127
|
-
it('01: should display truncated items', async () => {
|
|
128
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
129
|
-
const result = await axeCoreCheck();
|
|
130
|
-
expect(result.length).toBe(0);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
describe('PUI-10677 - LeftNavigation, Axe-Core: Search bar', () => {
|
|
134
|
-
before('loading page', async () => {
|
|
135
|
-
const errorOnGo = await LeftNavCO.fullFeatures.go();
|
|
136
|
-
if (errorOnGo) throw errorOnGo;
|
|
137
|
-
});
|
|
138
|
-
it('01: Trigger search button and check axe scan', async () => {
|
|
139
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
140
|
-
await (await LeftNavCO.leftNavItem(0)).click();
|
|
141
|
-
const searchButton = await LeftNavCO.getIconButtonByIndex(0);
|
|
142
|
-
await searchButton.waitForDisplayed();
|
|
143
|
-
await searchButton.click();
|
|
144
|
-
const result = await axeCoreCheck();
|
|
145
|
-
expect(result.length).toBe(0);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
describe('PUI-10250 - LeftNavigation, Axe-Core: Showcase, more usecases', () => {
|
|
149
|
-
before('loading page', async () => {
|
|
150
|
-
const errorOnGo = await LeftNavCO.showcaseURL.go();
|
|
151
|
-
if (errorOnGo) throw errorOnGo;
|
|
152
|
-
});
|
|
153
|
-
it('01: should display usecase whocase and check axe scan', async () => {
|
|
154
|
-
await (await LeftNavCO.leftComponent(0)).click();
|
|
155
|
-
await (await LeftNavCO.leftNavItem(0)).click();
|
|
156
|
-
const result = await axeCoreCheck();
|
|
157
|
-
expect(result.length).toBe(0);
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
describe('PUI-11620 - LeftNavigation, isSkeleton prop -AxeCore Test', () => {
|
|
161
|
-
before('loading page', async () => {
|
|
162
|
-
const errorOnGo = await LeftNavCO.isSkeletonURL.go();
|
|
163
|
-
if (errorOnGo) throw errorOnGo;
|
|
164
|
-
});
|
|
165
|
-
it('01: should correctly display the leftnav wit isSkeleton and pass axe-core scan', async () => {
|
|
166
|
-
const skeleton = await LeftNavCO.getSkeletonByIndex();
|
|
167
|
-
await skeleton.waitForDisplayed();
|
|
168
|
-
const result = await axeCoreCheck();
|
|
169
|
-
expect(result.length).toBe(0);
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
}
|
|
@@ -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
|
-
}
|