dimsum-e2e-tests 3.57.0-next.2 → 3.57.0-next.22

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 (38) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/ds-accordion/DSAccordionCO.js +1 -2
  3. package/ds-accordion/slots/DSAccordion.slots.func.spec.js +12 -0
  4. package/ds-card-navigation/CardNavigationCO.js +50 -0
  5. package/ds-card-navigation/DSCardNavigation.slots.func.spec.js +127 -0
  6. package/ds-card-navigation/DSCardNavigation.slots.visual.spec.js +26 -0
  7. package/ds-data-table-async/DSDataTableCO.js +6 -1
  8. package/ds-data-table-async/components/FilterBarCO.js +8 -0
  9. package/ds-data-table-async/components/FiltersCO.js +8 -0
  10. package/ds-data-table-async/filters/DSDataTable.free-text-search.keyboard.func.spec.js +70 -5
  11. package/ds-data-table-async/filters/DSDataTable.text-filters.func.spec.js +3 -3
  12. package/ds-data-table-async/select/DSDataTable.select.func.spec.js +1 -1
  13. package/ds-data-table-async/slots/DSDataTable.slots.func.spec.js +40 -0
  14. package/ds-data-table-async/slots/DSDataTable.slots.visual.spec.js +19 -0
  15. package/ds-dialog/DSDialog.visual.spec.js +1 -1
  16. package/ds-dialog/DSDialogCO.js +5 -13
  17. package/ds-dialog/axe-core/DSDialog.error.axe-core.func.spec.js +24 -0
  18. package/ds-dialog/axe-core/DSDialog.info.axe-core.func.spec.js +24 -0
  19. package/ds-dialog/axe-core/DSDialog.scroll-body.axe-core.func.spec.js +24 -0
  20. package/ds-dialog/axe-core/DSDialog.success.axe-core.func.spec.js +24 -0
  21. package/ds-dialog/axe-core/DSDialog.warning.axe-core.spec.func.js +24 -0
  22. package/ds-form-combobox-multi/DSComboboxMultiCO.js +80 -1
  23. package/ds-form-combobox-multi/slots/DSComboboxMulti.slots.func.spec.js +100 -0
  24. package/ds-form-combobox-multi/slots/DSComboboxMulti.slots.visual.spec.js +51 -0
  25. package/ds-form-combobox-single/DSComboboxSingleCO.js +16 -14
  26. package/ds-form-combobox-single/slots/DSComboboxSingle.slots.func.spec.js +65 -35
  27. package/ds-form-combobox-single/slots/DSComboboxSingle.slots.visual.spec.js +53 -0
  28. package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItem.axe-core.func.spec.js +4 -1
  29. package/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItemCO.js +4 -0
  30. package/{ds-toggle → ds-form-toggle}/DSToggle.axe-core.func.spec.js +6 -2
  31. package/{ds-toggle → ds-form-toggle}/DSToggle.func.spec.js +13 -8
  32. package/{ds-toggle → ds-form-toggle}/DSToggle.visual.spec.js +2 -2
  33. package/{ds-toggle → ds-form-toggle}/DSToggleCO.js +1 -1
  34. package/ds-menu-button/submenu/DSMenuButton.axe-core.subMenu.func.spec.js +1 -2
  35. package/ds-read-more/DSReadMore.width-change.visual.spec.js +85 -0
  36. package/package.json +187 -187
  37. package/paths.js +2 -0
  38. package/ds-dialog/DSDialog.smoke.spec.js +0 -133
