dimsum-e2e-tests 3.80.0-next.4 → 3.80.0-next.41
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 +168 -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-menu-button/DSMenuButtonCO.js +18 -0
- package/ds-menu-button/activable/DSMenuButton.activableMenuItem.keyboardnav.func.spec.js +10 -8
- package/ds-menu-button/submenu/DSMenuButton.subMenuItem.keyboardnav.func.spec.js +33 -10
- 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,19 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_PAGE_LIST, PATH_E2E_MOBILE_PAGELIST } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class PageList extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_PAGE_LIST, 'basic');
|
|
6
|
-
|
|
7
|
-
static withoutFilterbar = new Urlbuilder(PATH_E2E_MOBILE_PAGELIST, 'without-filterbar');
|
|
8
|
-
|
|
9
|
-
static pageList = new Urlbuilder(PATH_MOBILE_PAGE_LIST, 'page-list-example');
|
|
10
|
-
|
|
11
|
-
static async getTitle() {
|
|
12
|
-
return $('span*=pageTitle');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Snapshots
|
|
16
|
-
static snapshotPath(example = 'basic') {
|
|
17
|
-
return PageObject.getSnapshotPathBuilder('PageList', example, 'ds-mobile');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import PageSummaryCO from './PageSummaryCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-3115 - PageSummary', () => {
|
|
5
|
-
beforeEach('loading page', async () => {
|
|
6
|
-
const errorOnGo = await PageSummaryCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('check visual portrait', async () => {
|
|
10
|
-
const snapshot = await browser.checkSnapshot(PageSummaryCO.snapshotPath('portrait'));
|
|
11
|
-
await expect(snapshot).toEqual(0);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('check visual landscape', async () => {
|
|
15
|
-
await browser.setOrientation('LANDSCAPE');
|
|
16
|
-
const snapshot = await browser.checkSnapshot(PageSummaryCO.snapshotPath('landscape'));
|
|
17
|
-
await expect(snapshot).toEqual(0);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_PAGE_SUMMARY } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class PageSummary extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_PAGE_SUMMARY, 'basic');
|
|
6
|
-
|
|
7
|
-
// Snapshots
|
|
8
|
-
static snapshotPath(example = 'basic') {
|
|
9
|
-
return PageObject.getSnapshotPathBuilder('PageSummary', example, 'ds-mobile');
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import SwipeToRefresh from './SwipeToRefreshCO';
|
|
2
|
-
import Gestures from '../../gestures';
|
|
3
|
-
|
|
4
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
5
|
-
describe('PUI-4329 - SwipeToRefresh - display loader', () => {
|
|
6
|
-
beforeEach('loading page', async () => {
|
|
7
|
-
const errorOnGo = await SwipeToRefresh.withMobileCards.go();
|
|
8
|
-
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
});
|
|
10
|
-
it('should display loader when swipe down', async () => {
|
|
11
|
-
await (await SwipeToRefresh.getCardTitle(0)).waitForDisplayed();
|
|
12
|
-
await Gestures.swipeDown();
|
|
13
|
-
const loaderBox = await SwipeToRefresh.getLoaderBox();
|
|
14
|
-
await expect(loaderBox).toBeDisplayedInViewport();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
describe('PUI-4439 - SwipeToRefresh - refresh only on the top', () => {
|
|
18
|
-
it('should not display loader when is not on the top', async () => {
|
|
19
|
-
await (await SwipeToRefresh.getCardTitle(0)).waitForDisplayed();
|
|
20
|
-
await (await SwipeToRefresh.getCardTitle(15)).scrollIntoView();
|
|
21
|
-
await Gestures.swipeDown();
|
|
22
|
-
const loaderBox = await SwipeToRefresh.getLoaderBox();
|
|
23
|
-
await expect(loaderBox).not.toBeDisplayedInViewport();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-unresolved
|
|
2
|
-
import { PATH_MOBILE_SWIPE_TO_REFRESH } from '../../paths';
|
|
3
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
4
|
-
|
|
5
|
-
export default class SwipeToRefresh extends PageObject {
|
|
6
|
-
static withMobileCards = new Urlbuilder(PATH_MOBILE_SWIPE_TO_REFRESH, 'with-mobile-cards');
|
|
7
|
-
|
|
8
|
-
static async getCardTitle(index) {
|
|
9
|
-
return $$('[data-testid="card-title"]')[index];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static async getLoaderBox() {
|
|
13
|
-
return $('[data-testid="loader-box"]');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Snapshots
|
|
17
|
-
static snapshotPath(example = 'basic') {
|
|
18
|
-
return PageObject.getSnapshotPathBuilder('SwipeToRefresh', example, 'ds-mobile');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import TabsCO from './TabsCO';
|
|
2
|
-
import Gestures, { REL_SWIPE_DIRECTION } from '../../gestures';
|
|
3
|
-
|
|
4
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
5
|
-
describe('PUI-3080 - Mobile Tabs - visual tests', () => {
|
|
6
|
-
describe('Mobile Tabs, tab1 active', () => {
|
|
7
|
-
before('loading page', async () => {
|
|
8
|
-
const errorOnGo = await TabsCO.basicURL.go();
|
|
9
|
-
if (errorOnGo) throw errorOnGo;
|
|
10
|
-
});
|
|
11
|
-
it('check simple render', async () => {
|
|
12
|
-
const tab = await TabsCO.getTab1();
|
|
13
|
-
await expect(tab).toBeDisplayed();
|
|
14
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('active-tab1'));
|
|
15
|
-
await expect(snapshot).toEqual(0);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('Mobile Tabs, tab2 active', () => {
|
|
19
|
-
before('loading page', async () => {
|
|
20
|
-
const errorOnGo = await TabsCO.secondTabURL.go();
|
|
21
|
-
if (errorOnGo) throw errorOnGo;
|
|
22
|
-
});
|
|
23
|
-
it('move to second tab', async () => {
|
|
24
|
-
const tab = await TabsCO.getTab2();
|
|
25
|
-
await expect(tab).toBeDisplayed();
|
|
26
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('active-tab2'));
|
|
27
|
-
await expect(snapshot).toEqual(0);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
describe('Mobile Tabs, move to first tab', () => {
|
|
31
|
-
before('loading page', async () => {
|
|
32
|
-
const errorOnGo = await TabsCO.secondTabURL.go();
|
|
33
|
-
if (errorOnGo) throw errorOnGo;
|
|
34
|
-
});
|
|
35
|
-
it('move to first tab', async () => {
|
|
36
|
-
const tab2 = await TabsCO.getTab2();
|
|
37
|
-
await expect(tab2).toBeDisplayed();
|
|
38
|
-
await (await TabsCO.getTab1()).click();
|
|
39
|
-
const tab1 = await TabsCO.getTab1();
|
|
40
|
-
await expect(tab1).toBeDisplayed();
|
|
41
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('move-to-again-first-tab'));
|
|
42
|
-
await expect(snapshot).toEqual(0);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
describe('PUI-5703 - Mobile Tabs, flexible', () => {
|
|
47
|
-
before('loading page', async () => {
|
|
48
|
-
const errorOnGo = await TabsCO.mobileFlexible.go();
|
|
49
|
-
if (errorOnGo) throw errorOnGo;
|
|
50
|
-
});
|
|
51
|
-
it('should display gradient', async () => {
|
|
52
|
-
const tab = await TabsCO.getTab2();
|
|
53
|
-
await expect(tab).toBeDisplayed();
|
|
54
|
-
await (await TabsCO.getTab1()).waitForDisplayed({ timeout: 5000 });
|
|
55
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('mobile-flexible'));
|
|
56
|
-
await expect(snapshot).toEqual(0);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
describe('PUI-8351 - Mobile Tabs, flexible', () => {
|
|
60
|
-
before('loading page', async () => {
|
|
61
|
-
const errorOnGo = await TabsCO.mobileFixed.go();
|
|
62
|
-
if (errorOnGo) throw errorOnGo;
|
|
63
|
-
});
|
|
64
|
-
it('should display fixed tabs with equal width populating the full viewport width', async () => {
|
|
65
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('mobile-fixed'));
|
|
66
|
-
await expect(snapshot).toEqual(0);
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (driver.isAndroid) {
|
|
73
|
-
describe('PUI-5948 - MobileTabs - Right margin at the end of the tabs - Visual Test', () => {
|
|
74
|
-
before('loading page', async () => {
|
|
75
|
-
const errorOnGo = await TabsCO.mobileFlexible.go();
|
|
76
|
-
if (errorOnGo) throw errorOnGo;
|
|
77
|
-
});
|
|
78
|
-
it('should display the right margin when reaching the end', async () => {
|
|
79
|
-
const tabList = await TabsCO.getTabList();
|
|
80
|
-
const targetTab = await TabsCO.getTab(6);
|
|
81
|
-
await Gestures.swipeUntilDisplayed({
|
|
82
|
-
swipeElement: tabList,
|
|
83
|
-
targetElement: targetTab,
|
|
84
|
-
swipeDirection: REL_SWIPE_DIRECTION.left,
|
|
85
|
-
extraSwipes: 2,
|
|
86
|
-
});
|
|
87
|
-
const snapshot = await browser.checkSnapshot(TabsCO.snapshotPath('mobile-flexible-right-margin'));
|
|
88
|
-
await expect(snapshot).toEqual(0);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}
|
package/ds-mobile/Tabs/TabsCO.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_TABS } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class Tabs extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_TABS, 'basic');
|
|
6
|
-
|
|
7
|
-
static secondTabURL = new Urlbuilder(PATH_MOBILE_TABS, 'second-tab-active');
|
|
8
|
-
|
|
9
|
-
static mobileFlexible = new Urlbuilder(PATH_MOBILE_TABS, 'flexible-tabs');
|
|
10
|
-
|
|
11
|
-
static mobileFixed = new Urlbuilder(PATH_MOBILE_TABS, 'fixed-tabs');
|
|
12
|
-
|
|
13
|
-
static async getTab1() {
|
|
14
|
-
return $('#tab1-label');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static async getTab2() {
|
|
18
|
-
return $('#tab2-label');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static async getTab(tab = 0) {
|
|
22
|
-
return $(`#tab${tab}-label`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static async getTabList() {
|
|
26
|
-
return $('[data-testid="tab-list"]');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static async tabTextContent(text) {
|
|
30
|
-
return $(`span*=${text}`);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Snapshots
|
|
34
|
-
static snapshotPath(example = 'basic') {
|
|
35
|
-
return PageObject.getSnapshotPathBuilder('Tabs', example, 'ds-mobile');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import TooltipCO from './TooltipCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-6084 - MobileTooltip, Tap to close', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await TooltipCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should close the tooltip', async () => {
|
|
10
|
-
await (await TooltipCO.getLeftIconButton()).click();
|
|
11
|
-
const tooltip = await TooltipCO.getTooltipWrapper();
|
|
12
|
-
await tooltip.waitForDisplayed({ timeout: 2000 });
|
|
13
|
-
await (await TooltipCO.getRightIconButton()).click();
|
|
14
|
-
await expect(tooltip).not.toBeDisplayed();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import TooltipCO from './TooltipCO';
|
|
2
|
-
|
|
3
|
-
if (browser.capabilities['ice:options'].isPhone) {
|
|
4
|
-
describe('PUI-6083 - MobileTooltip, Tooltip - Visual Test', () => {
|
|
5
|
-
before('loading page', async () => {
|
|
6
|
-
const errorOnGo = await TooltipCO.basicURL.go();
|
|
7
|
-
if (errorOnGo) throw errorOnGo;
|
|
8
|
-
});
|
|
9
|
-
it('should display tooltip', async () => {
|
|
10
|
-
await (await TooltipCO.getLeftIconButton()).click();
|
|
11
|
-
await (await TooltipCO.getTooltipWrapper()).waitForDisplayed({ timeout: 2000 });
|
|
12
|
-
const snapshot = await browser.checkSnapshot(TooltipCO.snapshotPath('tooltip'));
|
|
13
|
-
await expect(snapshot).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PATH_MOBILE_TOOLTIP } from '../../paths';
|
|
2
|
-
import { PageObject, Urlbuilder } from '../helpers';
|
|
3
|
-
|
|
4
|
-
export default class TooltipCO extends PageObject {
|
|
5
|
-
static basicURL = new Urlbuilder(PATH_MOBILE_TOOLTIP, 'basic');
|
|
6
|
-
|
|
7
|
-
static async getTooltipWrapper() {
|
|
8
|
-
return $('[data-testid="ds-tooltip-v3-tooltip-text-wrapper"]');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static async getLeftIconButton() {
|
|
12
|
-
return $('[data-testid="left-icon-button"]');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
static async getRightIconButton() {
|
|
16
|
-
return $('[data-testid="right-icon-button"]');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Snapshots
|
|
20
|
-
static snapshotPath(example = 'basic') {
|
|
21
|
-
return PageObject.getSnapshotPathBuilder('MobileTooltip', example, 'ds-mobile');
|
|
22
|
-
}
|
|
23
|
-
}
|