dimsum-e2e-tests 3.70.0-next.53 → 3.70.0-next.55

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 (96) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/ds-accordion/DSAccordionCO.js +4 -0
  3. package/ds-accordion/QA_NOTES.md +105 -0
  4. package/ds-accordion/header-structure/DSAccordion.header-structure.func.spec.js +24 -8
  5. package/ds-accordion/input-inside/DSAccordion.input-inside.func.spec.js +3 -1
  6. package/ds-apppicker/truncation/DSAppPicker.truncation.visual.spec.js +5 -9
  7. package/ds-card-v3/DSCardV3CO.js +1 -1
  8. package/ds-card-v3/accordion/DSCardV3.accordion-aria.keyboard.func.spec.js +49 -0
  9. package/ds-card-v3/accordion/DSCardV3.accordion.axe-core.func.spec.js +2 -2
  10. package/ds-card-v3/action/DSCardV3.action.axe-core.func.spec.js +24 -0
  11. package/ds-card-v3/action/DSCardV3.action.func.spec.js +53 -0
  12. package/ds-card-v3/action/DSCardV3.action.visual.spec.js +28 -0
  13. package/ds-card-v3/drag-n-drop/DSCardV3.DnD.axe-core.func.spec.js +0 -19
  14. package/ds-card-v3/multi-select/DSCardV3.multiselect.axe-core.func.spec.js +47 -0
  15. package/ds-card-v3/multiple-action/DSCardV3.multiple-action.axe-core.func.spec.js +35 -0
  16. package/ds-card-v3/multiple-control/DSCardV3.multi-control.axe-core.func.spec.js +34 -0
  17. package/ds-card-v3/multiple-control/DSCardV3.multi-control.func.spec.js +2 -1
  18. package/ds-card-v3/multiple-control/DSCardV3.multi-control.visual.spec.js +29 -0
  19. package/ds-card-v3/no-action/DSCardV3.no-action.axe-core.func.spec.js +1 -1
  20. package/ds-card-v3/notification-badges/DSCardV3.notification-badges.axe-core.func.spec.js +33 -0
  21. package/ds-card-v3/notification-badges/DSCardV3.notification-badges.visual.spec.js +28 -0
  22. package/ds-card-v3/variant-accented/DSCardV3.variant-accented.axe-core.func.spec.js +45 -0
  23. package/ds-card-v3/variant-accented-disabled/DSCardV3.variant-accented-disabled.axe-core.func.spec.js +35 -0
  24. package/ds-card-v3/variant-accented-disabled/DSCardV3.variant-accented-disabled.visual.spec.js +28 -0
  25. package/ds-card-v3/variant-disabled/DSCardV3.variant-disabled.axe-core.func.spec.js +1 -1
  26. package/ds-card-v3/variant-disabled/DSCardV3.variant-disabled.func.spec.js +61 -0
  27. package/ds-card-v3/variant-disabled/DSCardV3.variant-disabled.visual.spec.js +20 -0
  28. package/ds-card-v3/{disabled/DSCardV3.disabled-non-interactive.func.spec.js → variant-disabled/DSCardV3.variantDisabled-non-interactive.func.spec.js} +1 -1
  29. package/ds-chat/DSChat.visual.spec.js +1 -1
  30. package/ds-chat/DSChatCO.js +12 -12
  31. package/ds-chat/components/CardCO.js +1 -3
  32. package/ds-chat/components/ComposerCO.js +1 -1
  33. package/ds-chat/components/FloatingButtonCO.js +4 -2
  34. package/ds-chat/floatingbutton/DSChat-floating-button.visual.spec.js +1 -1
  35. package/ds-controlled-form/ds-controlled-checkbox/Basic/DSControlledCheckbox.axe-core.basic.func.spec.js +4 -4
  36. package/ds-controlled-form/ds-controlled-checkbox/Basic/DSControlledCheckbox.basic.visual.spec.js +56 -0
  37. package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO.js +4 -0
  38. package/ds-controlled-form/ds-controlled-checkbox/Disabled/DSControlledCheckbox.axe-core.disabled.func.spec.js +1 -1
  39. package/ds-controlled-form/ds-controlled-checkbox/Disabled/DSControlledCheckbox.disabled.visual.spec.js +1 -1
  40. package/ds-controlled-form/ds-controlled-checkbox/HasError/DSControlledCheckbox.axe-core.hasError.func.spec.js +4 -4
  41. package/ds-controlled-form/ds-controlled-checkbox/HasError/DSControlledCheckbox.has-error.visual.spec.js +71 -1
  42. package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.axe-core.mixed.func.spec.js +4 -4
  43. package/ds-controlled-form/ds-controlled-checkbox/Mixed/DSControlledCheckbox.mixed.visual.spec.js +1 -1
  44. package/ds-controlled-form/ds-controlled-checkbox/ReadOnly/DSControlledCheckbox.axe-core.read-only.func.spec.js +3 -3
  45. package/ds-controlled-form/ds-controlled-checkbox/ReadOnly/DSControlledCheckbox.read-only.visual.spec.js +1 -1
  46. package/ds-controlled-form/ds-controlled-checkbox/WithTooltip/DSControlledCheckbox.axe-core.with-tooltip.func.spec.js +1 -1
  47. package/ds-controlled-form/ds-controlled-checkbox/WithTooltip/DSControlledCheckbox.with-tooltip.visual.spec.js +1 -3
  48. package/ds-controlled-form/ds-controlled-checkbox/WrapLabel/DSControlledCheckbox.axe-core.wrap-label.func.spec.js +1 -1
  49. package/ds-controlled-form/ds-controlled-checkbox/WrapLabel/DSControlledCheckbox.wrap-label.visual.spec.js +1 -1
  50. package/ds-controlled-form/ds-controlled-checkbox/aria-disabled/DSControlledCheckbox.aria-disabled.visual.spec.js +2 -6
  51. package/ds-controlled-form/ds-controlled-checkbox/aria-disabled/DSControlledCheckbox.axe-core.aria-disabled.func.spec.js +1 -1
  52. package/ds-controlled-form/ds-controlled-checkbox-group/DSControlledCheckboxGroup.axe-core.func.spec.js +4 -4
  53. package/ds-controlled-form/ds-controlled-checkbox-group/DSControlledCheckboxGroup.visual.spec.js +1 -1
  54. package/ds-data-table-async/filtersV2/DSDataTable.filtersV2-creatablemultiselect.keyboard.func.spec.js +2 -2
  55. package/ds-data-table-async/filtersV2/DSDataTable.filtersV2-creatableselect.keyboard.func.spec.js +2 -2
  56. package/ds-data-table-async/pagination/DSDataTable.pagination.func.spec.js +3 -2
  57. package/ds-data-table-async/resizable/DSDataTable.resizerA11y.func.spec.js +14 -0
  58. package/ds-data-table-async/vissibility/DSDataTable.vissibility.visual.spec.js +2 -0
  59. package/ds-dataviz/DSDataVizCO.js +2 -0
  60. package/ds-dataviz/axecore/DSDataViz.axis.axe-core.func.spec.js +1 -1
  61. package/ds-form-combobox-multi/DSComboboxMultiCO.js +11 -0
  62. package/ds-form-combobox-multi/pills/DSComboboxMulti.pills.func.spec.js +59 -0
  63. package/ds-form-combobox-multi/pills/DSComboboxMulti.pills.visual.spec.js +39 -0
  64. package/ds-form-combobox-multi/with-tooltip/DSComboboxMulti.with-tooltip.axe-core.func.spec.js +39 -0
  65. package/ds-form-combobox-multi/with-tooltip/DSComboboxMulti.with-tooltip.func.spec.js +39 -0
  66. package/ds-form-combobox-multi/with-tooltip/DSComboboxMulti.with-tooltip.visual.spec.js +29 -0
  67. package/ds-form-combobox-single/DSComboboxSingleCO.js +2 -0
  68. package/ds-form-combobox-single/with-tooltip/DSComboboxSingle.with-tooltip.axe-core.func.spec.js +39 -0
  69. package/ds-form-combobox-single/with-tooltip/DSComboboxSingle.with-tooltip.func.spec.js +39 -0
  70. package/ds-form-combobox-single/with-tooltip/DSComboboxSingle.with-tooltip.visual.spec.js +29 -0
  71. package/ds-hooks/DSHook.usetree.func.spec.js +3 -2
  72. package/ds-hooks/useMask/Number/UseNumberMask.axe-core.func.spec.js +48 -0
  73. package/ds-pills-v2/DSPillsV2CO.js +12 -0
  74. package/ds-pills-v2/apply-aria-disabled/DSPills.applyAriaDisabled.func.spec.js +53 -0
  75. package/ds-pills-v2/apply-aria-disabled/DSPills.applyAriaDisabled.visual.spec.js +26 -0
  76. package/ds-pills-v2/disabled/DSPills.disabled.func.spec.js +53 -0
  77. package/ds-pills-v2/disabled/DSPills.disabled.visual.spec.js +33 -0
  78. package/package.json +150 -150
  79. package/paths.js +3 -3
  80. package/ds-accordion-native/DSAccordionNative.axe-core.func.spec.js +0 -135
  81. package/ds-accordion-native/DSAccordionNative.func.spec.js +0 -200
  82. package/ds-accordion-native/DSAccordionNative.visual.spec.js +0 -158
  83. package/ds-accordion-native/DSAccordionNativeCO.js +0 -178
  84. package/ds-accordion-native/QA_NOTES.md +0 -151
  85. package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.axe-core.func.spec.js +0 -25
  86. package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.visual.spec.js +0 -28
  87. package/ds-accordion-native/controlled/DSAccordionNative.controlled.func.spec.js +0 -22
  88. package/ds-accordion-native/header-structure/DSAccordionNative.header-structure.func.spec.js +0 -52
  89. package/ds-accordion-native/input-inside/DSAccordionNative.input-inside.func.spec.js +0 -16
  90. package/ds-accordion-native/role/DSAccordionNative.role-heading.func.spec.js +0 -27
  91. package/ds-accordion-native/scrollable-content/DSAccordionNative.scrollable-content.visual.spec.js +0 -49
  92. package/ds-accordion-native/slots/DSAccordionNative.slots.axe-core.func.spec.js +0 -25
  93. package/ds-accordion-native/slots/DSAccordionNative.slots.func.spec.js +0 -73
  94. package/ds-accordion-native/slots/DSAccordionNative.slots.visual.spec.js +0 -21
  95. package/ds-accordion-native/wrapLabel/DSAccordionNative.wrap-label.visual.spec.js +0 -21
  96. package/ds-card-v3/disabled/DSCardV3.disabled.visual.spec.js +0 -16
