dimsum-e2e-tests 3.54.0-beta.1 → 3.54.0-next.2

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.
@@ -209,6 +209,8 @@ export default class DataTableCO extends PageObject {
209
209
  'filtered-column-with-combobox-filter-test',
210
210
  );
211
211
 
212
+ static pui16461SkeletonAndNoResults = new Urlbuilder(PATH_E2E_DATATABLE, 'pui-16461-skeleton-and-no-results');
213
+
212
214
  // SELECTORS
213
215
 
214
216
  static getTable = async () => $('[data-testid="data-table-table"]');
@@ -308,6 +310,10 @@ export default class DataTableCO extends PageObject {
308
310
  return $(`[id="next_content_id"]`);
309
311
  }
310
312
 
313
+ static async getDataTableEmpyStateWrapper() {
314
+ return $('[data-testid="ds-datatable-empty-state-wrapper"]');
315
+ }
316
+
311
317
  // Snapshots
312
318
  static snapshotPath(example = 'basic') {
313
319
  return PageObject.getSnapshotPathBuilder('DataTable', example, 'ds-data-table');
@@ -9,32 +9,37 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
9
9
  const errorOnGo = await DSDataTableCO.filterableWithFilterBar.go();
10
10
  if (errorOnGo) throw errorOnGo;
11
11
  await DSDataTableCO.waitForDataTable();
12
+ });
13
+ beforeEach('maximize window', async () => {
12
14
  await browser.maximizeWindow();
15
+ await browser.eyesOpen();
13
16
  });
