dimsum-e2e-tests 3.53.0-beta.8 → 3.53.0-next.10

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.
@@ -44,6 +44,8 @@ export default class DataTableCO extends PageObject {
44
44
 
45
45
  static paginatedWithDetail = new Urlbuilder(PATH_DATA_TABLE, 'paginated-table-with-details');
46
46
 
47
+ static withMenuButton = new Urlbuilder(PATH_E2E_DATATABLE, 'pui-16383-suggested-solution');
48
+
47
49
  static paginatedTable = new Urlbuilder(PATH_E2E_DATATABLE, 'paginated-table-test');
48
50
 
49
51
  static performance = new Urlbuilder(PATH_DATA_TABLE_ADVANCED, 'performance');
@@ -162,8 +162,10 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
162
162
  const errorOnGo = await DSDataTableCO.datatableInsideTabs.go();
163
163
  if (errorOnGo) throw errorOnGo;
164
164
  await DSDataTableCO.waitForDataTable();
165
+ await browser.maximizeWindow();
165
166
  });
166
167
  it('should expand all rows and drop a row within another', async () => {
168
+ await browser.eyesOpen();
167
169
  await (await HeaderCO.getHeaderExpandButton()).click();
168
170
  const rowExpanded = await RowCO.getExpandedRow(0);
169
171
  await rowExpanded.waitForDisplayed();
@@ -172,7 +174,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
172
174
  await browser.keys(Key.Return);
173
175
  await browser.keys(Key.ArrowDown);
174
176
  await browser.keys(Key.Return);
175
- const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('expanded-dropped-inside'));
177
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('expanded-dropped-inside'));
176
178
  await expect(snapshot).toEqual(0);
177
179
  });
178
180
  });
@@ -0,0 +1,33 @@
1
+ /* eslint-disable func-names */
2
+ /* eslint-disable prefer-arrow-callback */
3
+ /* eslint-disable no-await-in-loop */
4
+ import { Key } from 'webdriverio';
5
+ import DSDataTableCO from '../DSDataTableCO';
6
+ import { HeaderCO } from '../components';
7
+
8
+ // Keyboard behavior is subject to changes once the UX team determines which's the way to go in terms of accessibility
9
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
10
+ describe('PUI-16396 - DataTable, Dnd columns - scrollbar behavior', function () {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDataTableCO.DndColumnsFixedWidth.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ await DSDataTableCO.waitForDataTable();
15
+ });
16
+ it('01: should scroll correctly', async () => {
17
+ await browser.keys(Key.Tab);
18
+ await browser.keys(Key.Tab);
19
+ await browser.keys(Key.PageDown);
20
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('data-table-scroll'));
21
+ await expect(snapshot).toEqual(0);
22
+ });
23
+ it('02: Drag&Drop Name column should not cause data-table to scroll automatically', async () => {
24
+ const nameColumn = await HeaderCO.getHeaderCellByText('NAME');
25
+ await nameColumn.click();
26
+ const positionColumn = await HeaderCO.getHeaderCellByText('POSITION');
27
+ const dndHandler = await HeaderCO.getHeaderCellDragHandler(nameColumn);
28
+ await dndHandler.dragAndDrop(positionColumn);
29
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('data-table-dnd-scroll'));
30
+ await expect(snapshot).toEqual(0);
31
+ });
32
+ });
33
+ }
@@ -12,6 +12,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
12
12
  const errorOnGo = await DSDataTableCO.filteredCreatable.go();
13
13
  if (errorOnGo) throw errorOnGo;
14
14
  await DSDataTableCO.waitForDataTable();
15
+ await browser.maximizeWindow();
15
16
  });