@@ -1,135 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { Key } from 'webdriverio';
3
- import DSAccordionNativeCO from './DSAccordionNativeCO';
4
- import { axeCoreCheck } from '../helpers';
5
-
6
- if (
7
- (!browser.capabilities['ice:options'].isPhone &&
8
- !browser.capabilities['ice:options'].isTablet &&
9
- browser.capabilities.browserName === 'chrome') ||
10
- browser.capabilities.browserName === 'Chrome'
11
- ) {
12
- describe('PUI-18083 - AccordionNative, header controls & subtitle -AxeCore', () => {
13
- before('loading page', async () => {
14
- const errorOnGo = await DSAccordionNativeCO.headerControls.go();
15
- if (errorOnGo) throw errorOnGo;
16
- });
17
- it('01: should display accordion expanded with header props (and subtitle) and pass axecore scan', async () => {
18
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
19
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
20
- const content = await DSAccordionNativeCO.getContents(1);
21
- await content.waitForDisplayed();
22
- const result = await axeCoreCheck();
23
- expect(result.length).toBe(0);
24
- });
25
- it('02: should display accordion with open toolbar and pass axecore scan', async () => {
26
- await (await DSAccordionNativeCO.getToolbarByIndex(1)).click();
27
- const result = await axeCoreCheck();
28
- expect(result.length).toBe(0);
29
- });
30
- });
31
-
32
- describe('PUI-18083 - AccordionNative, basic -AxeCore', () => {
33
- before('loading page', async () => {
34
- const errorOnGo = await DSAccordionNativeCO.basicURL.go();
35
- if (errorOnGo) throw errorOnGo;
36
- });
37
- it('01: should display the accordion closed and pass axecore test', async () => {
38
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
39
- const result = await axeCoreCheck();
40
- expect(result.length).toBe(0);
41
- });
42
- it('02: should open the accordion and pass axecore test', async () => {
43
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
44
- const content = await DSAccordionNativeCO.getContents(1);
45
- await content.waitForDisplayed();
46
- const result = await axeCoreCheck();
47
- expect(result.length).toBe(0);
48
- });
49
- });
50
-
51
- describe('PUI-18083 - AccordionNative, Disabled -AxeCore', () => {
52
- before('loading page', async () => {
53
- const errorOnGo = await DSAccordionNativeCO.disabled.go();
54
- if (errorOnGo) throw errorOnGo;
55
- });
56
- it('01: should display the disabled accordion and pass axecore test', async () => {
57
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
58
- const result = await axeCoreCheck();
59
- expect(result.length).toBe(0);
60
- });
61
- });
62
-
63
- describe('PUI-18083 - AccordionNative, multiple -AxeCore', () => {
64
- before('loading page', async () => {
65
- const errorOnGo = await DSAccordionNativeCO.multipleURL.go();
66
- if (errorOnGo) throw errorOnGo;
67
- });
68
- it('01: should open the second accordion without closing the first and pass axecore test', async () => {
69
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
70
- await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
71
- const firstContent = await DSAccordionNativeCO.getContents(0);
72
- const secondContent = await DSAccordionNativeCO.getContents(1);
73
- await firstContent.waitForDisplayed();
74
- await secondContent.waitForDisplayed();
75
- const result = await axeCoreCheck();
76
- expect(result.length).toBe(0);
77
- });
78
- });
79
-
80
- describe('PUI-18083 - AccordionNative, Custom actions with hooks -AxeCore', () => {
81
- before('loading page', async () => {
82
- const errorOnGo = await DSAccordionNativeCO.customActionHooks.go();
83
- if (errorOnGo) throw errorOnGo;
84
- });
85
- it('01: should have custom actions rendered and pass axecore scan', async () => {
86
- const customAction1text = await DSAccordionNativeCO.getButtonsByIndex(0);
87
- const customAction2text = await DSAccordionNativeCO.getButtonsByIndex(1);
88
- const customAction3text = await DSAccordionNativeCO.getButtonsByIndex(2);
89
- await customAction1text.waitForDisplayed();
90
- await customAction2text.waitForDisplayed();
91
- await customAction3text.waitForDisplayed();
92
- const result = await axeCoreCheck();
93
- expect(result.length).toBe(0);
94
- });
95
- });
96
-
97
- describe('PUI-18083 - AccordionNative, Actionable within -AxeCore', () => {
98
- before('loading page', async () => {
99
- const errorOnGo = await DSAccordionNativeCO.datepickerInside.go();
100
- if (errorOnGo) throw errorOnGo;
101
- });
102
- it('01: should input focused within accordion and pass axecore scan', async () => {
103
- await browser.keys(Key.Tab);
104
- await browser.keys(Key.Tab);
105
- const result = await axeCoreCheck();
106
- expect(result.length).toBe(0);
107
- });
108
- });
109
-
110
- describe('PUI-18083 - AccordionNative, keep content mounted -a11y', () => {
111
- before('loading page', async () => {
112
- const errorOnGo = await DSAccordionNativeCO.keepContentURL.go();
113
- if (errorOnGo) throw errorOnGo;
114
- });
115
- it('01: should be a11y compliant with hidden accordion content', async () => {
116
- const accordionContent = await $('[data-testid="accordion-native-keep-content"]');
117
- await accordionContent.waitForExist();
118
- const result = await axeCoreCheck();
119
- expect(result.length).toBe(0);
120
- });
121
- });
122
-
123
- describe('PUI-18083 - AccordionNative, Focus with useRef -a11y', () => {
124
- before('loading page', async () => {
125
- const errorOnGo = await DSAccordionNativeCO.focusOnItemURL.go();
126
- if (errorOnGo) throw errorOnGo;
127
- });
128
- it('01: should be a11y compliant with useRef', async () => {
129
- const secondAccordion = await DSAccordionNativeCO.getAccordionHeader(1);
130
- await secondAccordion.waitForDisplayed();
131
- const result = await axeCoreCheck();
132
- expect(result.length).toBe(0);
133
- });
134
- });
135
- }
@@ -1,200 +0,0 @@
1
- /* eslint-disable max-lines */
2
- import { Key } from 'webdriverio';
3
- import DSAccordionNativeCO from './DSAccordionNativeCO';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone) {
6
- describe('PUI-18083 - AccordionNative, basic -func', () => {
7
- before('loading page', async () => {
8
- const errorOnGo = await DSAccordionNativeCO.basicURL.go();
9
- if (errorOnGo) throw errorOnGo;
10
- });
11
- it('01: should display the accordion closed', async () => {
12
- const firstContent = await DSAccordionNativeCO.getContents(1);
13
- await expect(firstContent).not.toBeDisplayedInViewport();
14
- });
15
- it('02: should open the accordion', async () => {
16
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
17
- const firstContent = await DSAccordionNativeCO.getContents(1);
18
- await expect(firstContent).toBeDisplayedInViewport();
19
- });
20
- it('03: should open the third accordion closing the second', async () => {
21
- await (await DSAccordionNativeCO.getAccordionHeader(2)).click();
22
- const firstContent = await DSAccordionNativeCO.getContents(1);
23
- const secondContent = await DSAccordionNativeCO.getContents(2);
24
- await expect(firstContent).not.toBeDisplayedInViewport();
25
- await expect(secondContent).toBeDisplayedInViewport();
26
- });
27
- it('04: should close the accordion', async () => {
28
- await (await DSAccordionNativeCO.getAccordionHeader(2)).click();
29
- const secondContent = await DSAccordionNativeCO.getContents(2);
30
- await expect(secondContent).not.toBeDisplayedInViewport();
31
- });
32
- });
33
- }
34
-
35
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
36
- describe('PUI-18083 - AccordionNative, multiple -func', () => {
37
- before('loading page', async () => {
38
- const errorOnGo = await DSAccordionNativeCO.multipleURL.go();
39
- if (errorOnGo) throw errorOnGo;
40
- });
41
- it('01: should display the accordion expanded', async () => {
42
- await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
43
- const firstContent = await DSAccordionNativeCO.getContents(0);
44
- await expect(firstContent).toBeDisplayedInViewport();
45
- });
46
- it('02: should open the second accordion without closing the first', async () => {
47
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
48
- const firstContent = await DSAccordionNativeCO.getContents(0);
49
- const secondContent = await DSAccordionNativeCO.getContents(1);
50
- await expect(firstContent).toBeDisplayedInViewport();
51
- await expect(secondContent).toBeDisplayedInViewport();
52
- });
53
- it('03: should close the second accordion', async () => {
54
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
55
- const firstContent = await DSAccordionNativeCO.getContents(0);
56
- const secondContent = await DSAccordionNativeCO.getContents(1);
57
- await expect(firstContent).toBeDisplayedInViewport();
58
- await expect(secondContent).not.toBeDisplayedInViewport();
59
- });
60
- it('04: should close the first accordion', async () => {
61
- await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
62
- const firstContent = await DSAccordionNativeCO.getContents(0);
63
- const secondContent = await DSAccordionNativeCO.getContents(1);
64
- await expect(firstContent).not.toBeDisplayedInViewport();
65
- await expect(secondContent).not.toBeDisplayedInViewport();
66
- });
67
- });
68
-
69
- describe('PUI-18083 - AccordionNative, keyboard nav -a11y', () => {
70
- before('loading page', async () => {
71
- const errorOnGo = await DSAccordionNativeCO.customActions.go();
72
- if (errorOnGo) throw errorOnGo;
73
- });
74
- it('01: should press tab and focus on first accordion', async () => {
75
- const firstAccordion = await DSAccordionNativeCO.getAccordionHeader(0);
76
- await browser.keys(Key.Tab);
77
- await expect(firstAccordion).toBeFocused();
78
- });
79
- // The POC renders the custom action as a SIBLING of <summary>, not inside it,
80
- // so tabbing from summary lands on the action button next — same observable
81
- // tab order as the prod accordion, achieved via DOM order instead of slot
82
- // embedding.
83
- it('02: should focus the first accordion button after press tab', async () => {
84
- await browser.keys(Key.Tab);
85
- const firstButton = await DSAccordionNativeCO.getButtonsByIndex(0);
86
- await expect(firstButton).toBeFocused();
87
- });
88
- it('03: should focus the second accordion and expand it after press tab and space', async () => {
89
- await browser.keys(Key.Tab);
90
- await browser.keys(Key.Space);
91
- const secondAccordion = await DSAccordionNativeCO.getAccordionHeader(1);
92
- const secondContent = await DSAccordionNativeCO.getContents(1);
93
- await expect(secondAccordion).toBeFocused();
94
- await expect(secondContent).toBeDisplayedInViewport();
95
- });
96
- it('04: should go back to the button when pressing shift+tab (goes backwards)', async () => {
97
- await browser.keys([Key.Shift, Key.Tab]);
98
- const firstButton = await DSAccordionNativeCO.getButtonsByIndex(0);
99
- await expect(firstButton).toBeFocused();
100
- });
101
- });
102
-
103
- describe('PUI-18083 - AccordionNative, Custom actions with hooks', () => {
104
- before('loading page', async () => {
105
- const errorOnGo = await DSAccordionNativeCO.customActionHooks.go();
106
- if (errorOnGo) throw errorOnGo;
107
- });
108
- it('01: should have custom actions rendered with ON text by default', async () => {
109
- const customAction1text = await (await DSAccordionNativeCO.getButtonsByIndex(0)).getText();
110
- const customAction2text = await (await DSAccordionNativeCO.getButtonsByIndex(1)).getText();
111
- const customAction3text = await (await DSAccordionNativeCO.getButtonsByIndex(2)).getText();
112
- await expect(customAction1text).toEqual('on');
113
- await expect(customAction2text).toEqual('on');
114
- await expect(customAction3text).toEqual('on');
115
- });
116
- it('02: should re-render the first two custom actions when activating them to have OFF text', async () => {
117
- const customAction1 = await DSAccordionNativeCO.getButtonsByIndex(0);
118
- await customAction1.click();
119
- await browser.keys(Key.Tab);
120
- await browser.keys(Key.Enter);
121
- await browser.keys(Key.Tab);
122
- await browser.keys(Key.Enter);
123
- const customAction1text = await customAction1.getText();
124
- const customAction2text = await (await DSAccordionNativeCO.getButtonsByIndex(1)).getText();
125
- const customAction3text = await (await DSAccordionNativeCO.getButtonsByIndex(2)).getText();
126
- await expect(customAction1text).toEqual('off');
127
- await expect(customAction2text).toEqual('off');
128
- await expect(customAction3text).toEqual('on');
129
- });
130
- });
131
-
132
- describe('PUI-18083 - AccordionNative, conditional render -Func', () => {
133
- before('loading page', async () => {
134
- const errorOnGo = await DSAccordionNativeCO.conditionalRender.go();
135
- if (errorOnGo) throw errorOnGo;
136
- });
137
- it('01: should display second accordion when condition is true', async () => {
138
- const headers = await DSAccordionNativeCO.getAccordionHeaders();
139
- // BaseRate, BaseRate2, BaseRate3 — index 1 is BaseRate2.
140
- await headers[1].click();
141
- const secondContent = await DSAccordionNativeCO.getContents(1);
142
- await expect(secondContent).toBeDisplayedInViewport();
143
- });
144
- it('02: should remove second accordion from DOM after toggle', async () => {
145
- const toggleBtn = await $('[data-testid="toggle-btn"]');
146
- await toggleBtn.click();
147
- // After the toggle, only 2 items remain (BaseRate + BaseRate3). Asserting
148
- // count is more robust than asserting visibility on a removed node.
149
- const headers = await DSAccordionNativeCO.getAccordionHeaders();
150
- await expect(headers.length).toEqual(2);
151
- });
152
- });
153
-
154
- describe('PUI-18083 - AccordionNative, keep content mounted -a11y', () => {
155
- before('loading page', async () => {
156
- const errorOnGo = await DSAccordionNativeCO.keepContentURL.go();
157
- if (errorOnGo) throw errorOnGo;
158
- });
159
- it('01: should have accordion closed and content existing in DOM by default', async () => {
160
- const accordionContent = await $('[data-testid="accordion-native-keep-content"]');
161
- await expect(accordionContent).toExist();
162
- await expect(accordionContent).not.toBeDisplayed();
163
- });
164
- it('02: should have accordion expanded and content visible', async () => {
165
- const firstAccordion = await DSAccordionNativeCO.getAccordionHeader(0);
166
- await firstAccordion.click();
167
- const accordionContent = await $('[data-testid="accordion-native-keep-content"]');
168
- await expect(accordionContent).toBeDisplayed();
169
- });
170
- it('03: should have accordion closed and content still in DOM', async () => {
171
- const firstAccordion = await DSAccordionNativeCO.getAccordionHeader(0);
172
- await firstAccordion.click();
173
- const accordionContent = await $('[data-testid="accordion-native-keep-content"]');
174
- await expect(accordionContent).not.toBeDisplayed();
175
- await expect(accordionContent).toExist();
176
- });
177
- });
178
-
179
- // Native exposes a usable ref on the summary via the `dsAccordionnativeItemSummary` slot
180
- // (verified: clicking the button focuses item 0's <summary>). Equivalent to the accordion
181
- // FocusOnItem pattern (`dsAccordionItemHeader={{ innerRef }}`).
182
- describe('PUI-18083 - AccordionNative, Focus with useRef -a11y', () => {
183
- before('loading page', async () => {
184
- const errorOnGo = await DSAccordionNativeCO.focusOnItemURL.go();
185
- if (errorOnGo) throw errorOnGo;
186
- });
187
- it('01: should focus second item manually', async () => {
188
- const secondAccordion = await DSAccordionNativeCO.getAccordionHeader(1);
189
- await browser.keys(Key.Tab);
190
- await browser.keys(Key.Tab);
191
- await expect(secondAccordion).toBeFocused();
192
- });
193
- it('02: should use button to focus the first accordion item via ref', async () => {
194
- const focusButton = await DSAccordionNativeCO.getButtonsByIndex(0);
195
- await focusButton.click();
196
- const firstAccordion = await DSAccordionNativeCO.getAccordionHeader(0);
197
- await expect(firstAccordion).toBeFocused();
198
- });
199
- });
200
- }
@@ -1,158 +0,0 @@
1
- import { Key } from 'webdriverio';
2
- import DSAccordionNativeCO from './DSAccordionNativeCO';
3
- import { mouseOver } from '../helpers';
4
-
5
- if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
6
- // Percy-aligned with ds-accordion (same describe + it titles) so snapshots compare
7
- // against the accordion baseline. Story content is equivalent. See POC_FINDINGS.md.
8
- describe('PUI-6111 - Accordion visual tests, basic', () => {
9
- before('loading page', async () => {
10
- const errorOnGo = await DSAccordionNativeCO.basicURL.go();
11
- if (errorOnGo) throw errorOnGo;
12
- });
13
- it('01: should display all closed', async () => {
14
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
15
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-closed'));
16
- await expect(snapshot).toEqual(0);
17
- });
18
- it('02: should display open first one', async () => {
19
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
20
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
21
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-one-open'));
22
- await expect(snapshot).toEqual(0);
23
- });
24
- it('03: should display focus on the second, hover on third', async () => {
25
- await mouseOver(await DSAccordionNativeCO.getAccordionHeader(2));
26
- const snapshot = await browser.checkSnapshot(
27
- DSAccordionNativeCO.snapshotPath('accordion-native-interacted-states'),
28
- );
29
- await expect(snapshot).toEqual(0);
30
- });
31
- });
32
-
33
- // Percy-aligned with ds-accordion: the native HeaderControlExamples story now renders the same
34
- // 3 sections incl. the MiniToolbar (DDmenu), so this snapshot compares against the accordion
35
- // baseline and surfaces the real layout deltas. See POC_FINDINGS.md.
36
- describe('PUI-7979 - Accordion, header props -visual', () => {
37
- before('loading page', async () => {
38
- const errorOnGo = await DSAccordionNativeCO.headerControls.go();
39
- if (errorOnGo) throw errorOnGo;
40
- });
41
- it('01: should display accordion expanded with header props', async () => {
42
- await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
43
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
44
- const content = await DSAccordionNativeCO.getContents(1);
45
- await content.waitForDisplayed();
46
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-header-props'));
47
- await expect(snapshot).toEqual(0);
48
- });
49
- it('02: should display accordion with open toolbar', async () => {
50
- await (await DSAccordionNativeCO.getToolbarByIndex(1)).click();
51
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-toolbar-props'));
52
- await expect(snapshot).toEqual(0);
53
- });
54
- });
55
-
56
- // Percy-aligned with ds-accordion. Story content is equivalent. See POC_FINDINGS.md.
57
- describe('PUI-7772 - Accordion, custom actions -visual', () => {
58
- before('loading page', async () => {
59
- const errorOnGo = await DSAccordionNativeCO.customActions.go();
60
- if (errorOnGo) throw errorOnGo;
61
- });
62
- it('01: should display accordion with custom actions collapsed', async () => {
63
- const snapshot = await browser.checkSnapshot(
64
- DSAccordionNativeCO.snapshotPath('accordion-native-customactions-col'),
65
- );
66
- await expect(snapshot).toEqual(0);
67
- });
68
- it('02: should display accordion with custom actions expanded', async () => {
69
- await (await DSAccordionNativeCO.getAccordionHeader(0)).waitForDisplayed();
70
- await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
71
- const snapshot = await browser.checkSnapshot(
72
- DSAccordionNativeCO.snapshotPath('accordion-native-customactions-exp'),
73
- );
74
- await expect(snapshot).toEqual(0);
75
- });
76
- });
77
-
78
- // Percy-aligned with ds-accordion. Story content is identical. See POC_FINDINGS.md.
79
- describe('PUI-7982 - Accordion, multiple -visual', () => {
80
- before('loading page', async () => {
81
- const errorOnGo = await DSAccordionNativeCO.multipleURL.go();
82
- if (errorOnGo) throw errorOnGo;
83
- });
84
- it('01: should corectly display two expanded accordions', async () => {
85
- await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
86
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
87
- const firstContent = await DSAccordionNativeCO.getContents(0);
88
- const secondContent = await DSAccordionNativeCO.getContents(1);
89
- await firstContent.waitForDisplayed();
90
- await secondContent.waitForDisplayed();
91
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-two-expanded'));
92
- await expect(snapshot).toEqual(0);
93
- });
94
- });
95
-
96
- // Percy-aligned with ds-accordion: both stories now render the same deterministic tall content
97
- // (40 plain rows), so this snapshot compares against the accordion baseline. The accordion story
98
- // previously used the legacy ds-legacy-datagrids; replaced for determinism + parity. See QA_NOTES.
99
- describe('PUI-8321 - Accordion, global height -visual', () => {
100
- before('loading page', async () => {
101
- const errorOnGo = await DSAccordionNativeCO.globalHeight.go();
102
- if (errorOnGo) throw errorOnGo;
103
- });
104
- it('01: should display accordion with global height, not trimmed', async () => {
105
- const addRow = await $('[data-testid="add-row"]');
106
- await addRow.click();
107
- await addRow.click();
108
- await addRow.click();
109
- const content = await DSAccordionNativeCO.getContents(0);
110
- await content.waitForDisplayed();
111
- const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-globalheight'));
112
- await expect(snapshot).toEqual(0);
113
- });
114
- });
115
-
116
- // Percy-aligned with ds-accordion. Interactions restored to match accordion (Tab x2 to focus the
117
- // input, then open the date picker) so the captured states match. See POC_FINDINGS.md.
118
- describe('PUI-9964 - Accordion, Actionable within -visual', () => {
119
- before('loading page', async () => {
120
- const errorOnGo = await DSAccordionNativeCO.datepickerInside.go();
121
- if (errorOnGo) throw errorOnGo;
122
- });
123
- it('01: should input focused within accordion', async () => {
124
- await browser.keys(Key.Tab);
125
- await browser.keys(Key.Tab);
126
- const snapshot = await browser.checkSnapshot(
127
- DSAccordionNativeCO.snapshotPath('accordion-native-datepicker-inside'),
128
- );
129
- await expect(snapshot).toEqual(0);
130
- });
131
- it('02: should opened datepicker', async () => {
132
- const datepicker = await DSAccordionNativeCO.getDatepickerBtn();
133
- await datepicker.click();
134
- const snapshot = await browser.checkSnapshot(
135
- DSAccordionNativeCO.snapshotPath('accordion-native-datepicker-open'),
136
- );
137
- await expect(snapshot).toEqual(0);
138
- });
139
- });
140
- }
141
-
142
- if (browser.capabilities['ice:options'].isPhone) {
143
- // Not Percy-aligned: accordion swaps to DSMobileAccordion on phone; native renders itself.
144
- // Different components. Kept under PUI-18083. See POC_FINDINGS.md.
145
- describe('PUI-18083 - AccordionNative, desktop to mobile -visual', () => {
146
- before('loading page', async () => {
147
- const errorOnGo = await DSAccordionNativeCO.toMobileURL.go();
148
- if (errorOnGo) throw errorOnGo;
149
- });
150
- it('01: should expand one accordion and hover the other', async () => {
151
- await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
152
- const snapshot = await browser.checkSnapshot(
153
- DSAccordionNativeCO.snapshotPath('accordion-native-tomobile-interacted'),
154
- );
155
- await expect(snapshot).toEqual(0);
156
- });
157
- });
158
- }
@@ -1,178 +0,0 @@
1
- /* eslint-disable import/no-relative-packages */
2
- import { PATH_E2E_ACCORDION_NATIVE } from '../paths';
3
- import { PageObject, Urlbuilder, getElementByIndex } from '../helpers';
4
-
5
- const ACCORDION_NATIVE_DATA_TESTID = {
6
- ITEM_CONTAINER: 'ds-accordionnative-item-container',
7
- ITEM_DETAILS: 'ds-accordionnative-item-details',
8
- ITEM_SUMMARY: 'ds-accordionnative-item-summary',
9
- ITEM_HEADING: 'ds-accordionnative-item-heading',
10
- ITEM_CHEVRON: 'ds-accordionnative-item-chevron',
11
- ITEM_TITLES_CONTAINER: 'ds-accordionnative-item-titles-container',
12
- ITEM_PRIMARY_TITLE: 'ds-accordionnative-item-primary-title',
13
- ITEM_SECONDARY_TITLE: 'ds-accordionnative-item-secondary-title',
14
- ITEM_TOOLTIP: 'ds-accordionnative-item-tooltip',
15
- ITEM_CUSTOM_ACTIONS_CONTAINER: 'ds-accordionnative-item-custom-actions-container',
16
- ITEM_CONTENT_CONTAINER: 'ds-accordionnative-item-content-container',
17
- ROOT: 'ds-accordionnative-root',
18
- };
19
- export default class DSAccordionNativeCO extends PageObject {
20
- // Desktop URLs
21
- static basicURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'basic-test');
22
-
23
- static multipleURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'multiple-test');
24
-
25
- static controlled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'controlled-test');
26
-
27
- static disabled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'disabled-test');
28
-
29
- static applyAriaDisabled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'apply-aria-disabled-test');
30
-
31
- static subtitle = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'with-secondary-title-test');
32
-
33
- static headerControls = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'header-control-examples-test');
34
-
35
- static customActions = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'render-custom-actions-test');
36
-
37
- static scrollableContent = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'scrollable-content-test');
38
-
39
- static wrapLabel = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'wrap-label');
40
-
41
- static toMobileURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'desktop-to-mobile-test');
42
-
43
- static slotsURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'slots-test');
44
-
45
- static customActionHooks = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'custom-actions-with-hooks');
46
-
47
- static datepickerInside = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'actionable-within');
48
-
49
- static conditionalRender = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'pui-11406-null-check');
50
-
51
- static inputInside = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'pui-9261-input-inside');
52
-
53
- static xstyledContent = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'xstyledprops-in-content');
54
-
55
- static tooltip = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'tooltip');
56
-
57
- static globalHeight = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'global-height');
58
-
59
- static keepContentURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'keep-content-mounted');
60
-
61
- static focusOnItemURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'focus-on-item-test');
62
-
63
- // Snapshots
64
- static snapshotPath(example = 'basic') {
65
- return PageObject.getSnapshotPathBuilder('AccordionNative', example, 'ds-accordion-native');
66
- }
67
-
68
- // Core selectors
69
- static async getWrapper() {
70
- return $(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ROOT}"]`);
71
- }
72
-
73
- // The POC's "click target" is <summary>; this is what gets focused / pressed /
74
- // hovered in tests — equivalent to the prod accordion's "accordion header".
75
- static async getAccordionHeaders() {
76
- return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_SUMMARY}"]`);
77
- }
78
-
79
- static async getAccordionHeader(index) {
80
- return (await this.getAccordionHeaders())[index];
81
- }
82
-
83
- static async getAccordionItems() {
84
- return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_CONTAINER}"]`);
85
- }
86
-
87
- static async getAccordionItem(index) {
88
- return (await this.getAccordionItems())[index];
89
- }
90
-
91
- // The POC keeps content inside <details>; visibility is driven by the native
92
- // open state. `[open]` exists on the <details> element when the item is
93
- // expanded — so we use that as the content-displayed signal.
94
- static async getContents(index) {
95
- const items = await this.getAccordionItems();
96
- const item = items[index];
97
- return item?.$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_CONTENT_CONTAINER}"]`);
98
- }
99
-
100
- static async getDetailsByIndex(index) {
101
- const items = await this.getAccordionItems();
102
- const item = items[index];
103
- return item?.$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_DETAILS}"]`);
104
- }
105
-
106
- static async getHeadings() {
107
- return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_HEADING}"]`);
108
- }
109
-
110
- static async getHeadingByIndex(index) {
111
- return (await this.getHeadings())[index];
112
- }
113
-
114
- static async getButtons() {
115
- return $$('[data-testid="ds-button"]');
116
- }
117
-
118
- static getButtonsByIndex = async (index) => getElementByIndex(this.getButtons, index);
119
-
120
- static async getToolbarTriggers() {
121
- return $$('[data-testid="ds-mini-toolbar__elipsis"]');
122
- }
123
-
124
- static getToolbarByIndex = async (index) => getElementByIndex(this.getToolbarTriggers, index);
125
-
126
- static async getDatepickerBtn() {
127
- return $('[data-testid="ds-controlled-date-time-picker-calendar-timewheel-trigger-icon"]');
128
- }
129
-
130
- // Slots (data-dimsum-slot attributes)
131
- static async getAccordionContainerSlotByIndex(index = 0) {
132
- return $$('[data-dimsum-slot="dsAccordionnativeRoot"]')[index];
133
- }
134
-
135
- static async getAccordionItemContainerSlotByIndex(index = 0) {
136
- return $$('[data-dimsum-slot="dsAccordionnativeItemContainer"]')[index];
137
- }
138
-
139
- static async getAccordionItemDetailsSlotByIndex(index = 0) {
140
- return $$('[data-dimsum-slot="dsAccordionnativeItemDetails"]')[index];
141
- }
142
-
143
- static async getAccordionItemSummarySlotByIndex(index = 0) {
144
- return $$('[data-dimsum-slot="dsAccordionnativeItemSummary"]')[index];
145
- }
146
-
147
- static async getAccordionItemHeadingSlotByIndex(index = 0) {
148
- return $$('[data-dimsum-slot="dsAccordionnativeItemHeading"]')[index];
149
- }
150
-
151
- static async getAccordionItemChevronSlotByIndex(index = 0) {
152
- return $$('[data-dimsum-slot="dsAccordionnativeItemChevron"]')[index];
153
- }
154
-
155
- static async getAccordionItemTitlesContainerSlotByIndex(index = 0) {
156
- return $$('[data-dimsum-slot="dsAccordionnativeItemTitlesContainer"]')[index];
157
- }
158
-
159
- static async getAccordionItemPrimaryTitleSlotByIndex(index = 0) {
160
- return $$('[data-dimsum-slot="dsAccordionnativeItemPrimaryTitle"]')[index];
161
- }
162
-
163
- static async getAccordionItemSecondaryTitleSlotByIndex(index = 0) {
164
- return $$('[data-dimsum-slot="dsAccordionnativeItemSecondaryTitle"]')[index];
165
- }
166
-
167
- static async getAccordionItemCustomActionsContainerSlotByIndex(index = 0) {
168
- return $$('[data-dimsum-slot="dsAccordionnativeItemCustomActionsContainer"]')[index];
169
- }
170
-
171
- static async getAccordionItemContentContainerSlotByIndex(index = 0) {
172
- return $$('[data-dimsum-slot="dsAccordionnativeItemContentContainer"]')[index];
173
- }
174
-
175
- static async getToolbarMenuByIndex(index = 0) {
176
- return $$('[data-testid="ds-menuitem-menu-item-wrapper"]')[index];
177
- }
178
- }