dimsum-e2e-tests 3.80.0-next.2 → 3.80.0-next.20

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/ds-apppicker/aria-disabled/DSAppPicker.aria-disabled.visual.spec.js +14 -1
  3. package/ds-apppicker/basic/DSAppPicker.basic.visual.spec.js +12 -7
  4. package/ds-fast-list/DSFastListCO.js +37 -0
  5. package/ds-fast-list/basic/DSFastList.basic.axe-core.func.spec.js +28 -0
  6. package/ds-fast-list/basic/DSFastList.basic.visual.spec.js +23 -0
  7. package/ds-fast-list/scroll-to-index/DSFastList.scroll-to-index.func.spec.js +45 -0
  8. package/ds-pills-v2/DSPillsV2CO.js +53 -1
  9. package/ds-pills-v2/pitfalls/DSPills.inputPill.func.spec.js +26 -0
  10. package/ds-pills-v2/pitfalls/DSPills.inputWithFormItemBlockURL.axe-core.func.spec.js +38 -0
  11. package/ds-pills-v2/pitfalls/DSPills.inputWithFormItemBlockURL.func.spec.js +72 -0
  12. package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +8 -5
  13. package/ds-progress-indicator/DSProgressIndicator.func.spec.js +18 -4
  14. package/ds-progress-indicator/DSProgressIndicator.visual.spec.js +14 -6
  15. package/ds-progress-indicator/DSProgressIndicatorCO.js +80 -9
  16. package/ds-progress-indicator/aria-contract/DSProgressIndicator.aria-contract.func.spec.js +104 -0
  17. package/ds-progress-indicator/slots/DSProgressIndicator.slots.axe-core.func.spec.js +31 -0
  18. package/ds-progress-indicator/slots/DSProgressIndicator.slots.func.spec.js +87 -0
  19. package/ds-progress-indicator/slots/DSProgressIndicator.slots.visual.spec.js +26 -0
  20. package/ds-virtuallist/DSVirtualList.visual.spec.js +4 -5
  21. package/ds-virtuallist/DSVirtualListCO.js +28 -9
  22. package/ds-virtuallist/basic/DSVirtualList.basic.axe-core.func.spec.js +28 -0
  23. package/ds-virtuallist/scroll-to-index/DSVirtualList.scroll-to-index.func.spec.js +45 -0
  24. package/package.json +148 -149
  25. package/paths.js +3 -49
  26. package/ds-mobile/Accordion/DSAccordion.visual.spec.js +0 -33
  27. package/ds-mobile/Accordion/DSAccordionCO.js +0 -37
  28. package/ds-mobile/CategoryBox/CategoryBox.visual.spec.js +0 -18
  29. package/ds-mobile/CategoryBox/CategoryBoxCO.js +0 -17
  30. package/ds-mobile/CollectionBox/CollectionBox.visual.spec.js +0 -16
  31. package/ds-mobile/CollectionBox/CollectionBoxCO.js +0 -15
  32. package/ds-mobile/GlobalHeader/DSGlobalHeader.visual.spec.js +0 -55
  33. package/ds-mobile/GlobalHeader/DSGlobalHeaderCO.js +0 -36
  34. package/ds-mobile/GroupBox/GroupBox.visual.spec.js +0 -15
  35. package/ds-mobile/GroupBox/GroupBoxCO.js +0 -15
  36. package/ds-mobile/InfiniteLoader/InfiniteLoader.func.spec.js +0 -90
  37. package/ds-mobile/InfiniteLoader/InfiniteLoaderCO.js +0 -29
  38. package/ds-mobile/MobileActionToolbar/MobileActionToolbar.visual.spec.js +0 -39
  39. package/ds-mobile/MobileActionToolbar/MobileActionToolbarCO.js +0 -19
  40. package/ds-mobile/MobileBanner/MobileBanner.visual.spec.js +0 -23
  41. package/ds-mobile/MobileBanner/MobileBannerCO.js +0 -23
  42. package/ds-mobile/MobileCard/Card.func.spec.js +0 -38
  43. package/ds-mobile/MobileCard/Card.visual.spec.js +0 -103
  44. package/ds-mobile/MobileCard/MobileCardCO.js +0 -42
  45. package/ds-mobile/MobileContextMenu/MobileContextMenu.func.spec.js +0 -88
  46. package/ds-mobile/MobileContextMenu/MobileContextMenu.visual.spec.js +0 -31
  47. package/ds-mobile/MobileContextMenu/MobileContextMenuCO.js +0 -72
  48. package/ds-mobile/MobileDatePicker/MobileDatePicker.func.spec.js +0 -15
  49. package/ds-mobile/MobileDatePicker/MobileDatePicker.visual.spec.js +0 -15
  50. package/ds-mobile/MobileDatePicker/MobileDatePickerCO.js +0 -35
  51. package/ds-mobile/MobileDropdownMenu/MobileDropdownMenu.func.spec.js +0 -38
  52. package/ds-mobile/MobileDropdownMenu/MobileDropdownMenu.visual.spec.js +0 -16
  53. package/ds-mobile/MobileDropdownMenu/MobileDropdownMenuCO.js +0 -37
  54. package/ds-mobile/MobileEmptyState/MobileEmptyState.visual.spec.js +0 -15
  55. package/ds-mobile/MobileEmptyState/MobileEmptyStateCO.js +0 -14
  56. package/ds-mobile/MobileFilterbar/MobileFilterbar.visual.spec.js +0 -39
  57. package/ds-mobile/MobileFilterbar/MobileFilterbarCO.js +0 -19
  58. package/ds-mobile/MobileFooter/MobileFooter.func.spec.js +0 -26
  59. package/ds-mobile/MobileFooter/MobileFooter.visual.spec.js +0 -51
  60. package/ds-mobile/MobileFooter/MobileFooterCO.js +0 -27
  61. package/ds-mobile/MobileListItem/MobileListItem.visual.spec.js +0 -56
  62. package/ds-mobile/MobileListItem/MobileListItemCO.js +0 -19
  63. package/ds-mobile/MobileLoadingPage/MobileLoadingPage.visual.spec.js +0 -37
  64. package/ds-mobile/MobileLoadingPage/MobileLoadingPageCO.js +0 -23
  65. package/ds-mobile/MobilePageHeader/MobilePageHeader.func.spec.js +0 -22
  66. package/ds-mobile/MobilePageHeader/MobilePageHeader.visual.spec.js +0 -135
  67. package/ds-mobile/MobilePageHeader/MobilePageHeaderCO.js +0 -67
  68. package/ds-mobile/MobileSelectList/MobileSelectList.visual.spec.js +0 -56
  69. package/ds-mobile/MobileSelectList/MobileSelectListCO.js +0 -21
  70. package/ds-mobile/MobileSeparator/MobileSeparator.visual.spec.js +0 -28
  71. package/ds-mobile/MobileSeparator/MobileSeparatorCO.js +0 -17
  72. package/ds-mobile/MobileTimePicker/MobileTimePickerCO.js +0 -41
  73. package/ds-mobile/Modal/MobileModal.visual.spec.js +0 -56
  74. package/ds-mobile/Modal/MobileModalCO.js +0 -28
  75. package/ds-mobile/PageFilter/PageFilter.visual.spec.js +0 -46
  76. package/ds-mobile/PageFilter/PageFilterCO.js +0 -19
  77. package/ds-mobile/PageForm/PageForm.visual.spec.js +0 -14
  78. package/ds-mobile/PageForm/PageFormCO.js +0 -11
  79. package/ds-mobile/PageList/PageList.visual.spec.js +0 -31
  80. package/ds-mobile/PageList/PageListCO.js +0 -19
  81. package/ds-mobile/PageSummary/PageSummary.visual.spec.js +0 -20
  82. package/ds-mobile/PageSummary/PageSummaryCO.js +0 -11
  83. package/ds-mobile/SwipeToRefresh/SwipeToRefresh.func.spec.js +0 -26
  84. package/ds-mobile/SwipeToRefresh/SwipeToRefreshCO.js +0 -20
  85. package/ds-mobile/Tabs/MobileTabs.visual.spec.js +0 -91
  86. package/ds-mobile/Tabs/TabsCO.js +0 -37
  87. package/ds-mobile/Tooltip/MobileTooltip.func.spec.js +0 -17
  88. package/ds-mobile/Tooltip/MobileTooltip.visual.spec.js +0 -16
  89. package/ds-mobile/Tooltip/TooltipCO.js +0 -23
  90. package/ds-mobile/helpers.js +0 -7
