dimsum-e2e-tests 3.53.0-alpha.2 → 3.53.0-alpha.4
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 +8 -0
- package/ds-autocomplete/DSAutocompleteCO.js +18 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.axe-core.func.spec.js +20 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.func.spec.js +45 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.visual.spec.js +21 -0
- package/ds-banner/DSBanner.func.spec.js +4 -60
- package/ds-banner/DSBanner.text-resize.visual.spec.js +15 -0
- package/ds-banner/DSBanner.text-wrapping.visual.spec.js +31 -0
- package/ds-banner/DSBanner.visual.spec.js +0 -29
- package/ds-banner/DSBannerCO.js +24 -2
- package/ds-banner/aria-and-role/DSBanner.aria-and-role.func.spec.js +63 -0
- package/ds-banner/slots/DSBanner.slots.func.spec.js +65 -0
- package/ds-banner/slots/DSBanner.slots.visual.spec.js +17 -0
- package/ds-chat/DSChat.func.spec.js +3 -2
- package/ds-chat/DSChat.visual.spec.js +3 -2
- package/ds-chat/DSChatCO.js +0 -8
- package/ds-controlled-form/ds-controlled-radio-group/DSControlledRadioGroup.axe-core.func.spec.js +31 -0
- package/ds-data-table-async/components/PaginationNavCO.js +1 -1
- package/ds-form-native-select/NativeSelect.axe-core.func.spec.js +57 -0
- package/ds-form-native-select/NativeSelectCO.js +35 -0
- package/ds-global-header/GlobalHeader.axe-core.func.spec.js +2 -3
- package/ds-indeterminate-progress-indicator/DSIndetermintateProgressIndicator.axe-core.func.spec.js +31 -0
- package/ds-pagination/DSPagination.axe-core.func.spec.js +1 -1
- package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +31 -0
- package/ds-progress-indicator/DSProgressIndicator.func.spec.js +8 -3
- package/ds-progress-indicator/DSProgressIndicator.visual.spec.js +12 -2
- package/ds-progress-indicator/DSProgressIndicatorCO.js +5 -3
- package/ds-svg/DSSvg.axe-core.func.spec.js +32 -0
- package/ds-svg/DSSvgCO.js +2 -3
- package/package.json +187 -187
- package/paths.js +2 -1
- /package/ds-indeterminate-progress-indicator/{DSIndetermintateProgressIndicator.func.spec.js → DSIndetermintateProgressIndicator.func.spec copy.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.53.0-alpha.4 (2025-12-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package dimsum-e2e-tests
|
|
9
|
+
|
|
10
|
+
## 3.53.0-alpha.3 (2025-12-16)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package dimsum-e2e-tests
|
|
13
|
+
|
|
6
14
|
## 3.53.0-alpha.2 (2025-12-10)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package dimsum-e2e-tests
|
|
@@ -8,6 +8,8 @@ export default class DSAutocompleteCO extends PageObject {
|
|
|
8
8
|
|
|
9
9
|
static basic = new Urlbuilder(PATH_E2E_AUTOCOMPLETE, 'basic-test');
|
|
10
10
|
|
|
11
|
+
static slots = new Urlbuilder(PATH_E2E_AUTOCOMPLETE, 'slots-test');
|
|
12
|
+
|
|
11
13
|
static sectionTitles = new Urlbuilder(PATH_E2E_AUTOCOMPLETE, 'with-section-titles-test');
|
|
12
14
|
|
|
13
15
|
// Snapshots
|
|
@@ -28,4 +30,20 @@ export default class DSAutocompleteCO extends PageObject {
|
|
|
28
30
|
static async getAutocompleteOptions() {
|
|
29
31
|
return $$('[data-testid="autocomplete-option"]');
|
|
30
32
|
}
|
|
33
|
+
|
|
34
|
+
static async getContainerSlot(index = 0) {
|
|
35
|
+
return $$('[data-dimsum-slot="dsAutocompleteContainer"]')[index];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static async getOptionSlot(index = 0) {
|
|
39
|
+
return $$('[data-dimsum-slot="dsAutocompleteOption"]')[index];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static async getInputSlot(index = 0) {
|
|
43
|
+
return $$('[data-dimsum-slot="dsInputtextInput"]')[index];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static async getMenulistSlot(index = 0) {
|
|
47
|
+
return $$('[data-dimsum-slot="dsAutocompleteMenuList"]')[index];
|
|
48
|
+
}
|
|
31
49
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAutocompleteCO from '../DSAutocompleteCO';
|
|
3
|
+
import { type, axeCoreCheck } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-17531 - Autocomplete:: Slots -AxeCore', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSAutocompleteCO.slots.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('01: should display autocomplete w/ custom color', async () => {
|
|
12
|
+
await browser.keys(Key.Tab);
|
|
13
|
+
await type('4');
|
|
14
|
+
const menulist = await DSAutocompleteCO.getMenulistSlot();
|
|
15
|
+
await menulist.waitForDisplayed({ timeout: 2000 });
|
|
16
|
+
const result = await axeCoreCheck();
|
|
17
|
+
expect(result.length).toBe(0);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAutocompleteCO from '../DSAutocompleteCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-17529 - Autocomplete:: Slots -Func', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSAutocompleteCO.slots.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should have custom aria-label for each slot', async () => {
|
|
11
|
+
const autocomplete = await DSAutocompleteCO.getContainerSlot();
|
|
12
|
+
await autocomplete.waitForDisplayed();
|
|
13
|
+
await browser.keys(Key.Tab);
|
|
14
|
+
await browser.keys('4');
|
|
15
|
+
const container = await DSAutocompleteCO.getContainerSlot();
|
|
16
|
+
const input = await DSAutocompleteCO.getInputSlot();
|
|
17
|
+
const menulist = await DSAutocompleteCO.getMenulistSlot();
|
|
18
|
+
const options = await DSAutocompleteCO.getOptionSlot();
|
|
19
|
+
await expect(container).toHaveAttribute('aria-label', 'container aria');
|
|
20
|
+
await expect(input).toHaveAttribute('aria-label', 'input aria');
|
|
21
|
+
await expect(menulist).toHaveAttribute('aria-label', 'menulist aria');
|
|
22
|
+
await expect(options).toHaveAttribute('aria-label', 'option aria');
|
|
23
|
+
});
|
|
24
|
+
it('02: should have custom data-testid for each slot', async () => {
|
|
25
|
+
const container = await DSAutocompleteCO.getContainerSlot();
|
|
26
|
+
const input = await DSAutocompleteCO.getInputSlot();
|
|
27
|
+
const menulist = await DSAutocompleteCO.getMenulistSlot();
|
|
28
|
+
const options = await DSAutocompleteCO.getOptionSlot();
|
|
29
|
+
await expect(container).toHaveAttribute('data-testid', 'container data');
|
|
30
|
+
await expect(input).toHaveAttribute('data-testid', 'input data');
|
|
31
|
+
await expect(menulist).toHaveAttribute('data-testid', 'menulist data');
|
|
32
|
+
await expect(options).toHaveAttribute('data-testid', 'option data');
|
|
33
|
+
});
|
|
34
|
+
it('03: should have custom lang for each slot', async () => {
|
|
35
|
+
const container = await DSAutocompleteCO.getContainerSlot();
|
|
36
|
+
const input = await DSAutocompleteCO.getInputSlot();
|
|
37
|
+
const menulist = await DSAutocompleteCO.getMenulistSlot();
|
|
38
|
+
const options = await DSAutocompleteCO.getOptionSlot();
|
|
39
|
+
await expect(container).toHaveAttribute('lang', 'es');
|
|
40
|
+
await expect(input).toHaveAttribute('lang', 'es');
|
|
41
|
+
await expect(menulist).toHaveAttribute('lang', 'es');
|
|
42
|
+
await expect(options).toHaveAttribute('lang', 'es');
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAutocompleteCO from '../DSAutocompleteCO';
|
|
3
|
+
import { type } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-17530 - Autocomplete:: Slots -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSAutocompleteCO.slots.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('01: should display autocomplete w/ custom color', async () => {
|
|
12
|
+
await browser.eyesOpen();
|
|
13
|
+
await browser.keys(Key.Tab);
|
|
14
|
+
await type('4');
|
|
15
|
+
const menulist = await DSAutocompleteCO.getMenulistSlot();
|
|
16
|
+
await menulist.waitForDisplayed({ timeout: 2000 });
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(DSAutocompleteCO.snapshotPath('autocomplete-slots'));
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -47,14 +47,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
47
47
|
const errorOnGo = await DSBannerCO.infoURL.go();
|
|
48
48
|
if (errorOnGo) throw errorOnGo;
|
|
49
49
|
});
|
|
50
|
-
it('should open the banner', async () => {
|
|
50
|
+
it('01: should open the banner', async () => {
|
|
51
51
|
await DSBannerCO.openBanner();
|
|
52
52
|
const banner = await DSBannerCO.getBanner();
|
|
53
53
|
await expect(banner).toBeDisplayed();
|
|
54
54
|
});
|
|
55
|
-
it('should be focusing the banner', async () => {
|
|
56
|
-
const
|
|
57
|
-
await expect(
|
|
55
|
+
it('02: should be focusing the banner', async () => {
|
|
56
|
+
const dsBannerContainer = await DSBannerCO.getBannerContainer();
|
|
57
|
+
await expect(dsBannerContainer).toBeFocused();
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
describe('PUI-10369 - DSBanner, focus close button on open -func', () => {
|
|
@@ -68,60 +68,4 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
68
68
|
await expect(closeButton).toBeFocused();
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
if (browser.capabilities.browserName === 'chrome' || browser.capabilities.browserName === 'Chrome') {
|
|
72
|
-
describe('PUI-15113 - Banner - Slots -Func', () => {
|
|
73
|
-
before('loading page', async () => {
|
|
74
|
-
const errorOnGo = await DSBannerCO.slotsTest.go();
|
|
75
|
-
if (errorOnGo) throw errorOnGo;
|
|
76
|
-
});
|
|
77
|
-
it('01: should find the expected SLOTS for the component', async () => {
|
|
78
|
-
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
79
|
-
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
80
|
-
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
81
|
-
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
82
|
-
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
83
|
-
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
84
|
-
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
85
|
-
await expect(bannerTitleSlot).toBeDisplayed();
|
|
86
|
-
await expect(bannerSubtitleSlot).toBeDisplayed();
|
|
87
|
-
await expect(bannerContainer).toBeDisplayed();
|
|
88
|
-
await expect(bannerInnerContainer).toBeDisplayed();
|
|
89
|
-
await expect(bannerIconsSlots).toBeDisplayed();
|
|
90
|
-
await expect(bannerButtonSlot).toBeDisplayed();
|
|
91
|
-
await expect(bannerActionLinkSlot).toBeDisplayed();
|
|
92
|
-
});
|
|
93
|
-
it('02: should find custom aria for each SLOT', async () => {
|
|
94
|
-
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
95
|
-
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
96
|
-
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
97
|
-
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
98
|
-
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
99
|
-
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
100
|
-
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
101
|
-
await expect(bannerTitleSlot).toHaveAttribute('aria-label', 'im title aria');
|
|
102
|
-
await expect(bannerSubtitleSlot).toHaveAttribute('aria-label', 'im subtitle aria');
|
|
103
|
-
await expect(bannerContainer).toHaveAttribute('aria-label', 'im container aria');
|
|
104
|
-
await expect(bannerInnerContainer).toHaveAttribute('aria-label', 'im inner container aria');
|
|
105
|
-
await expect(bannerIconsSlots).toHaveAttribute('aria-label', 'im iconcontainer aria');
|
|
106
|
-
await expect(bannerButtonSlot).toHaveAttribute('aria-label', 'im closebutton aria');
|
|
107
|
-
await expect(bannerActionLinkSlot).toHaveAttribute('aria-label', 'im actionlink aria');
|
|
108
|
-
});
|
|
109
|
-
it('03: should find custom data for each SLOT', async () => {
|
|
110
|
-
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
111
|
-
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
112
|
-
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
113
|
-
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
114
|
-
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
115
|
-
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
116
|
-
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
117
|
-
await expect(bannerTitleSlot).toHaveAttribute('data-testid', 'im title data');
|
|
118
|
-
await expect(bannerSubtitleSlot).toHaveAttribute('data-testid', 'im subtitle data');
|
|
119
|
-
await expect(bannerContainer).toHaveAttribute('data-testid', 'im container data');
|
|
120
|
-
await expect(bannerInnerContainer).toHaveAttribute('data-testid', 'im inner container data');
|
|
121
|
-
await expect(bannerIconsSlots).toHaveAttribute('data-testid', 'im iconcontainer data');
|
|
122
|
-
await expect(bannerButtonSlot).toHaveAttribute('data-testid', 'im closebutton data');
|
|
123
|
-
await expect(bannerActionLinkSlot).toHaveAttribute('data-testid', 'im actionlink data');
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
71
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import DSBannerCO from './DSBannerCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-17535 - DSBanner - Text Resize In Different Layouts - Visual Test', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await DSBannerCO.textResizeInDifferentLayoutsTest.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('01: should display text resize in different layouts properly', async () => {
|
|
10
|
+
await browser.eyesOpen();
|
|
11
|
+
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('text-resize-in-different-layouts'));
|
|
12
|
+
await expect(snapshot).toEqual(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSBannerCO from './DSBannerCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-10367 - DSBanner, With text wrapping - Visual Test', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSBannerCO.textWrappingURL.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display the layout properly with text wrapping', async () => {
|
|
11
|
+
await browser.eyesOpen();
|
|
12
|
+
await DSBannerCO.openBanner();
|
|
13
|
+
const banner = await DSBannerCO.getBanner();
|
|
14
|
+
await banner.waitForDisplayed();
|
|
15
|
+
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('text-wrapping'));
|
|
16
|
+
await expect(snapshot).toEqual(0);
|
|
17
|
+
});
|
|
18
|
+
it('02: should focus action link correctly', async () => {
|
|
19
|
+
await browser.eyesOpen();
|
|
20
|
+
await browser.keys(Key.Tab);
|
|
21
|
+
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('text-wrapping-focus-action-link'));
|
|
22
|
+
await expect(snapshot).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
it('03: should focus close button correctly', async () => {
|
|
25
|
+
await browser.eyesOpen();
|
|
26
|
+
await browser.keys(Key.Tab);
|
|
27
|
+
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('text-wrapping-focus-close-button'));
|
|
28
|
+
await expect(snapshot).toEqual(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -84,21 +84,6 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
describe('PUI-10367 - DSBanner, With text wrapping - Visual Test', () => {
|
|
88
|
-
before('loading page', async () => {
|
|
89
|
-
const errorOnGo = await DSBannerCO.textWrappingURL.go();
|
|
90
|
-
if (errorOnGo) throw errorOnGo;
|
|
91
|
-
});
|
|
92
|
-
it('should display the layout properly with text wrapping', async () => {
|
|
93
|
-
await browser.eyesOpen();
|
|
94
|
-
await DSBannerCO.openBanner();
|
|
95
|
-
const banner = await DSBannerCO.getBanner();
|
|
96
|
-
await banner.waitForDisplayed();
|
|
97
|
-
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('text-wrapping'));
|
|
98
|
-
await expect(snapshot).toEqual(0);
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
|
|
102
87
|
describe('PUI-10368 - DSBanner, Pushes content- Visual Test', () => {
|
|
103
88
|
before('loading page', async () => {
|
|
104
89
|
const errorOnGo = await DSBannerCO.pushesContentURL.go();
|
|
@@ -113,18 +98,4 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
113
98
|
await expect(snapshot).toEqual(0);
|
|
114
99
|
});
|
|
115
100
|
});
|
|
116
|
-
|
|
117
|
-
describe('PUI-15114 - DSBanner, Slots- Visual Test', () => {
|
|
118
|
-
before('loading page', async () => {
|
|
119
|
-
const errorOnGo = await DSBannerCO.slotsTest.go();
|
|
120
|
-
if (errorOnGo) throw errorOnGo;
|
|
121
|
-
});
|
|
122
|
-
it('should display the banners customized using slots', async () => {
|
|
123
|
-
await browser.eyesOpen();
|
|
124
|
-
const banner = await DSBannerCO.getContainerSlotByIndex();
|
|
125
|
-
await banner.waitForDisplayed();
|
|
126
|
-
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('banner-slots-test'));
|
|
127
|
-
await expect(snapshot).toEqual(0);
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
101
|
}
|
package/ds-banner/DSBannerCO.js
CHANGED
|
@@ -26,6 +26,16 @@ export default class DSBannerCO extends PageObject {
|
|
|
26
26
|
|
|
27
27
|
static slotsTest = new Urlbuilder(PATH_E2E_BANNER, 'slots-test');
|
|
28
28
|
|
|
29
|
+
static textResizeInDifferentLayoutsTest = new Urlbuilder(PATH_E2E_BANNER, 'text-resize-in-different-layouts-test');
|
|
30
|
+
|
|
31
|
+
static ariaLiveAssertiveTest = new Urlbuilder(PATH_E2E_BANNER, 'aria-live-assertive-test');
|
|
32
|
+
|
|
33
|
+
static ariaLivePoliteTest = new Urlbuilder(PATH_E2E_BANNER, 'aria-live-polite-test');
|
|
34
|
+
|
|
35
|
+
static roleAlertTest = new Urlbuilder(PATH_E2E_BANNER, 'role-alert-test');
|
|
36
|
+
|
|
37
|
+
static roleRegionTest = new Urlbuilder(PATH_E2E_BANNER, 'role-region-test');
|
|
38
|
+
|
|
29
39
|
static async getButton() {
|
|
30
40
|
return $('[data-testid="ds-button"]');
|
|
31
41
|
}
|
|
@@ -52,6 +62,10 @@ export default class DSBannerCO extends PageObject {
|
|
|
52
62
|
return $('[data-testid="ds-banner"');
|
|
53
63
|
}
|
|
54
64
|
|
|
65
|
+
static async getBannerContainer() {
|
|
66
|
+
return $('[data-testid="ds-banner-container"]');
|
|
67
|
+
}
|
|
68
|
+
|
|
55
69
|
static async dangerLabel() {
|
|
56
70
|
return $('div*=Danger');
|
|
57
71
|
}
|
|
@@ -61,11 +75,11 @@ export default class DSBannerCO extends PageObject {
|
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
static async getTitleSlotByIndex(index = 0) {
|
|
64
|
-
return $$('[data-dimsum-slot="dsBannerTitle"]')[index];
|
|
78
|
+
return $$('[data-dimsum-parent-slot="dsBannerTitle"]')[index];
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
static async getSubtitleSlotByIndex(index = 0) {
|
|
68
|
-
return $$('[data-dimsum-slot="dsBannerSubtitle"]')[index];
|
|
82
|
+
return $$('[data-dimsum-parent-slot="dsBannerSubtitle"]')[index];
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
static async getButtonRootSlotByIndex(index = 0) {
|
|
@@ -76,6 +90,10 @@ export default class DSBannerCO extends PageObject {
|
|
|
76
90
|
return $$('[data-dimsum-slot="dsBannerContainer"]')[index];
|
|
77
91
|
}
|
|
78
92
|
|
|
93
|
+
static async getLayoutSlotByIndex(index = 0) {
|
|
94
|
+
return $$('[data-dimsum-slot="dsBannerLayout"]')[index];
|
|
95
|
+
}
|
|
96
|
+
|
|
79
97
|
static async getIconContainerSlotByIndex(index = 0) {
|
|
80
98
|
return $$('[data-dimsum-slot="dsBannerIconContainer"]')[index];
|
|
81
99
|
}
|
|
@@ -84,6 +102,10 @@ export default class DSBannerCO extends PageObject {
|
|
|
84
102
|
return $$('[data-dimsum-slot="dsBannerInnerContainer"]')[index];
|
|
85
103
|
}
|
|
86
104
|
|
|
105
|
+
static async getBannerLiveRegionPortalSlotByIndex(index = 0) {
|
|
106
|
+
return $$('[data-dimsum-slot="dsBannerLiveRegionPortal"]')[index];
|
|
107
|
+
}
|
|
108
|
+
|
|
87
109
|
// Snapshots
|
|
88
110
|
static snapshotPath(example = 'basic') {
|
|
89
111
|
return PageObject.getSnapshotPathBuilder('DSBanner', example, 'ds-banner');
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import DSBannerCO from '../DSBannerCO';
|
|
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-17537 - Banner - Aria Assertive -Func', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSBannerCO.ariaLiveAssertiveTest.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: should have aria-live="assertive" attribute on banner after trigger', async () => {
|
|
15
|
+
const triggerButton = await DSBannerCO.getButton();
|
|
16
|
+
await triggerButton.click();
|
|
17
|
+
const banner = await DSBannerCO.getBannerLiveRegionPortalSlotByIndex();
|
|
18
|
+
await banner.waitForDisplayed();
|
|
19
|
+
await expect(banner).toHaveAttribute('aria-live', 'assertive');
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('PUI-17538 - Banner - Aria Polite -Func', () => {
|
|
23
|
+
before('loading page', async () => {
|
|
24
|
+
const errorOnGo = await DSBannerCO.ariaLivePoliteTest.go();
|
|
25
|
+
if (errorOnGo) throw errorOnGo;
|
|
26
|
+
});
|
|
27
|
+
it('01: should have aria-live="polite" attribute on banner after trigger', async () => {
|
|
28
|
+
const triggerButton = await DSBannerCO.getButton();
|
|
29
|
+
await triggerButton.click();
|
|
30
|
+
const banner = await DSBannerCO.getBannerLiveRegionPortalSlotByIndex();
|
|
31
|
+
await banner.waitForDisplayed();
|
|
32
|
+
await expect(banner).toHaveAttribute('aria-live', 'polite');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
describe('PUI-17539 - Banner - Role Alert -Func', () => {
|
|
36
|
+
before('loading page', async () => {
|
|
37
|
+
const errorOnGo = await DSBannerCO.roleAlertTest.go();
|
|
38
|
+
if (errorOnGo) throw errorOnGo;
|
|
39
|
+
});
|
|
40
|
+
it('01: should have role="alert"attribute on banner after trigger', async () => {
|
|
41
|
+
const triggerButton = await DSBannerCO.getButton();
|
|
42
|
+
await triggerButton.click();
|
|
43
|
+
const banner = await DSBannerCO.getBanner();
|
|
44
|
+
await banner.waitForDisplayed();
|
|
45
|
+
await expect(banner).toHaveAttribute('role', 'alert');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe('PUI-17540 - Banner - Role Region and Alert -Func', () => {
|
|
49
|
+
before('loading page', async () => {
|
|
50
|
+
const errorOnGo = await DSBannerCO.roleRegionTest.go();
|
|
51
|
+
if (errorOnGo) throw errorOnGo;
|
|
52
|
+
});
|
|
53
|
+
it('01: should have role="region" and role="alert" attributes on banner after trigger', async () => {
|
|
54
|
+
const triggerButton = await DSBannerCO.getButton();
|
|
55
|
+
await triggerButton.click();
|
|
56
|
+
const banner = await DSBannerCO.getBanner();
|
|
57
|
+
await banner.waitForDisplayed();
|
|
58
|
+
const bannerContainer = await DSBannerCO.getBannerContainer();
|
|
59
|
+
await expect(bannerContainer).toHaveAttribute('role', 'region');
|
|
60
|
+
await expect(banner).toHaveAttribute('role', 'alert');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import DSBannerCO from '../DSBannerCO';
|
|
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-15113 - Banner - Slots -Func', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSBannerCO.slotsTest.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: should find the expected SLOTS for the component', async () => {
|
|
15
|
+
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
16
|
+
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
17
|
+
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
18
|
+
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
19
|
+
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
20
|
+
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
21
|
+
const bannerLayoutSlot = await DSBannerCO.getLayoutSlotByIndex();
|
|
22
|
+
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
23
|
+
await expect(bannerTitleSlot).toBeDisplayed();
|
|
24
|
+
await expect(bannerSubtitleSlot).toBeDisplayed();
|
|
25
|
+
await expect(bannerContainer).toBeDisplayed();
|
|
26
|
+
await expect(bannerInnerContainer).toBeDisplayed();
|
|
27
|
+
await expect(bannerIconsSlots).toBeDisplayed();
|
|
28
|
+
await expect(bannerButtonSlot).toBeDisplayed();
|
|
29
|
+
await expect(bannerLayoutSlot).toBeDisplayed();
|
|
30
|
+
await expect(bannerActionLinkSlot).toBeDisplayed();
|
|
31
|
+
});
|
|
32
|
+
it('02: should find custom aria for each SLOT', async () => {
|
|
33
|
+
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
34
|
+
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
35
|
+
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
36
|
+
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
37
|
+
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
38
|
+
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
39
|
+
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
40
|
+
await expect(bannerTitleSlot).toHaveAttribute('aria-label', 'im title aria');
|
|
41
|
+
await expect(bannerSubtitleSlot).toHaveAttribute('aria-label', 'im subtitle aria');
|
|
42
|
+
await expect(bannerContainer).toHaveAttribute('aria-label', 'im container aria');
|
|
43
|
+
await expect(bannerInnerContainer).toHaveAttribute('aria-label', 'im inner container aria');
|
|
44
|
+
await expect(bannerIconsSlots).toHaveAttribute('aria-label', 'im iconcontainer aria');
|
|
45
|
+
await expect(bannerButtonSlot).toHaveAttribute('aria-label', 'im closebutton aria');
|
|
46
|
+
await expect(bannerActionLinkSlot).toHaveAttribute('aria-label', 'im actionlink aria');
|
|
47
|
+
});
|
|
48
|
+
it('03: should find custom data for each SLOT', async () => {
|
|
49
|
+
const bannerTitleSlot = await DSBannerCO.getTitleSlotByIndex();
|
|
50
|
+
const bannerSubtitleSlot = await DSBannerCO.getSubtitleSlotByIndex();
|
|
51
|
+
const bannerContainer = await DSBannerCO.getContainerSlotByIndex();
|
|
52
|
+
const bannerInnerContainer = await DSBannerCO.getInnerContainerSlotByIndex();
|
|
53
|
+
const bannerIconsSlots = await DSBannerCO.getIconContainerSlotByIndex();
|
|
54
|
+
const bannerButtonSlot = await DSBannerCO.getButtonRootSlotByIndex();
|
|
55
|
+
const bannerActionLinkSlot = await DSBannerCO.getActionLinkSlotByIndex();
|
|
56
|
+
await expect(bannerTitleSlot).toHaveAttribute('data-testid', 'im title data');
|
|
57
|
+
await expect(bannerSubtitleSlot).toHaveAttribute('data-testid', 'im subtitle data');
|
|
58
|
+
await expect(bannerContainer).toHaveAttribute('data-testid', 'im container data');
|
|
59
|
+
await expect(bannerInnerContainer).toHaveAttribute('data-testid', 'im inner container data');
|
|
60
|
+
await expect(bannerIconsSlots).toHaveAttribute('data-testid', 'im iconcontainer data');
|
|
61
|
+
await expect(bannerButtonSlot).toHaveAttribute('data-testid', 'im closebutton data');
|
|
62
|
+
await expect(bannerActionLinkSlot).toHaveAttribute('data-testid', 'im actionlink data');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import DSBannerCO from '../DSBannerCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-15114 - DSBanner, Slots- Visual Test', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await DSBannerCO.slotsTest.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
it('should display the banners customized using slots', async () => {
|
|
10
|
+
await browser.eyesOpen();
|
|
11
|
+
const banner = await DSBannerCO.getContainerSlotByIndex();
|
|
12
|
+
await banner.waitForDisplayed();
|
|
13
|
+
const snapshot = await browser.eyesCheckSnapshot(DSBannerCO.snapshotPath('banner-slots-test'));
|
|
14
|
+
await expect(snapshot).toEqual(0);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import { ChatCO, ComposerCO, HeaderCO, StoryBtnsCO, BubbleCO, TileCO } from './components';
|
|
4
4
|
import { type } from '../helpers';
|
|
5
|
+
import DSBannerCO from '../ds-banner/DSBannerCO';
|
|
5
6
|
|
|
6
7
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
7
8
|
describe('PUI-9250 - Chat, Keyboard Navigation', () => {
|
|
@@ -85,7 +86,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
85
86
|
await triggerChat.click();
|
|
86
87
|
const openBannerTop = await ChatCO.getToggleBtnByIndex(0);
|
|
87
88
|
await openBannerTop.click();
|
|
88
|
-
const topBanner = await
|
|
89
|
+
const topBanner = await DSBannerCO.getBannerContainer();
|
|
89
90
|
const bannerType = await topBanner.getAttribute('data-type');
|
|
90
91
|
await expect(bannerType).toEqual('danger');
|
|
91
92
|
await expect(topBanner).toBeFocused();
|
|
@@ -93,7 +94,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
93
94
|
it('should focus the bottom banner', async () => {
|
|
94
95
|
const openBannerTop = await ChatCO.getToggleBtnByIndex(1);
|
|
95
96
|
await openBannerTop.click();
|
|
96
|
-
const bottomBanner = await
|
|
97
|
+
const bottomBanner = await DSBannerCO.getBannerContainer();
|
|
97
98
|
const bannerType = await bottomBanner.getAttribute('data-type');
|
|
98
99
|
await expect(bannerType).toEqual('warning');
|
|
99
100
|
await expect(bottomBanner).toBeFocused();
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { Key } from 'webdriverio';
|
|
4
4
|
import { ChatCO, BubbleCO, FloatingButtonCO, ComposerCO, TileCO } from './components';
|
|
5
5
|
import { type } from '../helpers';
|
|
6
|
+
import DSBannerCO from '../ds-banner/DSBannerCO';
|
|
6
7
|
|
|
7
8
|
describe('PUI-6671 - Chat, System Message - Visual Tests', () => {
|
|
8
9
|
before('loading page', async () => {
|
|
@@ -161,7 +162,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
161
162
|
await browser.eyesOpen();
|
|
162
163
|
const newMessagesTrigger = await ChatCO.getButtonByIndex(0);
|
|
163
164
|
await newMessagesTrigger.click();
|
|
164
|
-
const viewMessagesAction = await
|
|
165
|
+
const viewMessagesAction = await DSBannerCO.getActionLink();
|
|
165
166
|
await viewMessagesAction.click();
|
|
166
167
|
// eslint-disable-next-line wdio/no-pause
|
|
167
168
|
await browser.pause(500);
|
|
@@ -224,7 +225,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
224
225
|
await expect(snapshot).toEqual(0);
|
|
225
226
|
});
|
|
226
227
|
it('should display the new messages', async () => {
|
|
227
|
-
const actionLink = await
|
|
228
|
+
const actionLink = await DSBannerCO.getActionLink();
|
|
228
229
|
await actionLink.click();
|
|
229
230
|
const snapshot = await browser.checkSnapshot(ChatCO.snapshotPath('chat-new-msgs-inview'));
|
|
230
231
|
await expect(snapshot).toEqual(0);
|
package/ds-chat/DSChatCO.js
CHANGED
|
@@ -76,10 +76,6 @@ export default class DSChatCO extends PageObject {
|
|
|
76
76
|
return $$('[data-testid="chat-card-wrapper"]');
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
static async getBannerActionLink() {
|
|
80
|
-
return $('[data-testid="ds-banner-action-link"]');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
79
|
static async getSidebarFooterButton() {
|
|
84
80
|
return $('[data-testid="sidebar-button-sidebar_footer"]');
|
|
85
81
|
}
|
|
@@ -116,10 +112,6 @@ export default class DSChatCO extends PageObject {
|
|
|
116
112
|
|
|
117
113
|
static getButtonByIndex = async (index) => getElementByIndex(this.getButtons, index);
|
|
118
114
|
|
|
119
|
-
static async getBanner() {
|
|
120
|
-
return $('[data-testid="ds-banner"]');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
115
|
// Snapshots
|
|
124
116
|
// eslint-disable-next-line max-lines
|
|
125
117
|
static snapshotPath(example = 'basic') {
|
package/ds-controlled-form/ds-controlled-radio-group/DSControlledRadioGroup.axe-core.func.spec.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSControlledRadioCO from './DSControlledRadioGroupCO';
|
|
3
|
+
import { axeCoreCheck } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
if (
|
|
6
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
7
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
8
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
9
|
+
browser.capabilities.browserName === 'Chrome'
|
|
10
|
+
) {
|
|
11
|
+
describe('PUI-cccc - DSControlledRadioGroup - AxeCore Test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSControlledRadioCO.browserCompatibleKeyboardNavigationTest.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: should display radio groups in both vertical and horizontal orientations and pass axe-core', async () => {
|
|
17
|
+
const result = await axeCoreCheck();
|
|
18
|
+
expect(result.length).toBe(0);
|
|
19
|
+
});
|
|
20
|
+
it('02: should display first radio button selected and pass axe-core', async () => {
|
|
21
|
+
await browser.keys(Key.Tab);
|
|
22
|
+
const result = await axeCoreCheck();
|
|
23
|
+
expect(result.length).toBe(0);
|
|
24
|
+
});
|
|
25
|
+
it('03: should display fourth radio button selected and pass axe-core', async () => {
|
|
26
|
+
await browser.keys(Key.Tab);
|
|
27
|
+
const result = await axeCoreCheck();
|
|
28
|
+
expect(result.length).toBe(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -31,5 +31,5 @@ export default class PaginationNavCO extends PageObject {
|
|
|
31
31
|
|
|
32
32
|
static getSegPagSpans = async () => (await this.getPagesMenu()).$$(' div > span');
|
|
33
33
|
|
|
34
|
-
static getSegPagContent = async () => $$('[data-testid="ds-pagination-paginator"] > div > span')[
|
|
34
|
+
static getSegPagContent = async () => $$('[data-testid="ds-pagination-paginator"] > div > span')[0];
|
|
35
35
|
}
|