dimsum-e2e-tests 3.70.0-next.27 → 3.70.0-next.29
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.
- package/CHANGELOG.md +10 -0
- package/ds-accordion-native/DSAccordionNative.axe-core.func.spec.js +117 -0
- package/ds-accordion-native/DSAccordionNative.func.spec.js +178 -0
- package/ds-accordion-native/DSAccordionNative.visual.spec.js +131 -0
- package/ds-accordion-native/DSAccordionNativeCO.js +149 -0
- package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.axe-core.func.spec.js +25 -0
- package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.visual.spec.js +27 -0
- package/ds-accordion-native/role/DSAccordionNative.role-heading.func.spec.js +27 -0
- package/ds-accordion-native/scrollable-content/DSAccordionNative.scrollable-content.visual.spec.js +48 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.axe-core.func.spec.js +25 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.func.spec.js +73 -0
- package/ds-accordion-native/slots/DSAccordionNative.slots.visual.spec.js +18 -0
- package/ds-accordion-native/wrapLabel/DSAccordionNative.wrap-label.visual.spec.js +22 -0
- package/ds-apppicker/DSAppPickerCO.js +1 -1
- package/ds-chat/loadmore/DSChat-loadmore.func.spec.js +1 -1
- package/ds-floating-context/DSFloatingContextCO.js +10 -0
- package/ds-floating-context/placement/DSFloatingContext.placement.visual.spec.js +48 -0
- package/ds-form-combobox-multi/DSComboboxMultiCO.js +2 -0
- package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.axe-core.func.spec.js +7 -1
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +15 -0
- package/ds-form-combobox-multi/inline/DSComboboxMulti.inline.visual.spec.js +21 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +2 -0
- package/ds-form-combobox-single/aria-disabled/DSComboboxSingle.aria-disabled.visual.spec.js +18 -0
- package/ds-form-combobox-single/inline/DSComboboxSingle.inline.visual.spec.js +23 -0
- package/ds-form-native-select/NativeSelect.visual.spec.js +33 -0
- package/ds-form-native-select/option-selection/NativeSelect.option-selection.func.spec.js +25 -0
- package/package.json +150 -151
- package/paths.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 3.70.0-next.29 (2026-06-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package dimsum-e2e-tests
|
|
9
|
+
|
|
10
|
+
## 3.70.0-next.28 (2026-06-10)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- ds-form-combobox:: style group label per b3-strong spec and add grouped feature stories [PUI-15487](https://jira.elliemae.io/browse/PUI-15487) ([#8083](https://git.elliemae.io/platform-ui/dimsum/issues/8083)) ([a4713b7](https://git.elliemae.io/platform-ui/dimsum/commit/a4713b79b26ed2102a878ce7418031b77fca7746))
|
|
15
|
+
|
|
6
16
|
## 3.70.0-next.27 (2026-06-08)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package dimsum-e2e-tests
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
});
|
|
26
|
+
|
|
27
|
+
describe('PUI-18083 - AccordionNative, basic -AxeCore', () => {
|
|
28
|
+
before('loading page', async () => {
|
|
29
|
+
const errorOnGo = await DSAccordionNativeCO.basicURL.go();
|
|
30
|
+
if (errorOnGo) throw errorOnGo;
|
|
31
|
+
});
|
|
32
|
+
it('01: should display the accordion closed and pass axecore test', async () => {
|
|
33
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
|
|
34
|
+
const result = await axeCoreCheck();
|
|
35
|
+
expect(result.length).toBe(0);
|
|
36
|
+
});
|
|
37
|
+
it('02: should open the accordion and pass axecore test', async () => {
|
|
38
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
39
|
+
const content = await DSAccordionNativeCO.getContents(1);
|
|
40
|
+
await content.waitForDisplayed();
|
|
41
|
+
const result = await axeCoreCheck();
|
|
42
|
+
expect(result.length).toBe(0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe('PUI-18083 - AccordionNative, Disabled -AxeCore', () => {
|
|
47
|
+
before('loading page', async () => {
|
|
48
|
+
const errorOnGo = await DSAccordionNativeCO.disabled.go();
|
|
49
|
+
if (errorOnGo) throw errorOnGo;
|
|
50
|
+
});
|
|
51
|
+
it('01: should display the disabled accordion and pass axecore test', async () => {
|
|
52
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
|
|
53
|
+
const result = await axeCoreCheck();
|
|
54
|
+
expect(result.length).toBe(0);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
describe('PUI-18083 - AccordionNative, multiple -AxeCore', () => {
|
|
59
|
+
before('loading page', async () => {
|
|
60
|
+
const errorOnGo = await DSAccordionNativeCO.multipleURL.go();
|
|
61
|
+
if (errorOnGo) throw errorOnGo;
|
|
62
|
+
});
|
|
63
|
+
it('01: should open the second accordion without closing the first and pass axecore test', async () => {
|
|
64
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
65
|
+
await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
|
|
66
|
+
const firstContent = await DSAccordionNativeCO.getContents(0);
|
|
67
|
+
const secondContent = await DSAccordionNativeCO.getContents(1);
|
|
68
|
+
await firstContent.waitForDisplayed();
|
|
69
|
+
await secondContent.waitForDisplayed();
|
|
70
|
+
const result = await axeCoreCheck();
|
|
71
|
+
expect(result.length).toBe(0);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe('PUI-18083 - AccordionNative, Custom actions with hooks -AxeCore', () => {
|
|
76
|
+
before('loading page', async () => {
|
|
77
|
+
const errorOnGo = await DSAccordionNativeCO.customActionHooks.go();
|
|
78
|
+
if (errorOnGo) throw errorOnGo;
|
|
79
|
+
});
|
|
80
|
+
it('01: should have custom actions rendered and pass axecore scan', async () => {
|
|
81
|
+
const customAction1text = await DSAccordionNativeCO.getButtonsByIndex(0);
|
|
82
|
+
const customAction2text = await DSAccordionNativeCO.getButtonsByIndex(1);
|
|
83
|
+
const customAction3text = await DSAccordionNativeCO.getButtonsByIndex(2);
|
|
84
|
+
await customAction1text.waitForDisplayed();
|
|
85
|
+
await customAction2text.waitForDisplayed();
|
|
86
|
+
await customAction3text.waitForDisplayed();
|
|
87
|
+
const result = await axeCoreCheck();
|
|
88
|
+
expect(result.length).toBe(0);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
describe('PUI-18083 - AccordionNative, Actionable within -AxeCore', () => {
|
|
93
|
+
before('loading page', async () => {
|
|
94
|
+
const errorOnGo = await DSAccordionNativeCO.datepickerInside.go();
|
|
95
|
+
if (errorOnGo) throw errorOnGo;
|
|
96
|
+
});
|
|
97
|
+
it('01: should input focused within accordion and pass axecore scan', async () => {
|
|
98
|
+
await browser.keys(Key.Tab);
|
|
99
|
+
await browser.keys(Key.Tab);
|
|
100
|
+
const result = await axeCoreCheck();
|
|
101
|
+
expect(result.length).toBe(0);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
describe('PUI-18083 - AccordionNative, keep content mounted -a11y', () => {
|
|
106
|
+
before('loading page', async () => {
|
|
107
|
+
const errorOnGo = await DSAccordionNativeCO.keepContentURL.go();
|
|
108
|
+
if (errorOnGo) throw errorOnGo;
|
|
109
|
+
});
|
|
110
|
+
it('01: should be a11y compliant with hidden accordion content', async () => {
|
|
111
|
+
const accordionContent = await $('[data-testid="accordion-native-keep-content"]');
|
|
112
|
+
await accordionContent.waitForExist();
|
|
113
|
+
const result = await axeCoreCheck();
|
|
114
|
+
expect(result.length).toBe(0);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import DSAccordionNativeCO from './DSAccordionNativeCO';
|
|
2
|
+
import { mouseOver } from '../helpers';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-18083 - AccordionNative visual tests, basic', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSAccordionNativeCO.basicURL.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display all closed', async () => {
|
|
11
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
|
|
12
|
+
const snapshot = await browser.checkSnapshot(DSAccordionNativeCO.snapshotPath('accordion-native-closed'));
|
|
13
|
+
await expect(snapshot).toEqual(0);
|
|
14
|
+
});
|
|
15
|
+
it('02: should display open first one', async () => {
|
|
16
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
|
|
17
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
18
|
+
const snapshot = await browser.checkSnapshot(
|
|
19
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-one-open'),
|
|
20
|
+
);
|
|
21
|
+
await expect(snapshot).toEqual(0);
|
|
22
|
+
});
|
|
23
|
+
it('03: should display focus on the second, hover on third', async () => {
|
|
24
|
+
await mouseOver(await DSAccordionNativeCO.getAccordionHeader(2));
|
|
25
|
+
const snapshot = await browser.checkSnapshot(
|
|
26
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-interacted-states'),
|
|
27
|
+
);
|
|
28
|
+
await expect(snapshot).toEqual(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe('PUI-18083 - AccordionNative, header props -visual', () => {
|
|
33
|
+
before('loading page', async () => {
|
|
34
|
+
const errorOnGo = await DSAccordionNativeCO.headerControls.go();
|
|
35
|
+
if (errorOnGo) throw errorOnGo;
|
|
36
|
+
});
|
|
37
|
+
it('01: should display accordion expanded with header props', async () => {
|
|
38
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).waitForDisplayed();
|
|
39
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
40
|
+
const content = await DSAccordionNativeCO.getContents(1);
|
|
41
|
+
await content.waitForDisplayed();
|
|
42
|
+
const snapshot = await browser.checkSnapshot(
|
|
43
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-header-props'),
|
|
44
|
+
);
|
|
45
|
+
await expect(snapshot).toEqual(0);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
describe('PUI-18083 - AccordionNative, custom actions -visual', () => {
|
|
50
|
+
before('loading page', async () => {
|
|
51
|
+
const errorOnGo = await DSAccordionNativeCO.customActions.go();
|
|
52
|
+
if (errorOnGo) throw errorOnGo;
|
|
53
|
+
});
|
|
54
|
+
it('01: should display accordion with custom actions collapsed', async () => {
|
|
55
|
+
const snapshot = await browser.checkSnapshot(
|
|
56
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-customactions-col'),
|
|
57
|
+
);
|
|
58
|
+
await expect(snapshot).toEqual(0);
|
|
59
|
+
});
|
|
60
|
+
it('02: should display accordion with custom actions expanded', async () => {
|
|
61
|
+
await (await DSAccordionNativeCO.getAccordionHeader(0)).waitForDisplayed();
|
|
62
|
+
await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
|
|
63
|
+
const snapshot = await browser.checkSnapshot(
|
|
64
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-customactions-exp'),
|
|
65
|
+
);
|
|
66
|
+
await expect(snapshot).toEqual(0);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
describe('PUI-18083 - AccordionNative, multiple -visual', () => {
|
|
71
|
+
before('loading page', async () => {
|
|
72
|
+
const errorOnGo = await DSAccordionNativeCO.multipleURL.go();
|
|
73
|
+
if (errorOnGo) throw errorOnGo;
|
|
74
|
+
});
|
|
75
|
+
it('01: should corectly display two expanded accordions', async () => {
|
|
76
|
+
await (await DSAccordionNativeCO.getAccordionHeader(0)).click();
|
|
77
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
78
|
+
const firstContent = await DSAccordionNativeCO.getContents(0);
|
|
79
|
+
const secondContent = await DSAccordionNativeCO.getContents(1);
|
|
80
|
+
await firstContent.waitForDisplayed();
|
|
81
|
+
await secondContent.waitForDisplayed();
|
|
82
|
+
const snapshot = await browser.checkSnapshot(
|
|
83
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-two-expanded'),
|
|
84
|
+
);
|
|
85
|
+
await expect(snapshot).toEqual(0);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
describe('PUI-18083 - AccordionNative, global height -visual', () => {
|
|
90
|
+
before('loading page', async () => {
|
|
91
|
+
const errorOnGo = await DSAccordionNativeCO.globalHeight.go();
|
|
92
|
+
if (errorOnGo) throw errorOnGo;
|
|
93
|
+
});
|
|
94
|
+
it('01: should display accordion with global height, not trimmed', async () => {
|
|
95
|
+
const snapshot = await browser.checkSnapshot(
|
|
96
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-globalheight'),
|
|
97
|
+
);
|
|
98
|
+
await expect(snapshot).toEqual(0);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
describe('PUI-18083 - AccordionNative, Actionable within -visual', () => {
|
|
103
|
+
before('loading page', async () => {
|
|
104
|
+
const errorOnGo = await DSAccordionNativeCO.datepickerInside.go();
|
|
105
|
+
if (errorOnGo) throw errorOnGo;
|
|
106
|
+
});
|
|
107
|
+
it('01: should input focused within accordion', async () => {
|
|
108
|
+
await (await DSAccordionNativeCO.getAccordionHeader(0)).waitForDisplayed();
|
|
109
|
+
const snapshot = await browser.checkSnapshot(
|
|
110
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-datepicker-inside'),
|
|
111
|
+
);
|
|
112
|
+
await expect(snapshot).toEqual(0);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (browser.capabilities['ice:options'].isPhone) {
|
|
118
|
+
describe('PUI-18083 - AccordionNative, desktop to mobile -visual', () => {
|
|
119
|
+
before('loading page', async () => {
|
|
120
|
+
const errorOnGo = await DSAccordionNativeCO.toMobileURL.go();
|
|
121
|
+
if (errorOnGo) throw errorOnGo;
|
|
122
|
+
});
|
|
123
|
+
it('01: should expand one accordion and hover the other', async () => {
|
|
124
|
+
await (await DSAccordionNativeCO.getAccordionHeader(1)).click();
|
|
125
|
+
const snapshot = await browser.checkSnapshot(
|
|
126
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-tomobile-interacted'),
|
|
127
|
+
);
|
|
128
|
+
await expect(snapshot).toEqual(0);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* eslint-disable import/no-relative-packages */
|
|
2
|
+
import { ACCORDION_NATIVE_DATA_TESTID } from '@elliemae/ds-accordion-native';
|
|
3
|
+
import { PATH_E2E_ACCORDION_NATIVE } from '../paths';
|
|
4
|
+
import { PageObject, Urlbuilder, getElementByIndex } from '../helpers';
|
|
5
|
+
|
|
6
|
+
export default class DSAccordionNativeCO extends PageObject {
|
|
7
|
+
// Desktop URLs
|
|
8
|
+
static basicURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'basic-test');
|
|
9
|
+
|
|
10
|
+
static multipleURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'multiple-test');
|
|
11
|
+
|
|
12
|
+
static controlled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'controlled-test');
|
|
13
|
+
|
|
14
|
+
static disabled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'disabled-test');
|
|
15
|
+
|
|
16
|
+
static applyAriaDisabled = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'apply-aria-disabled-test');
|
|
17
|
+
|
|
18
|
+
static subtitle = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'with-secondary-title-test');
|
|
19
|
+
|
|
20
|
+
static headerControls = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'header-control-examples-test');
|
|
21
|
+
|
|
22
|
+
static customActions = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'render-custom-actions-test');
|
|
23
|
+
|
|
24
|
+
static scrollableContent = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'scrollable-content-test');
|
|
25
|
+
|
|
26
|
+
static wrapLabel = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'wrap-label');
|
|
27
|
+
|
|
28
|
+
static toMobileURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'desktop-to-mobile-test');
|
|
29
|
+
|
|
30
|
+
static slotsURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'slots-test');
|
|
31
|
+
|
|
32
|
+
static customActionHooks = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'custom-actions-with-hooks');
|
|
33
|
+
|
|
34
|
+
static datepickerInside = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'actionable-within');
|
|
35
|
+
|
|
36
|
+
static conditionalRender = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'pui-11406-null-check');
|
|
37
|
+
|
|
38
|
+
static inputInside = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'pui-9261-input-inside');
|
|
39
|
+
|
|
40
|
+
static xstyledContent = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'xstyledprops-in-content');
|
|
41
|
+
|
|
42
|
+
static tooltip = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'tooltip');
|
|
43
|
+
|
|
44
|
+
static globalHeight = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'global-height');
|
|
45
|
+
|
|
46
|
+
static keepContentURL = new Urlbuilder(PATH_E2E_ACCORDION_NATIVE, 'keep-content-mounted');
|
|
47
|
+
|
|
48
|
+
// Snapshots
|
|
49
|
+
static snapshotPath(example = 'basic') {
|
|
50
|
+
return PageObject.getSnapshotPathBuilder('AccordionNative', example, 'ds-accordion-native');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Core selectors
|
|
54
|
+
static async getWrapper() {
|
|
55
|
+
return $(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ROOT}"]`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// The POC's "click target" is <summary>; this is what gets focused / pressed /
|
|
59
|
+
// hovered in tests — equivalent to the prod accordion's "accordion header".
|
|
60
|
+
static async getAccordionHeaders() {
|
|
61
|
+
return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_SUMMARY}"]`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static async getAccordionHeader(index) {
|
|
65
|
+
return (await this.getAccordionHeaders())[index];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static async getAccordionItems() {
|
|
69
|
+
return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_CONTAINER}"]`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static async getAccordionItem(index) {
|
|
73
|
+
return (await this.getAccordionItems())[index];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// The POC keeps content inside <details>; visibility is driven by the native
|
|
77
|
+
// open state. `[open]` exists on the <details> element when the item is
|
|
78
|
+
// expanded — so we use that as the content-displayed signal.
|
|
79
|
+
static async getContents(index) {
|
|
80
|
+
const items = await this.getAccordionItems();
|
|
81
|
+
const item = items[index];
|
|
82
|
+
return item?.$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_CONTENT_CONTAINER}"]`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
static async getDetailsByIndex(index) {
|
|
86
|
+
const items = await this.getAccordionItems();
|
|
87
|
+
const item = items[index];
|
|
88
|
+
return item?.$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_DETAILS}"]`);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static async getHeadings() {
|
|
92
|
+
return $$(`[data-testid="${ACCORDION_NATIVE_DATA_TESTID.ITEM_HEADING}"]`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static async getHeadingByIndex(index) {
|
|
96
|
+
return (await this.getHeadings())[index];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static async getButtons() {
|
|
100
|
+
return $$('[data-testid="ds-button"]');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static getButtonsByIndex = async (index) => getElementByIndex(this.getButtons, index);
|
|
104
|
+
|
|
105
|
+
// Slots (data-dimsum-slot attributes)
|
|
106
|
+
static async getAccordionContainerSlotByIndex(index = 0) {
|
|
107
|
+
return $$('[data-dimsum-slot="dsAccordionnativeRoot"]')[index];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static async getAccordionItemContainerSlotByIndex(index = 0) {
|
|
111
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemContainer"]')[index];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static async getAccordionItemDetailsSlotByIndex(index = 0) {
|
|
115
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemDetails"]')[index];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static async getAccordionItemSummarySlotByIndex(index = 0) {
|
|
119
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemSummary"]')[index];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static async getAccordionItemHeadingSlotByIndex(index = 0) {
|
|
123
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemHeading"]')[index];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static async getAccordionItemChevronSlotByIndex(index = 0) {
|
|
127
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemChevron"]')[index];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static async getAccordionItemTitlesContainerSlotByIndex(index = 0) {
|
|
131
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemTitlesContainer"]')[index];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static async getAccordionItemPrimaryTitleSlotByIndex(index = 0) {
|
|
135
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemPrimaryTitle"]')[index];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static async getAccordionItemSecondaryTitleSlotByIndex(index = 0) {
|
|
139
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemSecondaryTitle"]')[index];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static async getAccordionItemCustomActionsContainerSlotByIndex(index = 0) {
|
|
143
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemCustomActionsContainer"]')[index];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static async getAccordionItemContentContainerSlotByIndex(index = 0) {
|
|
147
|
+
return $$('[data-dimsum-slot="dsAccordionnativeItemContentContainer"]')[index];
|
|
148
|
+
}
|
|
149
|
+
}
|
package/ds-accordion-native/aria-disabled/DSAccordionNative.aria-disabled.axe-core.func.spec.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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:: ApplyAriaDisabled prop - axe-core', () => {
|
|
13
|
+
before('loading page', async () => {
|
|
14
|
+
const errorOnGo = await DSAccordionNativeCO.applyAriaDisabled.go();
|
|
15
|
+
if (errorOnGo) throw errorOnGo;
|
|
16
|
+
});
|
|
17
|
+
it('01: should display accordion with aria-disabled and pass axecore scan', async () => {
|
|
18
|
+
const firstItem = await DSAccordionNativeCO.getAccordionHeader(0);
|
|
19
|
+
await firstItem.waitForDisplayed();
|
|
20
|
+
await browser.keys(Key.Tab);
|
|
21
|
+
const result = await axeCoreCheck();
|
|
22
|
+
expect(result.length).toBe(0);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAccordionNativeCO from '../DSAccordionNativeCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-18083 - AccordionNative:: ApplyAriaDisabled prop - visual tests', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSAccordionNativeCO.applyAriaDisabled.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: first Accordion item should be focused and content not displayed - click', async () => {
|
|
11
|
+
const firstItem = await DSAccordionNativeCO.getAccordionHeader(0);
|
|
12
|
+
await firstItem.click();
|
|
13
|
+
const snapshot = await browser.checkSnapshot(
|
|
14
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-aria-disabled-focused-mouse'),
|
|
15
|
+
);
|
|
16
|
+
await expect(snapshot).toEqual(0);
|
|
17
|
+
});
|
|
18
|
+
it('02: second Accordion item should be focused and content not displayed - Tab + Enter', async () => {
|
|
19
|
+
await browser.keys(Key.Tab);
|
|
20
|
+
await browser.keys(Key.Enter);
|
|
21
|
+
const snapshot = await browser.checkSnapshot(
|
|
22
|
+
DSAccordionNativeCO.snapshotPath('accordion-native-aria-disabled-focused-keys'),
|
|
23
|
+
);
|
|
24
|
+
await expect(snapshot).toEqual(0);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import DSAccordionNativeCO from '../DSAccordionNativeCO';
|
|
2
|
+
|
|
3
|
+
if (
|
|
4
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
5
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
6
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
7
|
+
browser.capabilities.browserName === 'Chrome'
|
|
8
|
+
) {
|
|
9
|
+
describe('PUI-18083 - AccordionNative: Role heading', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSAccordionNativeCO.subtitle.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
// Prod accordion asserts role="heading" + aria-level via custom slot
|
|
15
|
+
// attributes because its wrapper is a <div>. The POC uses a real heading
|
|
16
|
+
// element (default <h3>), so neither attribute is present as a DOM string
|
|
17
|
+
// — the role and aria-level are *implicit* in the tag itself, conveyed by
|
|
18
|
+
// the browser's accessibility tree. Asserting on getTagName() is the
|
|
19
|
+
// correct contract for the native variant.
|
|
20
|
+
it('01: should be a native heading element with implicit ARIA role + level', async () => {
|
|
21
|
+
const heading = await DSAccordionNativeCO.getHeadingByIndex(0);
|
|
22
|
+
const tagName = await heading.getTagName();
|
|
23
|
+
// <h3> => implicit role="heading", aria-level=3.
|
|
24
|
+
await expect(tagName.toLowerCase()).toEqual('h3');
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|