@@ -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
- }
@@ -1,103 +0,0 @@
1
- import MobileCardCO from './MobileCardCO';
2
-
3
- if (browser.capabilities['ice:options'].isPhone) {
4
- describe('PUI-4152 - MobileCard::', () => {
5
- describe('mobile card with props', () => {
6
- before('loading page', async () => {
7
- const errorOnGo = await MobileCardCO.withPropsURL.go();
8
- if (errorOnGo) throw errorOnGo;
9
- });
10
- it('should display mobile card with props', async () => {
11
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
12
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('with-props'));
13
- await expect(snapshot).toEqual(0);
14
- });
15
- });
16
- describe('mobile car with small height', () => {
17
- before('loading page', async () => {
18
- const errorOnGo = await MobileCardCO.smallHeightURL.go();
19
- if (errorOnGo) throw errorOnGo;
20
- });
21
- it('should display mobile card with small height', async () => {
22
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
23
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('small-height'));
24
- await expect(snapshot).toEqual(0);
25
- });
26
- });
27
- describe('mobile card group', () => {
28
- before('loading page', async () => {
29
- const errorOnGo = await MobileCardCO.cardGroupURL.go();
30
- if (errorOnGo) throw errorOnGo;
31
- });
32
- it('should display mobile card group', async () => {
33
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
34
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('card-group'));
35
- await expect(snapshot).toEqual(0);
36
- });
37
- });
38
- describe('mobile card group with no title', () => {
39
- before('loading page', async () => {
40
- const errorOnGo = await MobileCardCO.cardGroupNoTitleURL.go();
41
- if (errorOnGo) throw errorOnGo;
42
- });
43
-
44
- it('should display mobile card group with no title', async () => {
45
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
46
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('card-group-no-title'));
47
- await expect(snapshot).toEqual(0);
48
- });
49
- });
50
-
51
- describe('mobile card with details, subtext and props', () => {
52
- before('loading page', async () => {
53
- const errorOnGo = await MobileCardCO.withDetailsURL.go();
54
- if (errorOnGo) throw errorOnGo;
55
- });
56
- it('should display mobile card with details, subtext and props', async () => {
57
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
58
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('with-details-subtext-and-props'));
59
- await expect(snapshot).toEqual(0);
60
- });
61
- });
62
- describe('mobile card with icons', () => {
63
- before('loading page', async () => {
64
- const errorOnGo = await MobileCardCO.withIconsURL.go();
65
- if (errorOnGo) throw errorOnGo;
66
- });
67
- it('should display mobile card with icons', async () => {
68
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
69
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('with-icons'));
70
- await expect(snapshot).toEqual(0);
71
- });
72
- });
73
- describe('MobileCard:: Single Expandable', () => {
74
- before('loading page', async () => {
75
- const errorOnGo = await MobileCardCO.expandableURL.go();
76
- if (errorOnGo) throw errorOnGo;
77
- });
78
- it('should display cards expanded', async () => {
79
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
80
- await (await MobileCardCO.expandCard(0)).click();
81
- await (await MobileCardCO.getCardContent('111111')).waitForDisplayed();
82
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('single-expandable'));
83
- await expect(snapshot).toEqual(0);
84
- });
85
- });
86
-
87
- describe('MobileCard:: Multi Expandable', () => {
88
- before('loading page', async () => {
89
- const errorOnGo = await MobileCardCO.multiExpandableURL.go();
90
- if (errorOnGo) throw errorOnGo;
91
- });
92
- it('should display multiple cards expanded', async () => {
93
- await (await MobileCardCO.getCardTitle()).waitForDisplayed();
94
- await (await MobileCardCO.expandCard(1)).click();
95
- await (await MobileCardCO.getCardContent('215622')).waitForDisplayed();
96
- await (await MobileCardCO.expandCard(0)).click();
97
- await (await MobileCardCO.getCardContent('215693')).waitForDisplayed();
98
- const snapshot = await browser.checkSnapshot(MobileCardCO.snapshotPath('expandable-multi'));
99
- await expect(snapshot).toEqual(0);
100
- });
101
- });
102
- });
103
- }
@@ -1,42 +0,0 @@
1
- import { PATH_MOBILE_CARD, PATH_E2E_MOBILE_CARD } from '../../paths';
2
- import { PageObject, Urlbuilder } from '../helpers';
3
-
4
- export const knobs = {
5
- allowMultipleOpen: 'knob-allowMultipleOpen',
6
- };
7
- export default class MobileCard extends PageObject {
8
- static withPropsURL = new Urlbuilder(PATH_MOBILE_CARD, 'with-props');
9
-
10
- static expandableTouchableURL = new Urlbuilder(PATH_E2E_MOBILE_CARD, 'expandable-touchable-card');
11
-
12
- static smallHeightURL = new Urlbuilder(PATH_MOBILE_CARD, 'small-height');
13
-
14
- static cardGroupURL = new Urlbuilder(PATH_MOBILE_CARD, 'card-group');
15
-
16
- static expandableURL = new Urlbuilder(PATH_MOBILE_CARD, 'expandable');
17
-
18
- static multiExpandableURL = new Urlbuilder(PATH_MOBILE_CARD, 'multi-expandable');
19
-
20
- static cardGroupNoTitleURL = new Urlbuilder(PATH_MOBILE_CARD, 'card-group-no-title');
21
-
22
- static withDetailsURL = new Urlbuilder(PATH_MOBILE_CARD, 'With-Details-Subtext-And-Props');
23
-
24
- static withIconsURL = new Urlbuilder(PATH_MOBILE_CARD, 'card-with-icons');
25
-
26
- static async expandCard(index) {
27
- return $$('//div[@data-testid="ds-card-expand-chevron"]/span')[index];
28
- }
29
-
30
- static async getCardContent(content) {
31
- return $(`//p[contains(text(), '${content}')]`);
32
- }
33
-
34
- static async getCardTitle() {
35
- return $('[data-testid="card-title"]');
36
- }
37
-
38
- // Snapshots
39
- static snapshotPath(example = 'with-props') {
40
- return PageObject.getSnapshotPathBuilder('MobileCard', example, 'ds-mobile');
41
- }
42
- }
@@ -1,88 +0,0 @@
1
- import MCMCO from './MobileContextMenuCO';
2
-
3
- if (browser.capabilities['ice:options'].isPhone) {
4
- describe('PUI-4403 - MobileContextMenu:: single select', () => {
5
- before('loading page', async () => {
6
- const errorOnGo = await MCMCO.singleSelect.go();
7
- if (errorOnGo) throw errorOnGo;
8
- });
9
- it('only one item can be selected', async () => {
10
- const triggerBtn = await MCMCO.getHandleOpenButton();
11
- await triggerBtn.click();
12
- await (await MCMCO.getMenuItem(1)).click();
13
- await (await MCMCO.getHandleOpenButton()).click();
14
- const checkMark1 = await MCMCO.getCheckMark(1);
15
- const checkMark0 = await MCMCO.getCheckMark(0);
16
- await expect(checkMark1).toBeDisplayed();
17
- await expect(checkMark0).not.toBeDisplayed();
18
- });
19
- });
20
- describe('PUI-4404 - MobileContextMenu:: multiselect', () => {
21
- before('loading page', async () => {
22
- const errorOnGo = await MCMCO.multiSelect.go();
23
- if (errorOnGo) throw errorOnGo;
24
- });
25
- it('should display items checked', async () => {
26
- const triggerBtn = await MCMCO.getHandleOpenButton();
27
- await triggerBtn.click();
28
- await (await MCMCO.getContextMenu()).waitForDisplayed();
29
- await (await MCMCO.getMenuItem(0)).click();
30
- await (await MCMCO.getMenuItem(2)).click();
31
- const checkBox0Checked = await (await MCMCO.getCheckBox(0)).getAttribute('aria-checked');
32
- await expect(checkBox0Checked).toBe('false');
33
- const checkBox2Checked = await (await MCMCO.getCheckBox(2)).getAttribute('aria-checked');
34
- await expect(checkBox2Checked).toBe('true');
35
- });
36
- it('checkbox can be unchecked', async () => {
37
- await (await MCMCO.getMenuItem(0)).click();
38
- await (await MCMCO.getMenuItem(2)).click();
39
- const checkBox0Checked = await (await MCMCO.getCheckBox(0)).getAttribute('aria-checked');
40
- await expect(checkBox0Checked).toBe('true');
41
- const checkBox2Checked = await (await MCMCO.getCheckBox(2)).getAttribute('aria-checked');
42
- await expect(checkBox2Checked).toBe('false');
43
- });
44
- });
45
- describe('PUI-4444 - MobileContextMenu:: Single select - Verify onClick function', () => {
46
- before('loading page', async () => {
47
- const errorOnGo = await MCMCO.singleSelect.go();
48
- if (errorOnGo) throw errorOnGo;
49
- });
50
- it('should close contextmenu onClick event', async () => {
51
- const triggerBtn = await MCMCO.getHandleOpenButton();
52
- await triggerBtn.click();
53
- await (await MCMCO.getContextMenu()).waitForDisplayed();
54
- await (await MCMCO.getMenuItem(0)).click();
55
- const contextMenu = await MCMCO.getContextMenu();
56
- await expect(contextMenu).not.toBeDisplayed();
57
- });
58
- });
59
- describe('PUI-14291 - MobileContextMenu:: Handle Focus', () => {
60
- before('loading page', async () => {
61
- const errorOnGo = await MCMCO.handleFocus.go();
62
- if (errorOnGo) throw errorOnGo;
63
- });
64
- it('01: MobileContextMenu should be opened and focus should be on first option', async () => {
65
- const triggerBtn = await MCMCO.getHandleOpenButton();
66
- await triggerBtn.click();
67
- const firstOption = await MCMCO.getMenuItem(0);
68
- await expect(firstOption).toBeFocused();
69
- });
70
- it('02: focus should return to trigger button after clicking outside menu', async () => {
71
- const backdrop = await MCMCO.getBackDrop();
72
- if (browser.capabilities.browserName === 'safari') {
73
- await backdrop.click();
74
- } else {
75
- await backdrop.click({ y: 50 });
76
- }
77
- const triggerBtn = await MCMCO.getHandleOpenButton();
78
- await expect(triggerBtn).toBeFocused();
79
- });
80
- it('03: focus should return to trigger button after clicking outside menu', async () => {
81
- const triggerBtn = await MCMCO.getHandleOpenButton();
82
- await triggerBtn.click();
83
- const firstOption = await MCMCO.getMenuItem(0);
84
- await firstOption.click();
85
- await expect(triggerBtn).toBeFocused();
86
- });
87
- });
88
- }
@@ -1,31 +0,0 @@
1
- import MCMCO from './MobileContextMenuCO';
2
-
3
- if (browser.capabilities['ice:options'].isPhone) {
4
- describe('MobileContextMenu:: Basic', () => {
5
- before('loading page', async () => {
6
- const errorOnGo = await MCMCO.basicURL.go();
7
- if (errorOnGo) throw errorOnGo;
8
- });
9
- it('should display mobile context menu basic', async () => {
10
- await (await MCMCO.getContextMenu()).waitForDisplayed();
11
- const snapshot = await browser.checkSnapshot(MCMCO.snapshotPath());
12
- await expect(snapshot).toEqual(0);
13
- });
14
- });
15
-
16
- describe('PUI-6818 - MobileContextMenu, Multi, Checkmarks rendering when grouped - Visual Test', () => {
17
- before('loading page', async () => {
18
- const errorOnGo = await MCMCO.multiSelectGroup.go();
19
- if (errorOnGo) throw errorOnGo;
20
- });
21
- it('should display mobile context menu basic', async () => {
22
- const triggerBtn = await MCMCO.getHandleOpenButton();
23
- await triggerBtn.click();
24
- await (await MCMCO.getContextMenu()).waitForDisplayed();
25
- const firstOption = await MCMCO.getMenuItem(0);
26
- await firstOption.click();
27
- const snapshot = await browser.checkSnapshot(MCMCO.snapshotPath());
28
- await expect(snapshot).toEqual(0);
29
- });
30
- });
31
- }