16
17
  it('01: should open the popup and focus the text input', async () => {
17
18
  await browser.eyesOpen();
@@ -0,0 +1,109 @@
1
+ /* eslint-disable max-lines */
2
+ /* eslint-disable wdio/no-pause */
3
+ import { Key } from 'webdriverio';
4
+ import DSDataTableCO from '../DSDataTableCO';
5
+ import { mouseOver } from '../../helpers';
6
+ import CellCO from '../components/CellCO';
7
+ import DSMenuButtonCO from '../../ds-menu-button/DSMenuButtonCO';
8
+
9
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
10
+ describe('PUI-16413 - DataTable, MenuButton (mouse) - Functional Test', async () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSDataTableCO.withMenuButton.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ await DSDataTableCO.waitForDataTable();
15
+ });
16
+ it('01: should expand menuButton for datatable row', async () => {
17
+ const menuButtonTrigger = await DSDataTableCO.getButtons(2);
18
+ await menuButtonTrigger.click();
19
+ const submenuTriggerItem = await DSMenuButtonCO.getMenuItemWrapper(1);
20
+ const menuItems = (await DSMenuButtonCO.getMenuItems()).length;
21
+ await expect(menuItems).toEqual(5);
22
+ await expect(submenuTriggerItem).toBeDisplayedInViewport();
23
+ });
24
+ it('02: should trigger menuButton item', async () => {
25
+ const thirdItem = await DSMenuButtonCO.getMenuItemWrapper(2);
26
+ await thirdItem.click();
27
+ const alertText = await browser.getAlertText();
28
+ await expect(alertText).toEqual('item selected: sms - undefined');
29
+ });
30
+ it('03: should expand menuButton submenu for datatable row', async () => {
31
+ await browser.dismissAlert();
32
+ const menuButtonTrigger = await DSDataTableCO.getButtons(2);
33
+ await menuButtonTrigger.click();
34
+ const submenuTriggerItem = await DSMenuButtonCO.getMenuItemWrapper(1);
35
+ await submenuTriggerItem.waitForDisplayed();
36
+ await mouseOver(submenuTriggerItem);
37
+ const menuItems = (await DSMenuButtonCO.getMenuItems()).length;
38
+ await expect(menuItems).toEqual(8);
39
+ await expect(submenuTriggerItem).toBeDisplayedInViewport();
40
+ });
41
+ it('04: should trigger menuButton submenu item', async () => {
42
+ const submenuItem = await DSMenuButtonCO.getMenuItemWrapper(5);
43
+ await submenuItem.click();
44
+ const alertText = await browser.getAlertText();
45
+ await expect(alertText).toEqual('item selected: Realtor Phone - (424) 000-0000');
46
+ });
47
+ it('05: should close menuButton flyout clicking outside the menu (cell for example)', async () => {
48
+ await browser.dismissAlert();
49
+ const menuButtonTrigger = await DSDataTableCO.getButtons(2);
50
+ await menuButtonTrigger.click();
51
+ const menu = await DSMenuButtonCO.getMenuRoot();
52
+ await menu.waitForDisplayed();
53
+ const datatableCell = await CellCO.getCellByIndex(1);
54
+ await datatableCell.click();
55
+ await expect(menu).not.toBeDisplayedInViewport();
56
+ });
57
+ });
58
+
59
+ describe('PUI-16414 - DataTable, MenuButton (keyboard) - Functional Test', async () => {
60
+ before('loading page', async () => {
61
+ const errorOnGo = await DSDataTableCO.withMenuButton.go();
62
+ if (errorOnGo) throw errorOnGo;
63
+ await DSDataTableCO.waitForDataTable();
64
+ });
65
+ it('01: should focus menuTrigger with keyboard', async () => {
66
+ await browser.keys(Key.Tab);
67
+ await browser.keys(Key.Tab);
68
+ await browser.keys(Key.Tab);
69
+ await browser.keys(Key.Tab);
70
+ await browser.keys(Key.Return);
71
+ const menuButtonTrigger = await DSDataTableCO.getButtons(0);
72
+ await expect(menuButtonTrigger).toBeFocused();
73
+ });
74
+ it('02: should expand menuButton for datatable row with keyboard', async () => {
75
+ await browser.keys(Key.Return);
76
+ const submenuTriggerItem = await DSMenuButtonCO.getMenuItemWrapper(1);
77
+ const menuItems = (await DSMenuButtonCO.getMenuItems()).length;
78
+ await expect(menuItems).toEqual(5);
79
+ await expect(submenuTriggerItem).toBeDisplayedInViewport();
80
+ });
81
+ it('03: should trigger menuButton item with keyboard', async () => {
82
+ await browser.keys(Key.ArrowUp);
83
+ await browser.keys(Key.Return);
84
+ const alertText = await browser.getAlertText();
85
+ await expect(alertText).toEqual('item selected: log actions - undefined');
86
+ });
87
+ it('03: should expand menuButton submenu for datatable row with keyboard', async () => {
88
+ await browser.dismissAlert();
89
+ await browser.keys(Key.Return);
90
+ await browser.keys(Key.ArrowDown);
91
+ const menuItems = (await DSMenuButtonCO.getMenuItems()).length;
92
+ await expect(menuItems).toEqual(6);
93
+ });
94
+ it('04: should trigger menuButton submenu item with keyboard', async () => {
95
+ await browser.keys(Key.ArrowRight);
96
+ await browser.keys(Key.Return);
97
+ const alertText = await browser.getAlertText();
98
+ await expect(alertText).toEqual('item selected: Realtor Phone - (424) 000-0000');
99
+ });
100
+ it('05: should close menuButton menu with keyboard', async () => {
101
+ await browser.dismissAlert();
102
+ await browser.keys(Key.Return);
103
+ const menu = await DSMenuButtonCO.getMenuRoot();
104
+ await menu.waitForDisplayed();
105
+ await browser.keys(Key.Escape);
106
+ await expect(menu).not.toBeDisplayedInViewport();
107
+ });
108
+ });
109
+ }
@@ -0,0 +1,27 @@
1
+ import DSDataTableCO from '../DSDataTableCO';
2
+ import DSMenuButtonCO from '../../ds-menu-button/DSMenuButtonCO';
3
+ import { mouseOver } from '../../helpers';
4
+
5
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
+ describe('PUI-16415 - DataTable, with menu button - Visual', () => {
7
+ before('loading page', async () => {
8
+ const errorOnGo = await DSDataTableCO.withMenuButton.go();
9
+ if (errorOnGo) throw errorOnGo;
10
+ await DSDataTableCO.waitForDataTable();
11
+ });
12
+ it('01: should have datatable with expanded menubutton and match baseline', async () => {
13
+ await browser.eyesOpen();
14
+ const menuButtonTrigger = await DSDataTableCO.getButtons(2);
15
+ await menuButtonTrigger.click();
16
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('datatable-menubutton-menu'));
17
+ await expect(snapshot).toEqual(0);
18
+ });
19
+ it('02: should have datatable with expanded menubutton submenu and match baseline', async () => {
20
+ await browser.eyesOpen();
21
+ const submenuTriggerItem = await DSMenuButtonCO.getMenuItemWrapper(1);
22
+ await mouseOver(submenuTriggerItem);
23
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('datatable-menubutton-submenu'));
24
+ await expect(snapshot).toEqual(0);
25
+ });
26
+ });
27
+ }
@@ -65,7 +65,8 @@ if (!browser.capabilities['ice:options'].isPhone) {
65
65
 
66
66
  // fails on firefox due to fake-positive of infinte loop
67
67
  if (browser.capabilities.browserName !== 'Firefox') {
68
- describe('PUI-9401 - DSDataViz, TimeLinear axis -Visual', () => {
68
+ // Skipped until PUI-16334 gets fixed
69
+ describe.skip('PUI-9401 - DSDataViz, TimeLinear axis -Visual', () => {
69
70
  before('loading page', async () => {
70
71
  const errorOnGo = await DSDataVizCO.timeLinearAxis.go();
71
72
  if (errorOnGo) throw errorOnGo;
@@ -60,6 +60,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
60
60
  });
61
61
  it('01: should display a the chart in default state', async () => {
62
62
  await browser.eyesOpen();
63
+ await browser.maximizeWindow();
63
64
  const snapshot = await browser.eyesCheckSnapshot(DSDataVizCO.snapshotPath('dataviz-res-default-default'));
64
65
  await expect(snapshot).toEqual(0);
65
66
  });
@@ -62,7 +62,8 @@ if (!browser.capabilities['ice:options'].isPhone) {
62
62
  });
63
63
  });
64
64
 
65
- describe('PUI-10321 - DSDataViz, Force ticks -Visual', () => {
65
+ // Skipped until PUI-16334 gets fixed
66
+ describe.skip('PUI-10321 - DSDataViz, Force ticks -Visual', () => {
66
67
  before('loading page', async () => {
67
68
  const errorOnGo = await DSDataVizCO.forceTicks.go();
68
69
  if (errorOnGo) throw errorOnGo;
@@ -13,7 +13,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
13
13
  const menuTrigger = await DSButtonV3CO.getButtonByLabel('Submenus example');
14
14
  await menuTrigger.click();
15
15
  await browser.keys(Key.ArrowRight);
16
- const result = await axeCoreCheck({ selector: "[data-testid='ds-cardv3-root']" });
16
+ const result = await axeCoreCheck({ selector: "[id='ds-sb-main']" });
17
17
  expect(result.length).toBe(0);
18
18
  });
19
19
  });
@@ -36,13 +36,15 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
36
36
  before('loading page', async () => {
37
37
  const errorOnGo = await DSPillsV2CO.readonlyURL.go();
38
38
  if (errorOnGo) throw errorOnGo;
39
+ await browser.maximizeWindow();
39
40
  });
40
41
  it('should correctly display the readonly pills', async () => {
42
+ await browser.eyesOpen();
41
43
  const readonlyPill = await DSPillsV2CO.getIconByIndex(0);
42
44
  const otherReadonlyPill = await DSPillsV2CO.getIconByIndex(2);
43
45
  await readonlyPill.click();
44
46
  await mouseOver(otherReadonlyPill);
45
- const snapshot = await browser.checkSnapshot(DSPillsV2CO.snapshotPath('pills-v2-readonly'));
47
+ const snapshot = await browser.eyesCheckSnapshot(DSPillsV2CO.snapshotPath('pills-v2-readonly'));
46
48
  await expect(snapshot).toEqual(0);
47
49
  });
48
50
  });
@@ -4,37 +4,39 @@ import DSPillsV2CO from '../DSPillsV2CO';
4
4
  import DSMenuButtonCO from '../../ds-menu-button/DSMenuButtonCO';
5
5
 
6
6
  if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
7
- describe('PUI-14703 - Pills v2: Selection: KB, multi', () => {
8
- before('loading page', async () => {
9
- const errorOnGo = await DSPillsV2CO.multiSelectMB.go();
10
- if (errorOnGo) throw errorOnGo;
11
- });
12
- it('01: should have multi select expanded, no selection, no minipill', async () => {
13
- await browser.keys(Key.Tab);
14
- await browser.keys(Key.Return);
15
- const pills = await DSPillsV2CO.getPills();
16
- const howManyPills = pills.length;
17
- const menu = await DSMenuButtonCO.getMenuRoot();
18
- await expect(menu).toBeDisplayedInViewport();
19
- await expect(howManyPills).toEqual(1); // The selection pill, no values pills displayed
20
- });
21
- it('02: should have multi select with two options selected, expanded, with two minipills', async () => {
22
- await browser.keys(Key.ArrowDown);
23
- await browser.keys(Key.Space);
24
- await browser.keys(Key.ArrowDown);
25
- await browser.keys(Key.Space);
26
- const pills = await DSPillsV2CO.getPills();
27
- const howManyPills = pills.length;
28
- const menu = await DSMenuButtonCO.getMenuRoot();
29
- const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
30
- const minipillLabel2 = await (await DSPillsV2CO.getPillsTextByIndex(2)).getText();
31
- await expect(minipillLabel1).toEqual('Bold');
32
- await expect(minipillLabel2).toEqual('Underlined');
33
- await expect(menu).toBeDisplayedInViewport();
34
- await expect(howManyPills).toEqual(3);
7
+ // PUI-14703 has wrong behaviour with automation + safari. Not reproducible/Not fixable.
8
+ if (browser.capabilities.browserName !== 'Safari') {
9
+ describe('PUI-14703 - Pills v2: Selection: KB, multi', () => {
10
+ before('loading page', async () => {
11
+ const errorOnGo = await DSPillsV2CO.multiSelectMB.go();
12
+ if (errorOnGo) throw errorOnGo;
13
+ });
14
+ it('01: should have multi select expanded, no selection, no minipill', async () => {
15
+ await browser.keys(Key.Tab);
16
+ await browser.keys(Key.Return);
17
+ const pills = await DSPillsV2CO.getPills();
18
+ const howManyPills = pills.length;
19
+ const menu = await DSMenuButtonCO.getMenuRoot();
20
+ await expect(menu).toBeDisplayedInViewport();
21
+ await expect(howManyPills).toEqual(1); // The selection pill, no values pills displayed
22
+ });
23
+ it('02: should have multi select with two options selected, expanded, with two minipills', async () => {
24
+ await browser.keys(Key.ArrowDown);
25
+ await browser.keys(Key.Space);
26
+ await browser.keys(Key.ArrowDown);
27
+ await browser.keys(Key.Space);
28
+ const pills = await DSPillsV2CO.getPills();
29
+ const howManyPills = pills.length;
30
+ const menu = await DSMenuButtonCO.getMenuRoot();
31
+ const minipillLabel1 = await (await DSPillsV2CO.getPillsTextByIndex(1)).getText();
32
+ const minipillLabel2 = await (await DSPillsV2CO.getPillsTextByIndex(2)).getText();
33
+ await expect(minipillLabel1).toEqual('Bold');
34
+ await expect(minipillLabel2).toEqual('Underlined');
35
+ await expect(menu).toBeDisplayedInViewport();
36
+ await expect(howManyPills).toEqual(3);
37
+ });
35
38
  });
36
- });
37
-
39
+ }
38
40
  describe('PUI-14702 - Pills v2: Selection: MOUSE, single', () => {
39
41
  before('loading page', async () => {
40
42
  const errorOnGo = await DSPillsV2CO.singleSelectMB.go();
@@ -45,21 +45,6 @@ if (!browser.capabilities['ice:options'].isPhone) {
45
45
  });
46
46
  });
47
47
 
48
- if (!browser.capabilities['ice:options'].isTablet) {
49
- describe('PUI-9561: Read More, with tooltip -func', () => {
50
- before('loading page', async () => {
51
- const errorOnGo = await DSReadMoreCO.withTooltip.go();
52
- if (errorOnGo) throw errorOnGo;
53
- });
54
- it('Should display tooltip on trigger hover', async () => {
55
- const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
56
- await mouseOver(tooltipTrigger, 1, 1);
57
- const tooltip = await DSReadMoreCO.getTooltip();
58
- await expect(tooltip).toBeDisplayed();
59
- });
60
- });
61
- }
62
-
63
48
  describe('PUI-9562: Read More, not truncated on short texts -func', () => {
64
49
  before('loading page', async () => {
65
50
  const errorOnGo = await DSReadMoreCO.notTruncatedUrl.go();
@@ -74,44 +59,116 @@ if (!browser.capabilities['ice:options'].isPhone) {
74
59
  });
75
60
  });
76
61
  if (!browser.capabilities['ice:options'].isTablet) {
77
- describe('PUI-9612: Read More: withTooltip on responsive (zoom) -func', () => {
62
+ describe('PUI-16388: Read More, Kb with tooltip -func', () => {
78
63
  before('loading page', async () => {
79
- const errorOnGo = await DSReadMoreCO.widthChange.go();
64
+ const errorOnGo = await DSReadMoreCO.withTooltip.go();
80
65
  if (errorOnGo) throw errorOnGo;
81
66
  });
82
- it('01: should display tooltip on 100px width', async () => {
83
- const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
84
- expect(tooltipTriggerBtns).toHaveLength(2);
85
- await mouseOver(tooltipTriggerBtns[0], 1, 1);
86
- const firstTooltip = await DSReadMoreCO.getTooltip();
87
- await expect(firstTooltip).toBeDisplayedInViewport();
88
- await mouseOver(tooltipTriggerBtns[1], 1, 1);
89
- const secondTooltip = await DSReadMoreCO.getTooltip();
90
- await expect(secondTooltip).toBeDisplayedInViewport();
91
- });
92
- it('02: should display tooltip on 200px width', async () => {
93
- const changeWidthBtn = await DSReadMoreCO.getButton();
94
- await changeWidthBtn.click();
95
- const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
96
- expect(tooltipTriggerBtns).toHaveLength(2);
97
- await mouseOver(tooltipTriggerBtns[0], 1, 1);
98
- const firstTooltip = await DSReadMoreCO.getTooltip();
99
- await expect(firstTooltip).toBeDisplayedInViewport();
100
- await mouseOver(tooltipTriggerBtns[1], 1, 1);
101
- const secondTooltip = await DSReadMoreCO.getTooltip();
102
- await expect(secondTooltip).toBeDisplayedInViewport();
67
+ it('Should display tooltip on focus', async () => {
68
+ const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
69
+ await tooltipTrigger.waitForDisplayed();
70
+ await browser.keys(Key.Tab);
71
+ const tooltip = await DSReadMoreCO.getTooltip();
72
+ await expect(tooltip).toBeDisplayed();
103
73
  });
104
- it('03: should display tooltip on 300px width', async () => {
105
- // close tooltip
74
+ it('Should not display tooltip after ESC is pressed', async () => {
106
75
  await browser.keys(Key.Escape);
107
- const changeWidthBtn = await DSReadMoreCO.getButton();
108
- await changeWidthBtn.click();
109
- const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
110
- expect(tooltipTriggerBtns).toHaveLength(1);
111
- await mouseOver(tooltipTriggerBtns[0], 1, 1);
112
- const firstTooltip = await DSReadMoreCO.getTooltip();
113
- await expect(firstTooltip).toBeDisplayedInViewport();
76
+ const tooltip = await DSReadMoreCO.getTooltip();
77
+ await expect(tooltip).not.toBeDisplayed();
78
+ });
79
+ });
80
+
81
+ describe('PUI-16387: Read More, Kb with readmore btn -func', () => {
82
+ before('loading page', async () => {
83
+ const errorOnGo = await DSReadMoreCO.truncatedUrl.go();
84
+ if (errorOnGo) throw errorOnGo;
85
+ });
86
+ it('01: Should focus readmore button after tab is pressed', async () => {
87
+ const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
88
+ await readMoreBtn.waitForDisplayed();
89
+ const moreLessText = await (await DSReadMoreCO.getMoreLessText()).getText();
90
+ await browser.keys(Key.Tab);
91
+ await expect(readMoreBtn).toBeFocused();
92
+ await expect(moreLessText).toEqual(
93
+ // eslint-disable-next-line max-len
94
+ 'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very lo',
95
+ );
96
+ });
97
+ it('02: Should display more content on readmore button trigger (enter/return)', async () => {
98
+ const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
99
+ await browser.keys(Key.Return);
100
+ const moreLessText = await (await DSReadMoreCO.getMoreLessText()).getText();
101
+ await expect(readMoreBtn).toBeFocused();
102
+ await expect(moreLessText).toEqual(
103
+ // eslint-disable-next-line max-len
104
+ 'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes.',
105
+ );
106
+ });
107
+ it('03: Should display more content on readmore button trigger (enter/return)', async () => {
108
+ const readMoreBtn = await DSReadMoreCO.getMoreLessButton();
109
+ await browser.keys(Key.Return);
110
+ const moreLessText = await (await DSReadMoreCO.getMoreLessText()).getText();
111
+ await expect(readMoreBtn).toBeFocused();
112
+ await expect(moreLessText).toEqual(
113
+ // eslint-disable-next-line max-len
114
+ 'This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very long text just for display purposes. This is a very lo',
115
+ );
114
116
  });
115
117
  });
118
+ if (browser.capabilities.browserName !== 'Safari') {
119
+ // Readmore tooltip trigger raises error: Element not interactable with safari. False negative
120
+ describe('PUI-9561: Read More, with tooltip -func', () => {
121
+ before('loading page', async () => {
122
+ const errorOnGo = await DSReadMoreCO.withTooltip.go();
123
+ if (errorOnGo) throw errorOnGo;
124
+ });
125
+ it('Should display tooltip on trigger hover', async () => {
126
+ const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
127
+ await mouseOver(tooltipTrigger, 1, 1);
128
+ const tooltip = await DSReadMoreCO.getTooltip();
129
+ await expect(tooltip).toBeDisplayed();
130
+ });
131
+ });
132
+
133
+ describe('PUI-9612: Read More: withTooltip on responsive (zoom) -func', () => {
134
+ before('loading page', async () => {
135
+ const errorOnGo = await DSReadMoreCO.widthChange.go();
136
+ if (errorOnGo) throw errorOnGo;
137
+ });
138
+ it('01: should display tooltip on 100px width', async () => {
139
+ const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
140
+ expect(tooltipTriggerBtns).toHaveLength(2);
141
+ await mouseOver(tooltipTriggerBtns[0], 1, 1);
142
+ const firstTooltip = await DSReadMoreCO.getTooltip();
143
+ await expect(firstTooltip).toBeDisplayedInViewport();
144
+ await mouseOver(tooltipTriggerBtns[1], 1, 1);
145
+ const secondTooltip = await DSReadMoreCO.getTooltip();
146
+ await expect(secondTooltip).toBeDisplayedInViewport();
147
+ });
148
+ it('02: should display tooltip on 200px width', async () => {
149
+ const changeWidthBtn = await DSReadMoreCO.getButton();
150
+ await changeWidthBtn.click();
151
+ const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
152
+ expect(tooltipTriggerBtns).toHaveLength(2);
153
+ await mouseOver(tooltipTriggerBtns[0], 1, 1);
154
+ const firstTooltip = await DSReadMoreCO.getTooltip();
155
+ await expect(firstTooltip).toBeDisplayedInViewport();
156
+ await mouseOver(tooltipTriggerBtns[1], 1, 1);
157
+ const secondTooltip = await DSReadMoreCO.getTooltip();
158
+ await expect(secondTooltip).toBeDisplayedInViewport();
159
+ });
160
+ it('03: should display tooltip on 300px width', async () => {
161
+ // close tooltip
162
+ await browser.keys(Key.Escape);
163
+ const changeWidthBtn = await DSReadMoreCO.getButton();
164
+ await changeWidthBtn.click();
165
+ const tooltipTriggerBtns = await DSReadMoreCO.getTooltipTriggers();
166
+ expect(tooltipTriggerBtns).toHaveLength(1);
167
+ await mouseOver(tooltipTriggerBtns[0], 1, 1);
168
+ const firstTooltip = await DSReadMoreCO.getTooltip();
169
+ await expect(firstTooltip).toBeDisplayedInViewport();
170
+ });
171
+ });
172
+ }
116
173
  }
117
174
  }
@@ -1,3 +1,4 @@
1
+ import { Key } from 'webdriverio';
1
2
  import DSReadMoreCO from './DSReadMoreCO';
2
3
  import { mouseOver } from '../helpers';
3
4
 
@@ -8,14 +9,19 @@ if (!browser.capabilities['ice:options'].isPhone) {
8
9
  if (errorOnGo) throw errorOnGo;
9
10
  });
10
11
  it('01: Should display ReadMore truncated with the MORE button', async () => {
12
+ await browser.eyesOpen();
13
+ if (!browser.capabilities['ice:options'].isTablet) {
14
+ await browser.maximizeWindow();
15
+ }
11
16
  await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
12
- const snapshot = await browser.checkSnapshot(DSReadMoreCO.snapshotPath('truncated-more'));
17
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('truncated-more'));
13
18
  await expect(snapshot).toEqual(0);
14
19
  });
15
20
  it('02: Should display ReadMore not truncated after click with LESS button', async () => {
21
+ await browser.eyesOpen();
16
22
  const button = await DSReadMoreCO.getMoreLessButton();
17
23
  await button.click();
18
- const snapshot = await browser.checkSnapshot(DSReadMoreCO.snapshotPath('truncated-less'));
24
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('truncated-less'));
19
25
  await expect(snapshot).toEqual(0);
20
26
  });
21
27
  });
@@ -25,8 +31,12 @@ if (!browser.capabilities['ice:options'].isPhone) {
25
31
  if (errorOnGo) throw errorOnGo;
26
32
  });
27
33
  it('Should display ReadMore not truncated', async () => {
34
+ await browser.eyesOpen();
35
+ if (!browser.capabilities['ice:options'].isTablet) {
36
+ await browser.maximizeWindow();
37
+ }
28
38
  await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
29
- const snapshot = await browser.checkSnapshot(DSReadMoreCO.snapshotPath('not-truncated'));
39
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('not-truncated'));
30
40
  await expect(snapshot).toEqual(0);
31
41
  });
32
42
  });
@@ -36,31 +46,45 @@ if (!browser.capabilities['ice:options'].isPhone) {
36
46
  if (errorOnGo) throw errorOnGo;
37
47
  });
38
48
  it('01: Should display ReadMore truncated with the MORE!!! button', async () => {
49
+ await browser.eyesOpen();
50
+ if (!browser.capabilities['ice:options'].isTablet) {
51
+ await browser.maximizeWindow();
52
+ }
39
53
  await (await DSReadMoreCO.getMoreLessText()).waitForDisplayed();
40
- const snapshot = await browser.checkSnapshot(DSReadMoreCO.snapshotPath('custom-button-more'));
54
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('custom-button-more'));
41
55
  await expect(snapshot).toEqual(0);
42
56
  });
43
57
  it('02: Should display ReadMore not truncated after click with LESS!!! button', async () => {
58
+ await browser.eyesOpen();
44
59
  const button = await DSReadMoreCO.getMoreLessButton();
45
60
  await button.click();
46
- const snapshot = await browser.checkSnapshot(DSReadMoreCO.snapshotPath('custom-button-less'));
61
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('custom-button-less'));
47
62
  await expect(snapshot).toEqual(0);
48
63
  });