14
- it('should display the menu of the DateSwitcher single on a fixed date', async () => {
17
+ it('01: should display the menu of the DateSwitcher single on a fixed date', async () => {
15
18
  await FiltersCO.openFilterPopperByColumnName('Date Switcher', 0);
16
19
  await browser.keys(Key.Tab);
17
20
  await type('02022020');
18
- const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-single'));
21
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-single'));
19
22
  await expect(snapshot).toEqual(0);
20
23
  });
21
- it('should display the menu of the DateSwitcher range on a fixed first date', async () => {
24
+ it('02: should display the menu of the DateSwitcher range on a fixed first date', async () => {
22
25
  const checkBox = await DateSwitcherCO.getRangeCheckbox();
23
26
  await checkBox.click();
24
27
  const firstInput = await DateSwitcherCO.getLeftMMInput();
25
28
  await firstInput.click();
26
29
  await type('01012010');
27
- const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-notfull'));
30
+ const snapshot = await browser.eyesCheckSnapshot(
31
+ DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-notfull'),
32
+ );
28
33
  await expect(snapshot).toEqual(0);
29
34
  });
30
- it('should display the menu of the DateSwitcher range with full input', async () => {
35
+ it('03: should display the menu of the DateSwitcher range with full input', async () => {
31
36
  const secondInput = await DateSwitcherCO.getRightMMInput();
32
37
  await secondInput.click();
33
38
  await type('01152010');
34
- const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-full'));
39
+ const snapshot = await browser.eyesCheckSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-full'));
35
40
  await expect(snapshot).toEqual(0);
36
41
  });
37
- it('display the menu of the DateSwitcher when the range and the start are not in the same month', async () => {
42
+ it('04: display the menu of the DateSwitcher when the range and the start are not in the same month', async () => {
38
43
  await browser.keys(Key.Escape);
39
44
  const pillCloseBt = await FilterBarCO.getPillCloseButtonByPill(await FilterBarCO.getPillByIndex(1));
40
45
  await pillCloseBt.click();
@@ -45,7 +50,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
45
50
  const secondInput = await DateSwitcherCO.getRightMMInput();
46
51
  await secondInput.click();
47
52
  await type('02152010');
48
- const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-split'));
53
+ const snapshot = await browser.eyesCheckSnapshot(
54
+ DSDataTableCO.snapshotPath('dateswitcher-open-menu-range-split'),
55
+ );
49
56
  await expect(snapshot).toEqual(0);
50
57
  });
51
58
  });
@@ -46,4 +46,17 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
46
46
  await expect(snapshot).toEqual(0);
47
47
  });
48
48
  });
49
+ describe('PUI-16584 - DataTable:: skeleton and No results - Visual Test', async () => {
50
+ before('loading page', async () => {
51
+ const errorOnGo = await DSDataTableCO.pui16461SkeletonAndNoResults.go();
52
+ if (errorOnGo) throw errorOnGo;
53
+ await DSDataTableCO.waitForDataTable();
54
+ });
55
+ it('01: should correctly display the data table empty state after skeleton animation finished', async () => {
56
+ const emptyStateWrapper = await DSDataTableCO.getDataTableEmpyStateWrapper();
57
+ await emptyStateWrapper.waitForDisplayed({ timeout: 5000 });
58
+ const snapshot = await browser.checkSnapshot(DSDataTableCO.snapshotPath('skeleton-empty-state'));
59
+ await expect(snapshot).toEqual(0);
60
+ });
61
+ });
49
62
  }
@@ -1,5 +1,5 @@
1
1
  import { Key } from 'webdriverio';
2
- import { PATH_E2E_COMBOBOX_SINGLE } from '../paths';
2
+ import { PATH_E2E_COMBOBOX_SINGLE, PATH_E2E_COMBOBOX_SINGLE_SLOTS } from '../paths';
3
3
  import { PageObject, Urlbuilder } from '../helpers';
4
4
 
5
5
  export default class DSComboboxSingleCO extends PageObject {
@@ -12,6 +12,21 @@ export default class DSComboboxSingleCO extends PageObject {
12
12
 
13
13
  static readOnlyWithMenuOpenable = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'read-only-with-menu-openable-test');
14
14
 
15
+ static controlledMenuStateAdvancedCustomizationTest = new Urlbuilder(
16
+ PATH_E2E_COMBOBOX_SINGLE_SLOTS,
17
+ 'controlled-menu-state-advanced-customization-test',
18
+ );
19
+
20
+ static loadingAdvancedCustomizationTest = new Urlbuilder(
21
+ PATH_E2E_COMBOBOX_SINGLE_SLOTS,
22
+ 'loading-advanced-customization-test',
23
+ );
24
+
25
+ static skeletonAdvancedCustomizationTest = new Urlbuilder(
26
+ PATH_E2E_COMBOBOX_SINGLE_SLOTS,
27
+ 'skeleton-advanced-customization-test',
28
+ );
29
+
15
30
  // COMBOBOX - INPUT
16
31
  static async getCombobox() {
17
32
  return $('[data-testid="combobox-container"]');
@@ -152,6 +167,65 @@ export default class DSComboboxSingleCO extends PageObject {
152
167
  return $('[data-testid="popover-container"]');
153
168
  }
154
169
 
170
+ // Slots
171
+
172
+ static async getComboboxRootSlot() {
173
+ return $('[data-dimsum-slot="dsComboboxRoot"]');
174
+ }
175
+
176
+ static async getComboboxInputWrapperSlot() {
177
+ return $('[data-dimsum-slot="dsComboboxInputWrapper"]');
178
+ }
179
+
180
+ static async getComboboxInputSlot() {
181
+ return $('[data-dimsum-slot="dsComboboxInput"]');
182
+ }
183
+
184
+ static async getComboboxDropDownMenuBtnSlot() {
185
+ return $('[data-dimsum-parent-slot="dsComboboxDropdownButton"]');
186
+ }
187
+
188
+ static async getFloatingWrapperRootSlot() {
189
+ return $('[data-dimsum-slot="dsFloatingwrapperRoot"]');
190
+ }
191
+
192
+ static async getFloatingWrapperContentSlot() {
193
+ return $('[data-dimsum-slot="dsFloatingwrapperContent"]');
194
+ }
195
+
196
+ static async getFastListContainerSlot() {
197
+ return $('[data-dimsum-parent-slot="dsComboboxFastList"]');
198
+ }
199
+
200
+ static async getFastListWrapperListSlot() {
201
+ return $('[data-dimsum-slot="dsFastlistWrapperList"]');
202
+ }
203
+
204
+ static async getFastListItemSlot() {
205
+ return $('[data-dimsum-slot="dsFastlistItem"]');
206
+ }
207
+
208
+ static async getMenuitemMenuItemWrapperSlot() {
209
+ return $('[data-dimsum-slot="dsMenuitemMenuItemWrapper"]');
210
+ }
211
+
212
+ static async getMenuitemMenuItemsContentWrapperSlotByIndex(index) {
213
+ return $$('[data-dimsum-slot="dsMenuitemMenuItemContentWrapper"]')[index];
214
+ }
215
+
216
+ static async getMenuitemMenuItemLabelSlotByIndex(index) {
217
+ return $$('[data-dimsum-slot="dsMenuitemMenuItemLabel"]')[index];
218
+ }
219
+
220
+ static async getComboboxLoadingIndicator() {
221
+ return $('[data-dimsum-parent-slot="dsComboboxLoadingIndicator"]');
222
+ }
223
+
224
+ static async getComboboxSkeletonMenuItem() {
225
+ return $('[data-dimsum-parent-slot="dsComboboxSkeletonMenuItem"]');
226
+ }
227
+ // Slots end
228
+
155
229
  // actions
156
230
 
157
231
  static async openMenuUsingKeyboard() {
@@ -0,0 +1,70 @@
1
+ /* eslint-disable max-lines */
2
+ import DSComboboxSingleCO from '../DSComboboxSingleCO';
3
+
4
+ if (
5
+ (!browser.capabilities['ice:options'].isPhone &&
6
+ !browser.capabilities['ice:options'].isTablet &&
7
+ browser.capabilities.browserName === 'chrome') ||
8
+ browser.capabilities.browserName === 'Chrome'
9
+ ) {
10
+ describe('PUI-16558 - ComboboxSingle:: Slots - Controlled Menu Customization', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSComboboxSingleCO.controlledMenuStateAdvancedCustomizationTest.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('01: should have custom data-* and aria-*', async () => {
16
+ const comboboxRootSlot = await DSComboboxSingleCO.getComboboxRootSlot();
17
+ const comboboxInputWrapperSlot = await DSComboboxSingleCO.getComboboxInputWrapperSlot();
18
+ const comboboxInputSlot = await DSComboboxSingleCO.getComboboxInputSlot();
19
+ const comboboxDropdownButtonSlot = await DSComboboxSingleCO.getComboboxDropDownMenuBtnSlot();
20
+ const comboboxFastlistWrapperList = await DSComboboxSingleCO.getFastListWrapperListSlot();
21
+ const comboboxMenuItemContent = await DSComboboxSingleCO.getMenuitemMenuItemsContentWrapperSlotByIndex(0);
22
+ const comboboxMenuItemLabel = await DSComboboxSingleCO.getMenuitemMenuItemLabelSlotByIndex(0);
23
+
24
+ await expect(comboboxRootSlot).toHaveAttribute('aria-label', 'Combobox with custom attributes');
25
+ await expect(comboboxInputWrapperSlot).toHaveAttribute(
26
+ 'aria-label',
27
+ 'Combobox input wrapper with custom attributes',
28
+ );
29
+ await expect(comboboxInputSlot).toHaveAttribute('aria-label', 'Combobox input with custom attributes');
30
+ await expect(comboboxDropdownButtonSlot).toHaveAttribute('aria-label', 'Combobox dropdown toggle menu button');
31
+ await expect(comboboxFastlistWrapperList).toHaveAttribute(
32
+ 'aria-label',
33
+ 'Combobox fast list wrapper with custom attributes',
34
+ );
35
+ await expect(comboboxMenuItemContent).toHaveAttribute('data-testid', 'custom-menu-item-content-wrapper-0');
36
+ await expect(comboboxMenuItemLabel).toHaveAttribute(
37
+ 'aria-label',
38
+ 'Custom Luke Skywalker too long this text is super long',
39
+ );
40
+ });
41
+ });
42
+
43
+ describe('PUI-16559 - ComboboxSingle:: Slots - loading advanced customization', () => {
44
+ before('loading page', async () => {
45
+ const errorOnGo = await DSComboboxSingleCO.loadingAdvancedCustomizationTest.go();
46
+ if (errorOnGo) throw errorOnGo;
47
+ });
48
+ it('01: should have custom data-* and aria-*', async () => {
49
+ const combobox = await DSComboboxSingleCO.getCombobox();
50
+ await combobox.click();
51
+ const dsComboboxLoadingIndicator = await DSComboboxSingleCO.getComboboxLoadingIndicator();
52
+
53
+ await expect(dsComboboxLoadingIndicator).toHaveAttribute('aria-label', 'Loading characters...');
54
+ });
55
+ });
56
+
57
+ describe('PUI-16560 - ComboboxSingle:: Slots - skeleton advanced customization', () => {
58
+ before('loading page', async () => {
59
+ const errorOnGo = await DSComboboxSingleCO.skeletonAdvancedCustomizationTest.go();
60
+ if (errorOnGo) throw errorOnGo;
61
+ });
62
+ it('01: should have custom data-* and aria-*', async () => {
63
+ const combobox = await DSComboboxSingleCO.getCombobox();
64
+ await combobox.click();
65
+ const comboboxSkeleton = await DSComboboxSingleCO.getComboboxSkeletonMenuItem();
66
+
67
+ await expect(comboboxSkeleton).toHaveAttribute('data-testid', 'ds-form-combobox-skeleton-menu-item');
68
+ });
69
+ });
70
+ }
@@ -138,7 +138,12 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
138
138
  const hourBtn = await DateTimePickerCO.getTimeWheelCurrentHour();
139
139
  await expect(hourBtn).toBeFocused();
140
140
  });
141
- it('25: should close calendar - Escape', async () => {
141
+ it('25: should focus selected day - Shift+Tab', async () => {
142
+ await browser.keys([Key.Shift, Key.Tab]);
143
+ const selectedDay = await DateTimePickerCO.getCalendarFocusedDay();
144
+ await expect(selectedDay).toBeFocused();
145
+ });
146
+ it('26: should close calendar - Escape', async () => {
142
147
  await browser.keys(Key.Escape);
143
148
  const calendar = await DateTimePickerCO.getControllerCalendarTimeWheel();
144
149
  const picker = await DateTimePickerCO.getCalendarTimeWheelPickerBtn();
@@ -137,7 +137,12 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
137
137
  const hourBtn = await DateTimePickerCO.getTimeWheelCurrentHour();
138
138
  await expect(hourBtn).toBeFocused();
139
139
  });
140
- it('25: should close calendar - Escape', async () => {
140
+ it('25: should focus selected day - Shift+Tab', async () => {
141
+ await browser.keys([Key.Shift, Key.Tab]);
142
+ const selectedDay = await DateTimePickerCO.getCalendarSelectedFocusedDay();
143
+ await expect(selectedDay).toBeFocused();
144
+ });
145
+ it('26: should close calendar - Escape', async () => {
141
146
  await browser.keys(Key.Escape);
142
147
  const calendar = await DateTimePickerCO.getControllerCalendarTimeWheel();
143
148
  const picker = await DateTimePickerCO.getCalendarTimeWheelPickerBtn();
@@ -138,7 +138,12 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
138
138
  const hourBtn = await DateTimePickerCO.getTimeWheelCurrentHour();
139
139
  await expect(hourBtn).toBeFocused();
140
140
  });
141
- it('25: should close calendar - Escape', async () => {
141
+ it('25: should focus selected day - Shift+Tab', async () => {
142
+ await browser.keys([Key.Shift, Key.Tab]);
143
+ const selectedDay = await DateTimePickerCO.getCalendarFocusedDay();
144
+ await expect(selectedDay).toBeFocused();
145
+ });
146
+ it('26: should close calendar - Escape', async () => {
142
147
  await browser.keys(Key.Escape);
143
148
  const calendar = await DateTimePickerCO.getControllerCalendarTimeWheel();
144
149
  const picker = await DateTimePickerCO.getCalendarTimeWheelPickerBtn();
@@ -89,7 +89,8 @@ if (
89
89
  });
90
90
  });
91
91
 
92
- describe('PUI-16270 - GlobalHeader: Controled with Iframe -AxeCore', () => {
92
+ // unskip after PUI-16505 is fixed
93
+ describe.skip('PUI-16270 - GlobalHeader: Controled with Iframe -AxeCore', () => {
93
94
  before(async () => {
94
95
  const errorOnGo = await GlobalHeaderCO.iframeURL.go();
95
96
  if (errorOnGo) throw errorOnGo;
@@ -47,7 +47,7 @@ if (
47
47
  });
48
48
  });
49
49
  // Defect PUI-14981
50
- describe('PUI-11417:: [NotificationBadge] Chip, Icon and Button integration - Axe-core Validation', () => {
50
+ describe.skip('PUI-11417:: [NotificationBadge] Chip, Icon and Button integration - Axe-core Validation', () => {
51
51
  before('loading page', async () => {
52
52
  const errorOnGo = await DSNotificationBadgeCO.componentCasesTest.go();
53
53
  if (errorOnGo) throw errorOnGo;