@@ -0,0 +1,53 @@
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-17270 - ComboboxSingle:: Slots - Controlled Menu and Sections -Visual', () => {
11
+ before('loading page', async () => {
12
+ const errorOnGo = await DSComboboxSingleCO.controlledMenuStateWithSectionsSlotsTest.go();
13
+ if (errorOnGo) throw errorOnGo;
14
+ });
15
+ it('01: should display basic combobox single with customized slots', async () => {
16
+ await browser.eyesOpen();
17
+ const combobox = await DSComboboxSingleCO.getComboboxRootSlot();
18
+ await combobox.waitForDisplayed();
19
+ const snapshot = await browser.eyesCheckSnapshot(DSComboboxSingleCO.snapshotPath('combo-single-slots-basic'));
20
+ await expect(snapshot).toEqual(0);
21
+ });
22
+ });
23
+
24
+ describe('PUI-17271 - ComboboxSingle:: Slots - Loading Indicator -Visual', () => {
25
+ before('loading page', async () => {
26
+ const errorOnGo = await DSComboboxSingleCO.loadingIndicatorSlotsTest.go();
27
+ if (errorOnGo) throw errorOnGo;
28
+ });
29
+ it('01: should display combobox single with loading indicator with customized slots', async () => {
30
+ await browser.eyesOpen();
31
+ const combobox = await DSComboboxSingleCO.getComboboxRootSlot();
32
+ await combobox.click();
33
+ const snapshot = await browser.eyesCheckSnapshot(
34
+ DSComboboxSingleCO.snapshotPath('combo-single-slots-loading-indicator'),
35
+ );
36
+ await expect(snapshot).toEqual(0);
37
+ });
38
+ });
39
+
40
+ describe('PUI-17273 - ComboboxSingle:: Slots - Skeleton -Visual', () => {
41
+ before('loading page', async () => {
42
+ const errorOnGo = await DSComboboxSingleCO.skeletonSlotsTest.go();
43
+ if (errorOnGo) throw errorOnGo;
44
+ });
45
+ it('01: should display basic combobox single with skeleton with customized slots', async () => {
46
+ await browser.eyesOpen();
47
+ const combobox = await DSComboboxSingleCO.getComboboxRootSlot();
48
+ await combobox.click();
49
+ const snapshot = await browser.eyesCheckSnapshot(DSComboboxSingleCO.snapshotPath('combo-single-slots-skeleton'));
50
+ await expect(snapshot).toEqual(0);
51
+ });
52
+ });
53
+ }
@@ -142,10 +142,13 @@ if (
142
142
  const result = await axeCoreCheck();
143
143
  expect(result.length).toBe(0);
144
144
  });
145
- it('02: should have required attribute for required formLayoutBlock label', async () => {
145
+ it('02: should have required attribute and aria-hidden for required formLayoutBlock label', async () => {
146
146
  const formLayout = await DSFormLayoutBlockItemCO.getBlockContainersByIndex(0);
147
147
  await formLayout.waitForDisplayed();
148
+ const star = await DSFormLayoutBlockItemCO.getRequiredStarFromindex();
149
+ const ariaHidden = await star.getAttribute('aria-hidden');
148
150
  const isRequired = await formLayout.getAttribute('required');
151
+ expect(ariaHidden).toEqual('true');
149
152
  expect(isRequired).toBe('true');
150
153
  });
151
154
  });
@@ -43,6 +43,10 @@ export default class DSFormLayoutBlockItemCO extends PageObject {
43
43
  return $$('[data-testid="ds-inputtext-input"]')[index];
44
44
  }
45
45
 
46
+ static async getRequiredStarFromIndex(index = 0) {
47
+ return $$('[data-testid="ds-formlayoutblockitem-mark"]')[index];
48
+ }
49
+
46
50
  static async getTextFocuseableByIndex(index = 0) {
47
51
  return $$(`[data-testid="ds-input-text-root"]`)[index];
48
52
  }