49
64
  });
50
65
 
51
66
  if (!browser.capabilities['ice:options'].isTablet) {
52
- describe('PUI-9566: Read More, with tooltip -Visual', () => {
53
- before('loading page', async () => {
54
- const errorOnGo = await DSReadMoreCO.withTooltip.go();
55
- if (errorOnGo) throw errorOnGo;
67
+ if (browser.capabilities.browserName !== 'Safari') {
68
+ describe('PUI-9566: Read More, with tooltip -Visual', () => {
69
+ before('loading page', async () => {
70
+ const errorOnGo = await DSReadMoreCO.withTooltip.go();
71
+ if (errorOnGo) throw errorOnGo;
72
+ });
73
+ it('01: Should display tooltip on trigger hover', async () => {
74
+ await browser.eyesOpen();
75
+ await browser.maximizeWindow();
76
+ const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
77
+ await mouseOver(tooltipTrigger, 1, 1);
78
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-tooltip'));
79
+ await expect(snapshot).toEqual(0);
80
+ });
81
+ it('02: Should display tooltip (& focusring) on trigger hover', async () => {
82
+ await browser.eyesOpen();
83
+ await browser.keys(Key.Tab);
84
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-focusring'));
85
+ await expect(snapshot).toEqual(0);
86
+ });
56
87
  });
57
- it('Should display tooltip on trigger hover', async () => {
58
- await browser.eyesOpen();
59
- const tooltipTrigger = await DSReadMoreCO.getTooltipTrigger();
60
- await mouseOver(tooltipTrigger, 1, 1);
61
- const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('readmore-tooltip'));
62
- await expect(snapshot).toEqual(0);
63
- });
64
- });
88
+ }
65
89
  }
66
90
  }
@@ -10,6 +10,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
10
10
  });
11
11
  it('01: Should display a focused DND handler', async () => {
12
12
  await browser.eyesOpen();
13
+ await browser.maximizeWindow();
13
14
  await browser.keys(Key.Tab);
14
15
  await browser.keys(Key.Tab);
15
16
  await browser.keys(Key.ArrowDown);
@@ -19,6 +20,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
19
20
  });
20
21
  it('02: Should display an item being dragged', async () => {
21
22
  await browser.eyesOpen();
23
+ await browser.maximizeWindow();
22
24
  await browser.keys(Key.Tab);
23
25
  await browser.keys(Key.Tab);
24
26
  await browser.keys(Key.ArrowDown);
@@ -30,6 +32,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
30
32
  });
31
33
  it('03: Should display the dropped item', async () => {
32
34
  await browser.eyesOpen();
35
+ await browser.maximizeWindow();
33
36
  await browser.keys(Key.Tab);
34
37
  await browser.keys(Key.Tab);
35
38
  await browser.keys(Key.ArrowDown);