dimsum-e2e-tests 3.70.0-next.45 → 3.70.0-next.46
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 +6 -0
- package/ds-autocomplete/slots/DSAutocomplete.slots.func.spec.js +6 -1
- package/ds-card/DSCard.cardv2_v1.func.spec.js +54 -0
- package/ds-card/DSCard.cardv2_v1.visual.spec.js +29 -0
- package/ds-card/DSCardCO.js +4 -0
- package/ds-card-v3/DSCardV3CO.js +78 -0
- package/ds-card-v3/accordion/DSCardV3.accordion.axe-core.func.spec.js +28 -0
- package/ds-card-v3/accordion/DSCardV3.accordion.visual.spec.js +4 -6
- package/ds-card-v3/disabled/DSCardV3.disabled.visual.spec.js +1 -2
- package/ds-card-v3/drag-n-drop/DSCardV3.DnD.axe-core.func.spec.js +61 -0
- package/ds-card-v3/drag-n-drop/DSCardV3.DnD.func.spec.js +129 -0
- package/ds-card-v3/drag-n-drop/DSCardV3.DnD.reorder.func.spec.js +73 -0
- package/ds-card-v3/drag-n-drop/DSCardV3.DnD.visual.spec.js +5 -12
- package/ds-card-v3/global-attributes/DSCardV3.global-attributes.axe-core.func.spec.js +33 -0
- package/ds-card-v3/global-attributes/DSCardV3.global-attributes.visual.spec.js +20 -0
- package/ds-card-v3/multi-select/DSCardV3.multiselect.keyboard.func.spec.js +65 -0
- package/ds-card-v3/multi-select/DSCardV3.multiselect.visual.spec.js +17 -0
- package/ds-card-v3/multiple-action/DSCardV3.multiple-action.func.spec.js +53 -0
- package/ds-card-v3/multiple-action/DSCardV3.multiple-action.visual.spec.js +18 -0
- package/ds-card-v3/multiple-control/DSCardV3.multi-control.func.spec.js +25 -0
- package/ds-card-v3/no-action/DSCardV3.no-action.axe-core.func.spec.js +22 -0
- package/ds-card-v3/no-action/DSCardV3.no-action.func.spec.js +23 -0
- package/ds-card-v3/no-action/DSCardV3.no-action.visual.spec.js +15 -0
- package/ds-card-v3/notification-badges/DSCardV3.notification-badges.func.spec.js +19 -0
- package/ds-card-v3/reflow/DSCardV3.reflow.axe-core.func.spec.js +28 -0
- package/ds-card-v3/reflow/DSCardV3.reflow.func.spec.js +36 -0
- package/ds-card-v3/reflow/DSCardV3.reflow.visual.spec.js +1 -2
- package/ds-card-v3/single-select/DSCardV3.single-select.axe-core.func.spec.js +37 -0
- package/ds-card-v3/single-select/DSCardV3.single-select.visual.spec.js +1 -2
- package/ds-card-v3/slots/DSCardV3.slots.visual.spec.js +1 -2
- package/ds-card-v3/variant-accented/DSCardV3.variant-accented.func.spec.js +28 -0
- package/ds-card-v3/variant-accented/DSCardV3.variant-accented.visual.spec.js +35 -0
- package/ds-card-v3/variant-accented-disabled/DSCardV3.variant-accented-disabled.func.spec.js +53 -0
- package/ds-card-v3/variant-disabled/DSCardV3.variant-disabled.axe-core.func.spec.js +22 -0
- package/ds-chat/DSChatCO.js +3 -3
- package/ds-chat/components/ComposerCO.js +1 -1
- package/ds-chat/components/HeaderCO.js +1 -1
- package/ds-controlled-form/react-hook-form/ReactHook.func.spec.js +1 -3
- package/ds-data-table-async/components/HeaderCO.js +5 -1
- package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.axe-core.func.spec.js +1 -1
- package/ds-form-date-time-picker/DSControlledDateTimePickerCO.js +7 -0
- package/ds-form-date-time-picker/date-time-full/DateTimeFull.axe-core.func.spec.js +8 -1
- package/ds-form-date-time-picker/date-time-full/DateTimePicker.DateTimeFull.visual.spec.js +9 -0
- package/ds-hooks/DSHookCO.js +1 -22
- package/ds-menu-button/slots/DSMenuButton.slots.axe-core.func.spec.js +28 -0
- package/ds-menu-button/slots/DSMenuButton.slots.func.spec.js +19 -0
- package/ds-shuttle-v2/explicit-selection-ui/DSShuttleV2.explicit-selection-ui.visual.spec.js +3 -0
- package/package.json +150 -150
- package/paths.js +0 -2
- package/ds-hooks/DSHook.func.spec.js +0 -60
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
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-18715 - CardV3: Multi Select (keyboard) - Func Test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSCardV3CO.multiSelectURL.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: first checkbox should be focused - [TAB]', async () => {
|
|
17
|
+
await browser.keys(Key.Tab);
|
|
18
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
19
|
+
await expect(firstCheckbox).toBeFocused();
|
|
20
|
+
await expect(firstCheckbox).toHaveAttribute('aria-label', 'First Option Card');
|
|
21
|
+
});
|
|
22
|
+
it('02: first checkbox should be selected - [SPACE]', async () => {
|
|
23
|
+
await browser.keys(Key.Space);
|
|
24
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
25
|
+
await expect(firstCheckbox).toBeSelected();
|
|
26
|
+
});
|
|
27
|
+
it('03: more options should be focused - [TAB]', async () => {
|
|
28
|
+
await browser.keys(Key.Tab);
|
|
29
|
+
const options = await DSCardV3CO.getButtonByIndex(0);
|
|
30
|
+
await expect(options).toBeFocused();
|
|
31
|
+
await expect(options).toHaveAttribute('aria-label', 'More Options');
|
|
32
|
+
});
|
|
33
|
+
it('04: second checkbox should be focused and selected - [TAB+SPACE]', async () => {
|
|
34
|
+
await browser.keys(Key.Tab);
|
|
35
|
+
const secondCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(1);
|
|
36
|
+
await expect(secondCheckbox).toBeFocused();
|
|
37
|
+
await browser.keys(Key.Space);
|
|
38
|
+
await expect(secondCheckbox).toBeSelected();
|
|
39
|
+
await expect(secondCheckbox).toHaveAttribute('aria-label', 'Second Option Card');
|
|
40
|
+
});
|
|
41
|
+
it('05: first checkbox should be deselected on toggle - [SHIFT+TAB, SPACE]', async () => {
|
|
42
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
43
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
44
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
45
|
+
await expect(firstCheckbox).toBeFocused();
|
|
46
|
+
await browser.keys(Key.Space);
|
|
47
|
+
await expect(firstCheckbox).not.toBeSelected();
|
|
48
|
+
});
|
|
49
|
+
it('06: both checkboxes should stay selected simultaneously - [SPACE]', async () => {
|
|
50
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
51
|
+
await browser.keys(Key.Space);
|
|
52
|
+
const secondCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(1);
|
|
53
|
+
await expect(firstCheckbox).toBeSelected();
|
|
54
|
+
await expect(secondCheckbox).toBeSelected();
|
|
55
|
+
});
|
|
56
|
+
it('07: deselecting one card should not affect the other - [SPACE]', async () => {
|
|
57
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
58
|
+
await expect(firstCheckbox).toBeFocused();
|
|
59
|
+
await browser.keys(Key.Space);
|
|
60
|
+
const secondCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(1);
|
|
61
|
+
await expect(firstCheckbox).not.toBeSelected();
|
|
62
|
+
await expect(secondCheckbox).toBeSelected();
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
3
|
+
describe('PUI-18734 - DSCardV3:: multi-select checkbox and menu open - Visual', () => {
|
|
4
|
+
before('loading page', async () => {
|
|
5
|
+
const errorOnGo = await DSCardV3CO.multiSelectURL.go();
|
|
6
|
+
if (errorOnGo) throw errorOnGo;
|
|
7
|
+
});
|
|
8
|
+
it('01: first checkbox should be selected, and the dropdown menu should be opened', async () => {
|
|
9
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
10
|
+
const ellipsisMenuBtn = await DSCardV3CO.getButtonByIndex(0);
|
|
11
|
+
await firstCheckbox.click();
|
|
12
|
+
await ellipsisMenuBtn.click();
|
|
13
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
14
|
+
await expect(snapshot).toEqual(0);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18716 - CardV3: Multiple Action Buttons - Func Test', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.multiActionURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: should move focus across the action buttons in order - [TAB]', async () => {
|
|
16
|
+
await browser.keys(Key.Tab);
|
|
17
|
+
const flag = await DSCardV3CO.getButtonByIndex(0);
|
|
18
|
+
await expect(flag).toBeFocused();
|
|
19
|
+
await expect(flag).toHaveAttribute('aria-label', 'Flag action');
|
|
20
|
+
|
|
21
|
+
await browser.keys(Key.Tab);
|
|
22
|
+
const print = await DSCardV3CO.getButtonByIndex(1);
|
|
23
|
+
await expect(print).toBeFocused();
|
|
24
|
+
await expect(print).toHaveAttribute('aria-label', 'Print action');
|
|
25
|
+
|
|
26
|
+
await browser.keys(Key.Tab);
|
|
27
|
+
const download = await DSCardV3CO.getButtonByIndex(2);
|
|
28
|
+
await expect(download).toBeFocused();
|
|
29
|
+
await expect(download).toHaveAttribute('aria-label', 'Download action');
|
|
30
|
+
|
|
31
|
+
await browser.keys(Key.Tab);
|
|
32
|
+
const deleteAction = await DSCardV3CO.getButtonByIndex(3);
|
|
33
|
+
await expect(deleteAction).toBeFocused();
|
|
34
|
+
await expect(deleteAction).toHaveAttribute('aria-label', 'Delete action');
|
|
35
|
+
});
|
|
36
|
+
it('02: should move focus across the action buttons in reverse order - [SHIFT+TAB]', async () => {
|
|
37
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
38
|
+
const download = await DSCardV3CO.getButtonByIndex(2);
|
|
39
|
+
await expect(download).toBeFocused();
|
|
40
|
+
await expect(download).toHaveAttribute('aria-label', 'Download action');
|
|
41
|
+
|
|
42
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
43
|
+
const print = await DSCardV3CO.getButtonByIndex(1);
|
|
44
|
+
await expect(print).toBeFocused();
|
|
45
|
+
await expect(print).toHaveAttribute('aria-label', 'Print action');
|
|
46
|
+
|
|
47
|
+
await browser.keys([Key.Shift, Key.Tab]);
|
|
48
|
+
const flag = await DSCardV3CO.getButtonByIndex(0);
|
|
49
|
+
await expect(flag).toBeFocused();
|
|
50
|
+
await expect(flag).toHaveAttribute('aria-label', 'Flag action');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
describe('PUI-18735 - DSCardV3:: multiple action button focus - Visual', () => {
|
|
6
|
+
before('loading page', async () => {
|
|
7
|
+
const errorOnGo = await DSCardV3CO.multiActionURL.go();
|
|
8
|
+
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
});
|
|
10
|
+
it('01: should display CardV3 with the first action button focused', async () => {
|
|
11
|
+
await browser.keys(Key.Tab);
|
|
12
|
+
const flag = await DSCardV3CO.getButtonByIndex(0);
|
|
13
|
+
await expect(flag).toBeFocused();
|
|
14
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
15
|
+
await expect(snapshot).toEqual(0);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { Key } from 'webdriverio';
|
|
3
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
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-18645 - CardV3: Multi Control - Func Test', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DSCardV3CO.multipleControlURL.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
it('01: first checkbox selection should not select second checkbox - [TAB + SPACE]', async () => {
|
|
17
|
+
await browser.keys(Key.Tab);
|
|
18
|
+
await browser.keys(Key.Space);
|
|
19
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
20
|
+
await expect(firstCheckbox).toBeSelected();
|
|
21
|
+
const secondCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(1);
|
|
22
|
+
await expect(secondCheckbox).not.toBeSelected();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18717 - CardV3: No Action - axe-core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.noActionURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: Card should display correctly and pass axecore test', async () => {
|
|
16
|
+
const firstElement = await DSCardV3CO.getElement(0);
|
|
17
|
+
await firstElement.waitForExist();
|
|
18
|
+
const result = await axeCoreCheck();
|
|
19
|
+
expect(result.length).toBe(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
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-18736 - DSCardV3:: no-action title and subtitle render - Func', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSCardV3CO.noActionURL.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: Card should display correctly', async () => {
|
|
15
|
+
const firstElement = await DSCardV3CO.getElement(0);
|
|
16
|
+
await expect(firstElement).toHaveText('Card Title');
|
|
17
|
+
await expect(firstElement).toHaveAttribute('data-dimsum-slot', 'dsTypographyRoot');
|
|
18
|
+
const secondElement = await DSCardV3CO.getElement(1);
|
|
19
|
+
await expect(secondElement).toHaveText('Card Subtitle');
|
|
20
|
+
await expect(secondElement).toHaveAttribute('data-dimsum-slot', 'dsTypographyRoot');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
3
|
+
describe('PUI-18737 - DSCardV3:: no-action card renders - Visual', () => {
|
|
4
|
+
before('loading page', async () => {
|
|
5
|
+
const errorOnGo = await DSCardV3CO.noActionURL.go();
|
|
6
|
+
if (errorOnGo) throw errorOnGo;
|
|
7
|
+
});
|
|
8
|
+
it('01: Should load the page and pass visual test', async () => {
|
|
9
|
+
const firstElement = await DSCardV3CO.getElement(0);
|
|
10
|
+
await expect(firstElement).toBeDisplayed();
|
|
11
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
12
|
+
await expect(snapshot).toEqual(0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
(browser.capabilities.browserName === 'Chrome' || browser.capabilities.browserName === 'chrome')
|
|
8
|
+
) {
|
|
9
|
+
describe('PUI-18646 - CardV3: Notification Badges Accessible Names - Func Test', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSCardV3CO.notificationBadgesURL.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: notification badge should have attributes', async () => {
|
|
15
|
+
const notificationBadge = await DSCardV3CO.getByRole();
|
|
16
|
+
await expect(notificationBadge).toHaveAttribute('aria-label', '3 new notifications');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18718 - CardV3:: Reflow - axe-core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.reflowURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: should display the accordion closed and pass axecore test', async () => {
|
|
16
|
+
await (await DSCardV3CO.getAccordionButton()).waitForDisplayed();
|
|
17
|
+
const result = await axeCoreCheck();
|
|
18
|
+
await expect(result).toHaveLength(0);
|
|
19
|
+
});
|
|
20
|
+
it('02: should open the accordion and pass axecore test', async () => {
|
|
21
|
+
await (await DSCardV3CO.getAccordionButton()).click();
|
|
22
|
+
const getAccordionFirstElement = await DSCardV3CO.getElement(7);
|
|
23
|
+
await getAccordionFirstElement.waitForDisplayed();
|
|
24
|
+
const result = await axeCoreCheck();
|
|
25
|
+
await expect(result).toHaveLength(0);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18738 - DSCardV3:: reflow keyboard navigation - Func', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.reflowURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: First checkbox should be disabled', async () => {
|
|
16
|
+
await browser.keys(Key.Tab);
|
|
17
|
+
const firstCheckbox = await DSCardV3CO.getCardCheckBoxByIndex(0);
|
|
18
|
+
await expect(firstCheckbox).toBeFocused();
|
|
19
|
+
await expect(firstCheckbox).toHaveAttribute('aria-disabled', 'true');
|
|
20
|
+
});
|
|
21
|
+
it('02: More Options should be focused', async () => {
|
|
22
|
+
await browser.keys(Key.Tab);
|
|
23
|
+
const options = await DSCardV3CO.getButtonByIndex(0);
|
|
24
|
+
await expect(options).toBeFocused();
|
|
25
|
+
await expect(options).toHaveAttribute('aria-label', 'More Options');
|
|
26
|
+
});
|
|
27
|
+
it('03: Content should be expanded when clicked on Accordion', async () => {
|
|
28
|
+
await browser.keys(Key.Tab);
|
|
29
|
+
await browser.keys(Key.Space);
|
|
30
|
+
const accordionButton = await DSCardV3CO.getAccordionButton();
|
|
31
|
+
await expect(accordionButton).toHaveAttribute('aria-expanded', 'true');
|
|
32
|
+
const accordionContent = await DSCardV3CO.getElement(7);
|
|
33
|
+
await expect(accordionContent).toBeDisplayed();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -7,10 +7,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
7
7
|
if (errorOnGo) throw errorOnGo;
|
|
8
8
|
});
|
|
9
9
|
it('01: should display cards after a 200% of text resize', async () => {
|
|
10
|
-
await browser.eyesOpen();
|
|
11
10
|
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
12
11
|
await expandContentButton.click();
|
|
13
|
-
const snapshot = await browser.
|
|
12
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
14
13
|
await expect(snapshot).toEqual(0);
|
|
15
14
|
});
|
|
16
15
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18739 - DSCardV3:: single-select accessibility - axe-core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.singleSelectURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: Should select radio button and pass axecore test', async () => {
|
|
16
|
+
const firstRadioButton = await DSCardV3CO.getRadioButtonByIndex(0);
|
|
17
|
+
await firstRadioButton.waitForExist();
|
|
18
|
+
await firstRadioButton.click();
|
|
19
|
+
const result = await axeCoreCheck();
|
|
20
|
+
await expect(result).toHaveLength(0);
|
|
21
|
+
});
|
|
22
|
+
it('02: Should select second radio button and pass axecore test', async () => {
|
|
23
|
+
const secondRadioButton = await DSCardV3CO.getRadioButtonByIndex(1);
|
|
24
|
+
await secondRadioButton.waitForExist();
|
|
25
|
+
await secondRadioButton.click();
|
|
26
|
+
const result = await axeCoreCheck();
|
|
27
|
+
await expect(result).toHaveLength(0);
|
|
28
|
+
});
|
|
29
|
+
it('03: Should click on more options and pass axecore test', async () => {
|
|
30
|
+
const options = await DSCardV3CO.getButtonByIndex(0);
|
|
31
|
+
await options.waitForDisplayed();
|
|
32
|
+
await options.click();
|
|
33
|
+
const result = await axeCoreCheck();
|
|
34
|
+
await expect(result).toHaveLength(0);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -10,12 +10,11 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
10
10
|
if (errorOnGo) throw errorOnGo;
|
|
11
11
|
});
|
|
12
12
|
it('01: first radio button should be selected, and the dropdown menu should be opened', async () => {
|
|
13
|
-
await browser.eyesOpen();
|
|
14
13
|
const firstRadioButton = await DSControlledRadioCO.getRadioByIndex(0);
|
|
15
14
|
const ellipsisMenuBtn = await DSButtonV3CO.getButtonByIndex(0);
|
|
16
15
|
await firstRadioButton.click();
|
|
17
16
|
await ellipsisMenuBtn.click();
|
|
18
|
-
const snapshot = await browser.
|
|
17
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
19
18
|
await expect(snapshot).toEqual(0);
|
|
20
19
|
});
|
|
21
20
|
});
|
|
@@ -8,10 +8,9 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
8
8
|
if (errorOnGo) throw errorOnGo;
|
|
9
9
|
});
|
|
10
10
|
it('01: should display CardV3 with customized slots', async () => {
|
|
11
|
-
await browser.eyesOpen();
|
|
12
11
|
const root = await DSCardV3CO.getRootSlotByIndex();
|
|
13
12
|
await root.waitForDisplayed();
|
|
14
|
-
const snapshot = await browser.
|
|
13
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
15
14
|
await expect(snapshot).toEqual(0);
|
|
16
15
|
});
|
|
17
16
|
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
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-18719 - CardV3: Variant Accented - Func Test', () => {
|
|
10
|
+
before('loading page', async () => {
|
|
11
|
+
const errorOnGo = await DSCardV3CO.variantAccentURL.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
it('01: content should be expanded, and the menu should be opened', async () => {
|
|
15
|
+
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
16
|
+
await browser.keys(Key.Tab);
|
|
17
|
+
await expect(expandContentButton).toBeFocused();
|
|
18
|
+
await browser.keys(Key.Space);
|
|
19
|
+
await expect(expandContentButton).toHaveAttribute('aria-expanded', 'true');
|
|
20
|
+
const expandableContent = await DSCardV3CO.getCardBody();
|
|
21
|
+
await expect(expandableContent).toBeDisplayedInViewport();
|
|
22
|
+
await browser.keys(Key.Tab);
|
|
23
|
+
await browser.keys(Key.Space);
|
|
24
|
+
const ellipsisMenuBtn = await DSCardV3CO.getButtonByIndex(1);
|
|
25
|
+
await expect(ellipsisMenuBtn).toHaveAttribute('aria-expanded', 'true');
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
3
|
+
describe('PUI-18740 - DSCardV3:: variant accented states - Visual', () => {
|
|
4
|
+
before('loading page', async () => {
|
|
5
|
+
const errorOnGo = await DSCardV3CO.variantAccentURL.go();
|
|
6
|
+
if (errorOnGo) throw errorOnGo;
|
|
7
|
+
});
|
|
8
|
+
it('01: content should be collapsed(default state),', async () => {
|
|
9
|
+
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
10
|
+
await expect(expandContentButton).toBeDisplayed();
|
|
11
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
12
|
+
await expect(snapshot).toEqual(0);
|
|
13
|
+
});
|
|
14
|
+
it('02: content should be expanded,', async () => {
|
|
15
|
+
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
16
|
+
await expandContentButton.click();
|
|
17
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
it('03: the menu should be opened', async () => {
|
|
21
|
+
const ellipsisMenuBtn = await DSCardV3CO.getButtonByIndex(1);
|
|
22
|
+
await ellipsisMenuBtn.click();
|
|
23
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
24
|
+
await expect(snapshot).toEqual(0);
|
|
25
|
+
});
|
|
26
|
+
it('04: accented variant styling should render in the collapsed state', async () => {
|
|
27
|
+
const errorOnGo = await DSCardV3CO.variantAccentURL.go();
|
|
28
|
+
if (errorOnGo) throw errorOnGo;
|
|
29
|
+
const card = await DSCardV3CO.getCardContainer();
|
|
30
|
+
await expect(card).toBeDisplayed();
|
|
31
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
32
|
+
await expect(snapshot).toEqual(0);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18686 - DSCardV3:: variant-accented-disabled does not use the html `disabled` attribute - Func', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.variantAccentedDisabledURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('01: accented-disabled card does not carry the native HTML disabled attribute', async () => {
|
|
17
|
+
const accentedDisabledCard = await DSCardV3CO.getCardContainerByIndex(0);
|
|
18
|
+
const disabledAttr = await accentedDisabledCard.getAttribute('disabled');
|
|
19
|
+
expect(disabledAttr).toBeNull();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('02: accented-disabled card renders as a non-form element (div)', async () => {
|
|
23
|
+
const accentedDisabledCard = await DSCardV3CO.getCardContainerByIndex(0);
|
|
24
|
+
const tagName = await accentedDisabledCard.getTagName();
|
|
25
|
+
expect(tagName.toLowerCase()).toBe('div');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('03: accented-disabled card is not hidden', async () => {
|
|
29
|
+
const accentedDisabledCard = await DSCardV3CO.getCardContainerByIndex(0);
|
|
30
|
+
const ariaHidden = await accentedDisabledCard.getAttribute('aria-hidden');
|
|
31
|
+
expect(ariaHidden).toBeNull();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('04: card content can be accessed in the accessibility tree', async () => {
|
|
35
|
+
const heading = await DSCardV3CO.getHByLevelAndIndex(3, 0);
|
|
36
|
+
await expect(heading).toBeExisting();
|
|
37
|
+
await expect(heading).toHaveText('Card Single Select');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('05: disabled control has state via aria-disabled', async () => {
|
|
41
|
+
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
42
|
+
await expect(expandContentButton).toHaveAttribute('aria-disabled', 'true');
|
|
43
|
+
const disabledAttr = await expandContentButton.getAttribute('disabled');
|
|
44
|
+
expect(disabledAttr).toBeNull();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('06: disabled control is keyboard focusable and part of the tab order', async () => {
|
|
48
|
+
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
49
|
+
await browser.keys(Key.Tab);
|
|
50
|
+
await expect(expandContentButton).toBeFocused();
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
|
|
4
|
+
if (
|
|
5
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
8
|
+
browser.capabilities.browserName === 'Chrome'
|
|
9
|
+
) {
|
|
10
|
+
describe('PUI-18720 - CardV3:: Variant Disabled - axe-core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSCardV3CO.variantDisabledURL.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
it('01: should display card disabled and pass axecore scan', async () => {
|
|
16
|
+
const firstItem = await DSCardV3CO.getCardHeader();
|
|
17
|
+
await firstItem.waitForDisplayed();
|
|
18
|
+
const result = await axeCoreCheck();
|
|
19
|
+
expect(result.length).toBe(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
package/ds-chat/DSChatCO.js
CHANGED
|
@@ -5,7 +5,7 @@ import { PageObject, Urlbuilder, getElementByIndex } from '../helpers';
|
|
|
5
5
|
export default class DSChatCO extends PageObject {
|
|
6
6
|
static TEST_STR = 'this is a test string';
|
|
7
7
|
|
|
8
|
-
static systemMessageURL = new Urlbuilder(PATH_E2E_CHAT, 'chat-system-message');
|
|
8
|
+
static systemMessageURL = new Urlbuilder(PATH_E2E_CHAT, 'chat-system-message-test');
|
|
9
9
|
|
|
10
10
|
static messageDelimiterURL = new Urlbuilder(PATH_E2E_CHAT, 'chat-message-delimiter');
|
|
11
11
|
|
|
@@ -21,11 +21,11 @@ export default class DSChatCO extends PageObject {
|
|
|
21
21
|
|
|
22
22
|
static focusCasesURL = new Urlbuilder(PATH_E2E_CHAT, 'container-focus-cases');
|
|
23
23
|
|
|
24
|
-
static mobileContainerURL = new Urlbuilder(PATH_E2E_CHAT, 'mobile-container');
|
|
24
|
+
static mobileContainerURL = new Urlbuilder(PATH_E2E_CHAT, 'mobile-container-test');
|
|
25
25
|
|
|
26
26
|
static sidePanelIntegrationURL = new Urlbuilder(PATH_E2E_CHAT, 'side-panel-integration-test');
|
|
27
27
|
|
|
28
|
-
static tooltipPosition = new Urlbuilder(PATH_E2E_CHAT, 'tooltip-position');
|
|
28
|
+
static tooltipPosition = new Urlbuilder(PATH_E2E_CHAT, 'tooltip-position-test');
|
|
29
29
|
|
|
30
30
|
static focuseableBanners = new Urlbuilder(PATH_E2E_CHAT, 'focus-on-banner');
|
|
31
31
|
|
|
@@ -5,7 +5,7 @@ import { PageObject, Urlbuilder } from '../../helpers';
|
|
|
5
5
|
export default class ComposerCO extends PageObject {
|
|
6
6
|
static composerURL = new Urlbuilder(PATH_E2E_CHAT, 'composer');
|
|
7
7
|
|
|
8
|
-
static mobileComposerURL = new Urlbuilder(PATH_E2E_CHAT, 'mobile-container');
|
|
8
|
+
static mobileComposerURL = new Urlbuilder(PATH_E2E_CHAT, 'mobile-container-test');
|
|
9
9
|
|
|
10
10
|
static characterCountURL = new Urlbuilder(PATH_E2E_CHAT, 'composer-character-count');
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import { PATH_E2E_CHAT } from '../../paths';
|
|
|
3
3
|
import { PageObject, Urlbuilder } from '../../helpers';
|
|
4
4
|
|
|
5
5
|
export default class HeaderCO extends PageObject {
|
|
6
|
-
static headerURL = new Urlbuilder(PATH_E2E_CHAT, '
|
|
6
|
+
static headerURL = new Urlbuilder(PATH_E2E_CHAT, 'with-dropdown-menu-test');
|
|
7
7
|
|
|
8
8
|
static withConditionalRenderingUCURL = new Urlbuilder(PATH_E2E_CHAT, 'conditional-rendering-header-buttons');
|
|
9
9
|
|
|
@@ -67,9 +67,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
67
67
|
const input = await ReactHookCO.getMonthInputsByIndex(2);
|
|
68
68
|
const inputValue = await input.getAttribute('aria-label');
|
|
69
69
|
// eslint-disable-next-line max-len
|
|
70
|
-
await expect(inputValue).toEqual(
|
|
71
|
-
'month input field, current values: November, twenty second, 3333, 4, 45, ante meridiem',
|
|
72
|
-
);
|
|
70
|
+
await expect(inputValue).toEqual('month');
|
|
73
71
|
});
|
|
74
72
|
});
|
|
75
73
|
}
|
|
@@ -51,7 +51,11 @@ export default class HeaderCO extends PageObject {
|
|
|
51
51
|
|
|
52
52
|
static getHeadersWrapper = async () => $('[data-testid="ds-datatable-head-wrapper"]');
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
// PUI-17784: resize handle changed from <input type="range" aria-label="Resize column"> to a
|
|
55
|
+
// <button role="application" aria-labelledby> with dynamic "Resize {column} column" naming; the old
|
|
56
|
+
// selector never matched data-testid="column" (unverified in d2) and stopped matching aria-label after
|
|
57
|
+
// that fix.
|
|
58
|
+
static getResizeHandler = async (index) => $$('[data-testid="ds-datatable-resizer"]')[index];
|
|
55
59
|
|
|
56
60
|
static getFilterBtnByIndex = async (index) => $$('[data-testid="data-table-filter-menu-button"] button')[index];
|
|
57
61
|
|
|
@@ -24,7 +24,7 @@ if (
|
|
|
24
24
|
const listbox = await DSComboboxSingleCO.getComboListbox();
|
|
25
25
|
await listbox.waitForExist();
|
|
26
26
|
|
|
27
|
-
const result = await axeCoreCheck();
|
|
27
|
+
const result = await axeCoreCheck({ extraDisabledRules: ['scrollable-region-focusable'] });
|
|
28
28
|
expect(result.length).toBe(0);
|
|
29
29
|
});
|
|
30
30
|
});
|