@@ -13,7 +13,7 @@ if (
13
13
  ) {
14
14
  describe('PUI-11929 - DSControlledToggle - Axe-Core - showcase', () => {
15
15
  before('loading page', async () => {
16
- const errorOnGo = await DSToggleCO.showOffURL.go();
16
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
17
17
  if (errorOnGo) throw errorOnGo;
18
18
  });
19
19
  it('01: should pass axe-core check for showcase example', async () => {
@@ -27,10 +27,14 @@ if (
27
27
  expect(result.length).toBe(0);
28
28
  });
29
29
  it('03: should pass axe-core check for showcase example - readOnly interaction', async () => {
30
- await tabStops(6);
30
+ await tabStops(3);
31
31
  const result = await axeCoreCheck();
32
32
  expect(result.length).toBe(0);
33
33
  });
34
+ it('04: all toggles should have role switch', async () => {
35
+ const toggleRoles = await $$('button[role="switch"]');
36
+ expect(toggleRoles.length).toBe(32);
37
+ });
34
38
  });
35
39
  describe('PUI-14182 - [Toggle] applyAriaDisabled prop - axe-core test', () => {
36
40
  before('loading page', async () => {
@@ -100,23 +100,28 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
100
100
  });
101
101
  describe('PUI-8814 - DSControlledToggle:: Tabbing', () => {
102
102
  before('loading page', async () => {
103
- const errorOnGo = await DSToggleCO.showOffURL.go();
103
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
104
104
  if (errorOnGo) throw errorOnGo;
105
105
  await (await DSToggleCO.getToggle()).waitForExist();
106
106
  });
107
107
  it('01: should tab through the basic toggles to the last basic toggle', async () => {
108
- await tabStops(6);
109
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(4);
108
+ await tabStops(2);
109
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(1);
110
110
  await expect(toggle).toBeFocused();
111
111
  });
112
- it('02: should tab and skip all three disabled toggles to the first enabled toggle, next row', async () => {
113
- await browser.keys(Key.Tab);
114
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(11);
112
+ it('02: should tab and skip all disabled toggles to the first enabled toggle, next row', async () => {
113
+ await tabStops(5);
114
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(8);
115
115
  await expect(toggle).toBeFocused();
116
116
  });
117
117
  it('03: should tab through the readonly toggles to the last readonly toggle', async () => {
118
- await tabStops(5);
119
- const toggle = await DSToggleCO.getToggleFocuseableByIndex(16);
118
+ await tabStops(3);
119
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(11);
120
+ await expect(toggle).toBeFocused();
121
+ });
122
+ it('04: should tab through the aria-disabled toggles to the last aria-disabled toggle', async () => {
123
+ await tabStops(2);
124
+ const toggle = await DSToggleCO.getToggleFocuseableByIndex(13);
120
125
  await expect(toggle).toBeFocused();
121
126
  });
122
127
  });
@@ -4,12 +4,12 @@ import DSToggleCO from './DSToggleCO';
4
4
  if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
5
  describe('PUI-6757 - DSControlledToggle - Visual Test - showcase', () => {
6
6
  before('loading page', async () => {
7
- const errorOnGo = await DSToggleCO.showOffURL.go();
7
+ const errorOnGo = await DSToggleCO.fullShowcase.go();
8
8
  if (errorOnGo) throw errorOnGo;
9
9
  });
10
10
  it('01: should display all DSControlledToggle styles correctly', async () => {
11
11
  await (await DSToggleCO.getToggleByIndex(0)).waitForExist();
12
- const snapshot = await browser.checkSnapshot(DSToggleCO.snapshotPath('show-off'));
12
+ const snapshot = await browser.checkSnapshot(DSToggleCO.snapshotPath('full-showcase'));
13
13
  await expect(snapshot).toEqual(0);
14
14
  });
15
15
  });
@@ -2,7 +2,7 @@ import { PATH_E2E_TOGGLE } from '../paths';
2
2
  import { PageObject, Urlbuilder } from '../helpers';
3
3
 
4
4
  export default class DSToggleCO extends PageObject {
5
- static showOffURL = new Urlbuilder(PATH_E2E_TOGGLE, 'show-off-test');
5
+ static fullShowcase = new Urlbuilder(PATH_E2E_TOGGLE, 'full-showcase-test');
6
6
 
7
7
  static basicURL = new Urlbuilder(PATH_E2E_TOGGLE, 'basic-test');
8
8
 
@@ -9,8 +9,7 @@ if (
9
9
  browser.capabilities.browserName === 'Chrome') ||
10
10
  browser.capabilities.browserName === 'chrome'
11
11
  ) {
12
- // unskip after PUI-16416 is fixed
13
- describe.skip('PUI-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
12
+ describe('PUI-14644 - DSMenuButton:: Submenu Menu Item && Action Menu Item - AxeCore', () => {
14
13
  before('loading page', async () => {
15
14
  const errorOnGo = await DSMenuButtonCO.withSubmenuMenuItem.go();
16
15
  if (errorOnGo) throw errorOnGo;
@@ -0,0 +1,85 @@
1
+ import { Key } from 'webdriverio';
2
+ import DSReadMoreCO from './DSReadMoreCO';
3
+
4
+ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
5
+ describe('PUI-17358 - Read More:: width change -Visual', () => {
6
+ beforeEach('loading page', async () => {
7
+ const errorOnGo = await DSReadMoreCO.widthChange.go();
8
+ if (errorOnGo) throw errorOnGo;
9
+ });
10
+ it('01: should display readmore at 100px width - read more', async () => {
11
+ await browser.eyesOpen();
12
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readmore'));
13
+ await expect(snapshot).toEqual(0);
14
+ });
15
+ it('02: should display readmore at 100px width - read less', async () => {
16
+ await browser.eyesOpen();
17
+ await browser.keys(Key.Tab);
18
+ await browser.keys(Key.Enter);
19
+ await browser.keys(Key.Tab);
20
+ await browser.keys(Key.Enter);
21
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-100-readless'));
22
+ await expect(snapshot).toEqual(0);
23
+ });
24
+ it('03: should display readmore at 200px width - read more', async () => {
25
+ await browser.eyesOpen();
26
+ await $('button*=Change the widths').click();
27
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readmore'));
28
+ await expect(snapshot).toEqual(0);
29
+ });
30
+ it('04: should display readmore at 200px width - read less', async () => {
31
+ await browser.eyesOpen();
32
+ await $('button*=Change the widths').click();
33
+ await browser.keys([Key.Shift, Key.Tab]);
34
+ await browser.keys([Key.Shift, Key.Tab]);
35
+ await browser.keys([Key.Shift, Key.Tab]);
36
+ await browser.keys(Key.Enter);
37
+ await browser.keys([Key.Shift, Key.Tab]);
38
+ await browser.keys(Key.Enter);
39
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-200-readless'));
40
+ await expect(snapshot).toEqual(0);
41
+ });
42
+ it('05: should display readmore at 300px width - read more', async () => {
43
+ await browser.eyesOpen();
44
+ await $('button*=Change the widths').click();
45
+ await $('button*=Change the widths').click();
46
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readmore'));
47
+ await expect(snapshot).toEqual(0);
48
+ });
49
+ it('06: should display readmore at 300px width - read less', async () => {
50
+ await browser.eyesOpen();
51
+ await $('button*=Change the widths').click();
52
+ await $('button*=Change the widths').click();
53
+ await browser.keys([Key.Shift, Key.Tab]);
54
+ await browser.keys([Key.Shift, Key.Tab]);
55
+ await browser.keys([Key.Shift, Key.Tab]);
56
+ await browser.keys(Key.Enter);
57
+ await browser.keys([Key.Shift, Key.Tab]);
58
+ await browser.keys(Key.Enter);
59
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-300-readless'));
60
+ await expect(snapshot).toEqual(0);
61
+ });
62
+ it('07: should display readmore at 400px width - read more', async () => {
63
+ await browser.eyesOpen();
64
+ await $('button*=Change the widths').click();
65
+ await $('button*=Change the widths').click();
66
+ await $('button*=Change the widths').click();
67
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readmore'));
68
+ await expect(snapshot).toEqual(0);
69
+ });
70
+ it('08: should display readmore at 400px width - read less', async () => {
71
+ await browser.eyesOpen();
72
+ await $('button*=Change the widths').click();
73
+ await $('button*=Change the widths').click();
74
+ await $('button*=Change the widths').click();
75
+ await browser.keys([Key.Shift, Key.Tab]);
76
+ await browser.keys([Key.Shift, Key.Tab]);
77
+ await browser.keys([Key.Shift, Key.Tab]);
78
+ await browser.keys(Key.Enter);
79
+ await browser.keys([Key.Shift, Key.Tab]);
80
+ await browser.keys(Key.Enter);
81
+ const snapshot = await browser.eyesCheckSnapshot(DSReadMoreCO.snapshotPath('width-400-readless'));
82
+ await expect(snapshot).toEqual(0);
83
+ });
84
+ });
85
+ }