dimsum-e2e-tests 3.70.0-next.4 → 3.70.0-next.40
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 +204 -0
- package/ds-accordion/DSAccordion.visual.spec.js +6 -0
- package/ds-accordion/DSAccordionCO.js +11 -3
- package/ds-accordion/controlled/DSAccordion.controlled.func.spec.js +23 -0
- package/ds-accordion/header-structure/DSAccordion.header-structure.func.spec.js +49 -0
- package/ds-accordion/input-inside/DSAccordion.input-inside.func.spec.js +17 -0
- package/ds-accordion-native/DSAccordionNative.axe-core.func.spec.js +135 -0
- package/ds-accordion-native/DSAccordionNative.func.spec.js +200 -0
- package/ds-accordion-native/DSAccordionNative.visual.spec.js +158 -0
- package/ds-accordion-native/DSAccordionNativeCO.js +161 -0
- package/ds-accordion-native/QA_NOTES.md +88 -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 +28 -0
- package/ds-accordion-native/controlled/DSAccordionNative.controlled.func.spec.js +22 -0
- package/ds-accordion-native/header-structure/DSAccordionNative.header-structure.func.spec.js +53 -0
- package/ds-accordion-native/input-inside/DSAccordionNative.input-inside.func.spec.js +16 -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 +49 -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 +21 -0
- package/ds-accordion-native/wrapLabel/DSAccordionNative.wrap-label.visual.spec.js +21 -0
- package/ds-apppicker/DSAppPickerCO.js +1 -1
- package/ds-autocomplete/DSAutocomplete.visual.spec.js +34 -0
- package/ds-autocomplete/DSAutocompleteCO.js +2 -0
- package/ds-card-v3/DSCardV3CO.js +14 -0
- package/ds-card-v3/accordion/DSCardV3.accordion-aria-structure.func.spec.js +41 -0
- package/ds-card-v3/disabled/DSCardV3.disabled-non-interactive.func.spec.js +25 -0
- package/ds-card-v3/multi-select/DSCardV3.multi-select.aria-grouping.func.spec.js +24 -0
- package/ds-card-v3/single-select/DSCardV3.single-select.aria-grouping.func.spec.js +24 -0
- package/ds-chat/DSChat.axe-core.func.spec.js +2 -2
- package/ds-chat/DSChat.visual.spec.js +3 -3
- package/ds-chat/DSChatCO.js +17 -23
- package/ds-chat/bubbles/slots/DSChatBubble.slots.axe-core.func.spec.js +24 -0
- package/ds-chat/bubbles/slots/DSChatBubble.slots.func.spec.js +49 -0
- package/ds-chat/bubbles/slots/DSChatBubble.slots.visual.spec.js +25 -0
- package/ds-chat/card/slots/DSChatCard.slots.axe-core.func.spec.js +24 -0
- package/ds-chat/card/slots/DSChatCard.slots.func.spec.js +47 -0
- package/ds-chat/card/slots/DSChatCard.slots.visual.spec.js +18 -0
- package/ds-chat/card/truncated-text/DSChatCard.truncated-text.func.spec.js +32 -0
- package/ds-chat/card/truncated-text/DSChatCard.truncated-text.visual.spec.js +26 -0
- package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.axe-core.func.spec.js +23 -0
- package/ds-chat/card/with-notification-badges/DSChatCard.with-notification-badges.visual.spec.js +17 -0
- package/ds-chat/components/BubbleCO.js +46 -3
- package/ds-chat/components/CardCO.js +77 -0
- package/ds-chat/components/ComposerCO.js +6 -6
- package/ds-chat/components/FloatingButtonCO.js +2 -2
- package/ds-chat/components/HeaderCO.js +2 -2
- package/ds-chat/components/TileCO.js +82 -0
- package/ds-chat/components/index.js +3 -2
- package/ds-chat/loadmore/DSChat-loadmore.func.spec.js +1 -1
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.axe-core.func.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.func.spec.js +1 -1
- package/{ds-chat-tile → ds-chat/tile}/DSChat-tile.visual.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.axe-core.func.spec.js +2 -2
- package/{ds-chat-tile → ds-chat/tile}/aria-disabled/DSChat-tile.aria-disabled.visual.spec.js +1 -1
- package/ds-chat/tile/slots/DSChatTile.slots.func.spec.js +53 -0
- package/ds-chat/tile/slots/DSChatTile.slots.visual.spec.js +18 -0
- package/ds-controlled-form/ds-combobox/DSComboboxCO.js +2 -2
- package/ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO.js +1 -1
- package/ds-controlled-form/ds-controlled-inputgroup/DSControlledInputGroupCO.js +1 -1
- package/ds-data-table-async/DSDataTableCO.js +14 -12
- package/ds-data-table-async/basic/DSDataTable.basic.visual.spec.js +1 -1
- package/ds-data-table-async/components/FiltersCO.js +1 -1
- package/ds-data-table-async/menubutton/DSDataTable.MenuButton.keyboard.func.spec.js +8 -7
- package/ds-data-table-async/menubutton/DSDataTable.MenuButton.mouse.func.spec.js +6 -7
- 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 +11 -3
- package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.axe-core.func.spec.js +55 -0
- package/ds-form-combobox-multi/aria-busy-loading/DSComboboxMulti.aria-busy-loading.func.spec.js +57 -0
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +15 -0
- package/ds-form-combobox-multi/disabled/DSComboboxMulti.disabled.axe-core.func.spec.js +24 -0
- package/ds-form-combobox-multi/disabled/DSComboboxMulti.disabled.visual.spec.js +22 -0
- package/ds-form-combobox-multi/grouped/DSComboboxMulti.grouped.visual.spec.js +42 -0
- package/ds-form-combobox-multi/inline/DSComboboxMulti.inline.visual.spec.js +21 -0
- package/ds-form-combobox-multi/skeleton/DSComboboxMulti.skeleton.visual.spec.js +25 -0
- package/ds-form-combobox-single/DSComboboxSingleCO.js +11 -3
- package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.axe-core.func.spec.js +49 -0
- package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.func.spec.js +54 -0
- package/ds-form-combobox-single/aria-disabled/DSComboboxSingle.aria-disabled.visual.spec.js +18 -0
- package/ds-form-combobox-single/disabled/DSComboboxSingle.disabled.axe-core.func.spec.js +24 -0
- package/ds-form-combobox-single/disabled/DSComboboxSingle.disabled.visual.spec.js +22 -0
- package/ds-form-combobox-single/grouped/DSComboboxSingle.grouped.visual.spec.js +45 -0
- package/ds-form-combobox-single/inline/DSComboboxSingle.inline.visual.spec.js +23 -0
- package/ds-form-combobox-single/skeleton/DSComboboxSingle.skeleton.visual.spec.js +25 -0
- package/ds-form-date-range-picker/date-segment-aria-labels/DateRangePicker.date-segment-aria-labels.func.spec.js +64 -0
- package/ds-form-native-select/NativeSelect.axe-core.func.spec.js +39 -0
- package/ds-form-native-select/NativeSelect.visual.spec.js +33 -0
- package/ds-form-native-select/NativeSelectCO.js +6 -0
- package/ds-form-native-select/option-selection/NativeSelect.option-selection.func.spec.js +25 -0
- package/ds-leftnavigation/LeftNavigationCO.js +2 -2
- package/ds-menu-button/DSMenuButtonCO.js +23 -0
- package/ds-menu-button/slots/DSMenuButton.slots.func.spec.js +40 -0
- package/ds-menu-button/slots/DSMenuButton.slots.visual.spec.js +26 -0
- package/ds-modal-slide/ModalSlideCO.js +39 -0
- package/ds-modal-slide/custom-header/ModalSlide.customHeader.focusRing.visual.spec.js +2 -1
- package/ds-modal-slide/slots/ModalSlide.slots.func.spec.js +74 -0
- package/ds-modal-slide/slots/ModalSlide.slots.visual.spec.js +27 -0
- package/ds-notification-badge/DSNotificationBadge.visual.spec.js +17 -20
- package/ds-page-layout/PageLayoutCO.js +4 -4
- package/ds-progress-indicator/DSProgressIndicator.axe-core.func.spec.js +2 -0
- package/ds-progress-indicator/DSProgressIndicatorCO.js +1 -1
- package/ds-shuttle-v2/DSShuttleV2CO.js +11 -1
- package/ds-shuttle-v2/explicit-selection-ui/DSShuttleV2.explicit-selection-ui.func.spec.js +37 -0
- package/ds-shuttle-v2/explicit-selection-ui/DSShuttleV2.explicit-selection-ui.visual.spec.js +27 -0
- package/ds-shuttle-v2/skipped/DSShuttleV2.extra.axe-core.skipped.js +1 -1
- package/ds-shuttle-v2/skipped/DSShuttleV2.filter.axe-core.skipped.js +1 -1
- package/ds-shuttle-v2/skipped/DSShuttleV2.globalcheckbox.axe-core.skipped.js +1 -1
- package/ds-shuttle-v2/skipped/DSShuttleV2.items.axe-core.skipped.js +3 -3
- package/ds-shuttle-v2/skipped/DSShuttleV2.skipped.js +5 -5
- package/ds-tab-button/DSTabButton.func.spec.js +1 -1
- package/ds-tooltip-v3/DSTooltipV3CO.js +21 -0
- package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.axe-core.func.spec.js +23 -0
- package/ds-tooltip-v3/aria-tooltip-pattern/DSTooltipV3.aria-tooltip-pattern.func.spec.js +29 -0
- package/ds-tooltip-v3/dialog/DSTooltipV3.dialog.func.spec.js +45 -0
- package/ds-tooltip-v3/dialog/DSTooltipV3.dialog.visual.spec.js +29 -0
- package/ds-treeview/DSTreeViewCO.js +25 -2
- package/ds-treeview/dragAndDrop/TreeView-dnd_keyboard.func.spec.js +96 -0
- package/package.json +150 -152
- package/paths.js +9 -1
- package/ds-chat-tile/TileCO.js +0 -35
- package/ds-treeview/dragAndDrop/TreeView-dnd_mouse.func.spec.js +0 -61
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DSComboboxMultiCO from '../DSComboboxMultiCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fixes in PUI-15502 (disabled input hint/value + pill font color =
|
|
4
|
+
// neutral-600) and PUI-15578 (dropdown chevron fill = neutral-400 in disabled state).
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-18573 - ComboboxMulti:: Disabled -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxMultiCO.disabled.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('01: should display disabled combobox with dimmed pill text and chevron', async () => {
|
|
13
|
+
const combobox = await DSComboboxMultiCO.getCombobox();
|
|
14
|
+
await combobox.waitForDisplayed();
|
|
15
|
+
|
|
16
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
17
|
+
DSComboboxMultiCO.snapshotPath('combobox-multi-disabled-input'),
|
|
18
|
+
);
|
|
19
|
+
await expect(snapshot).toEqual(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import DSComboboxMultiCO from '../DSComboboxMultiCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fixes introduced in PUI-15487 (group/section label styled per the
|
|
4
|
+
// b3-strong spec — bold, neutral color, 32px row) and PUI-15473 (menu item idle
|
|
5
|
+
// label color resolves to neutral-700; disabled options fall through to the muted
|
|
6
|
+
// disabledOption color). The open grouped menu surfaces all of these at once.
|
|
7
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-18571 - ComboboxMulti:: Grouped -Visual', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSComboboxMultiCO.grouped.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('01: should display grouped menu with section labels, idle and disabled option text', async () => {
|
|
15
|
+
const menuList = await DSComboboxMultiCO.getMenuList();
|
|
16
|
+
await menuList.waitForDisplayed();
|
|
17
|
+
|
|
18
|
+
const sectionLabel = await DSComboboxMultiCO.getComboboxSectionLabelByIndex(0);
|
|
19
|
+
await sectionLabel.waitForDisplayed();
|
|
20
|
+
|
|
21
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
22
|
+
DSComboboxMultiCO.snapshotPath('combobox-multi-grouped-menu'),
|
|
23
|
+
);
|
|
24
|
+
await expect(snapshot).toEqual(0);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('02: should display grouped menu with a selected option checked', async () => {
|
|
28
|
+
const option = await DSComboboxMultiCO.getOptionByIndex(0);
|
|
29
|
+
await option.click();
|
|
30
|
+
|
|
31
|
+
// multi select keeps the menu open — the selected option renders its checked
|
|
32
|
+
// styling in place.
|
|
33
|
+
const menuList = await DSComboboxMultiCO.getMenuList();
|
|
34
|
+
await menuList.waitForDisplayed();
|
|
35
|
+
|
|
36
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
37
|
+
DSComboboxMultiCO.snapshotPath('combobox-multi-grouped-menu-selected'),
|
|
38
|
+
);
|
|
39
|
+
await expect(snapshot).toEqual(0);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSComboboxMultiCO from '../DSComboboxMultiCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
// Tests for the fix introduced in PUI-15481 (inline padding 8px top/bottom — was 10px)
|
|
6
|
+
describe('PUI-18560 - ComboboxMulti:: inline config padding - visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxMultiCO.inlineTest.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('01: inline combobox should render with the corrected 8px padding', async () => {
|
|
12
|
+
await browser.eyesOpen();
|
|
13
|
+
const pillDropdownBtn = await DSComboboxMultiCO.getPillDropDownBtn();
|
|
14
|
+
await pillDropdownBtn.click();
|
|
15
|
+
const menuList = await DSComboboxMultiCO.getMenuList();
|
|
16
|
+
await menuList.waitForDisplayed();
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(DSComboboxMultiCO.snapshotPath('combobox-multi-inline-padding'));
|
|
18
|
+
await expect(snapshot).toEqual(0);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DSComboboxMultiCO from '../DSComboboxMultiCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fix introduced in PUI-15485 (skeleton menu items render with the
|
|
4
|
+
// correct region fill — neutral-080 — and a 1px corner radius per the menu spec).
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-18572 - ComboboxMulti:: Skeleton -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxMultiCO.skeletonTest.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('01: should display skeleton menu items with region fill and corner radius', async () => {
|
|
13
|
+
const dropdownMenuBtn = await DSComboboxMultiCO.getDropDownMenuBtn();
|
|
14
|
+
await dropdownMenuBtn.click();
|
|
15
|
+
|
|
16
|
+
const skeletonMenuItem = await DSComboboxMultiCO.getComboboxSkeletonMenuItem();
|
|
17
|
+
await skeletonMenuItem.waitForDisplayed();
|
|
18
|
+
|
|
19
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
20
|
+
DSComboboxMultiCO.snapshotPath('combobox-multi-skeleton-menu'),
|
|
21
|
+
);
|
|
22
|
+
await expect(snapshot).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -4,6 +4,10 @@ import { PageObject, Urlbuilder } from '../helpers';
|
|
|
4
4
|
|
|
5
5
|
export default class DSComboboxSingleCO extends PageObject {
|
|
6
6
|
// STORIES
|
|
7
|
+
static loadingTest = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'loading-test');
|
|
8
|
+
|
|
9
|
+
static skeletonTest = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'skeleton-test');
|
|
10
|
+
|
|
7
11
|
static applyAriaDisabled = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'apply-aria-disabled-test');
|
|
8
12
|
|
|
9
13
|
static readOnly = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'read-only-test');
|
|
@@ -33,6 +37,10 @@ export default class DSComboboxSingleCO extends PageObject {
|
|
|
33
37
|
|
|
34
38
|
static disabled = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'disabled-test');
|
|
35
39
|
|
|
40
|
+
static grouped = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'grouped-test');
|
|
41
|
+
|
|
42
|
+
static inlineTest = new Urlbuilder(PATH_E2E_COMBOBOX_SINGLE, 'inline-test');
|
|
43
|
+
|
|
36
44
|
// COMBOBOX - INPUT
|
|
37
45
|
static async getCombobox() {
|
|
38
46
|
return $('[data-testid="combobox-container"]');
|
|
@@ -133,7 +141,7 @@ export default class DSComboboxSingleCO extends PageObject {
|
|
|
133
141
|
}
|
|
134
142
|
|
|
135
143
|
static async getSimpleTruncateText() {
|
|
136
|
-
return $('[data-testid="
|
|
144
|
+
return $('[data-testid="combobox-selected-values"]');
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
static async getNumberOptions() {
|
|
@@ -182,7 +190,7 @@ export default class DSComboboxSingleCO extends PageObject {
|
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
static async getTooltip() {
|
|
185
|
-
return $('[data-testid="
|
|
193
|
+
return $('[data-testid="ds-floating-wrapper-root"]');
|
|
186
194
|
}
|
|
187
195
|
|
|
188
196
|
// Slots
|
|
@@ -244,7 +252,7 @@ export default class DSComboboxSingleCO extends PageObject {
|
|
|
244
252
|
}
|
|
245
253
|
|
|
246
254
|
static async getComboboxSectionLabelByIndex(index) {
|
|
247
|
-
return $$('[data-dimsum-slot="dsComboboxSectionLabel"]')[index];
|
|
255
|
+
return $$('[data-dimsum-parent-slot="dsComboboxSectionLabel"]')[index];
|
|
248
256
|
}
|
|
249
257
|
|
|
250
258
|
static async getComboboxSectionWrapperSlotByIndex(index) {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
2
|
+
import { axeCoreCheck } from '../../helpers';
|
|
3
|
+
|
|
4
|
+
// Tests for the fix introduced in PUI-18034
|
|
5
|
+
// (busy listbox with aria-busy + aria-label so screen readers announce the
|
|
6
|
+
// in-progress state via the input's aria-controls linkage; this spec verifies
|
|
7
|
+
// the busy listbox surface passes axe-core).
|
|
8
|
+
if (
|
|
9
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
10
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
11
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
12
|
+
browser.capabilities.browserName === 'Chrome'
|
|
13
|
+
) {
|
|
14
|
+
describe('PUI-18474 - ComboboxSingle:: busy listbox while isLoading - axe-core', () => {
|
|
15
|
+
before('loading page', async () => {
|
|
16
|
+
const errorOnGo = await DSComboboxSingleCO.loadingTest.go();
|
|
17
|
+
if (errorOnGo) throw errorOnGo;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('01: busy listbox while isLoading should pass axe-core scan', async () => {
|
|
21
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
22
|
+
await dropdownMenuBtn.click();
|
|
23
|
+
|
|
24
|
+
const listbox = await DSComboboxSingleCO.getComboListbox();
|
|
25
|
+
await listbox.waitForExist();
|
|
26
|
+
|
|
27
|
+
const result = await axeCoreCheck();
|
|
28
|
+
expect(result.length).toBe(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe('PUI-18475 - ComboboxSingle:: busy listbox while isSkeleton - axe-core', () => {
|
|
33
|
+
before('loading page', async () => {
|
|
34
|
+
const errorOnGo = await DSComboboxSingleCO.skeletonTest.go();
|
|
35
|
+
if (errorOnGo) throw errorOnGo;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('01: busy listbox while isSkeleton should pass axe-core scan', async () => {
|
|
39
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
40
|
+
await dropdownMenuBtn.click();
|
|
41
|
+
|
|
42
|
+
const listbox = await DSComboboxSingleCO.getComboListbox();
|
|
43
|
+
await listbox.waitForExist();
|
|
44
|
+
|
|
45
|
+
const result = await axeCoreCheck();
|
|
46
|
+
expect(result.length).toBe(0);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
package/ds-form-combobox-single/aria-busy-loading/DSComboboxSingle.aria-busy-loading.func.spec.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fix introduced in PUI-18034
|
|
4
|
+
// (carries aria-busy + aria-label on the listbox during loading/skeleton so
|
|
5
|
+
// screen readers announce the in-progress state via the input's aria-controls
|
|
6
|
+
// linkage; replaces the prior racing assertive live region).
|
|
7
|
+
if (
|
|
8
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
9
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
10
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
11
|
+
browser.capabilities.browserName === 'Chrome'
|
|
12
|
+
) {
|
|
13
|
+
describe('PUI-18445 - ComboboxSingle:: busy listbox while isLoading - Func', () => {
|
|
14
|
+
before('loading page', async () => {
|
|
15
|
+
const errorOnGo = await DSComboboxSingleCO.loadingTest.go();
|
|
16
|
+
if (errorOnGo) throw errorOnGo;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('01: listbox is aria-busy with aria-label and input aria-controls links to it', async () => {
|
|
20
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
21
|
+
await dropdownMenuBtn.click();
|
|
22
|
+
|
|
23
|
+
const listbox = await DSComboboxSingleCO.getComboListbox();
|
|
24
|
+
await listbox.waitForExist();
|
|
25
|
+
|
|
26
|
+
await expect(listbox).toHaveAttribute('role', 'listbox');
|
|
27
|
+
await expect(listbox).toHaveAttribute('aria-busy', 'true');
|
|
28
|
+
await expect(listbox).toHaveAttribute('aria-label', 'Loading options please wait');
|
|
29
|
+
|
|
30
|
+
const listboxId = await listbox.getAttribute('id');
|
|
31
|
+
const input = await DSComboboxSingleCO.getComboboxInput();
|
|
32
|
+
await expect(input).toHaveAttribute('aria-controls', listboxId);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('PUI-18446 - ComboboxSingle:: busy listbox while isSkeleton - Func', () => {
|
|
37
|
+
before('loading page', async () => {
|
|
38
|
+
const errorOnGo = await DSComboboxSingleCO.skeletonTest.go();
|
|
39
|
+
if (errorOnGo) throw errorOnGo;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('01: listbox is aria-busy with aria-label', async () => {
|
|
43
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
44
|
+
await dropdownMenuBtn.click();
|
|
45
|
+
|
|
46
|
+
const listbox = await DSComboboxSingleCO.getComboListbox();
|
|
47
|
+
await listbox.waitForExist();
|
|
48
|
+
|
|
49
|
+
await expect(listbox).toHaveAttribute('role', 'listbox');
|
|
50
|
+
await expect(listbox).toHaveAttribute('aria-busy', 'true');
|
|
51
|
+
await expect(listbox).toHaveAttribute('aria-label', 'Loading options please wait');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { Key } from 'webdriverio';
|
|
3
3
|
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
4
|
+
import DSControlledCheckboxCO from '../../ds-controlled-form/ds-controlled-checkbox/DSControlledCheckboxCO';
|
|
5
|
+
import { mouseOver } from '../../helpers';
|
|
4
6
|
|
|
5
7
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
8
|
describe('PUI-14367 - ComboboxSingle:: applyAriaDisabled prop - visual', () => {
|
|
@@ -16,5 +18,21 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
16
18
|
);
|
|
17
19
|
await expect(snapshot).toEqual(0);
|
|
18
20
|
});
|
|
21
|
+
// PUI-15476: aria-disabled item text color must change to n600 on hover
|
|
22
|
+
it('02: listbox with aria-disabled item hovered should display n600 text color', async () => {
|
|
23
|
+
await browser.eyesOpen();
|
|
24
|
+
const checkbox = await DSControlledCheckboxCO.getCheckbox();
|
|
25
|
+
await checkbox.click();
|
|
26
|
+
const combobox = await DSComboboxSingleCO.getCombobox();
|
|
27
|
+
await combobox.click();
|
|
28
|
+
const menuList = await DSComboboxSingleCO.getMenuList();
|
|
29
|
+
await menuList.waitForDisplayed();
|
|
30
|
+
const ariaDisabledOption = await DSComboboxSingleCO.getOptionByIndex(1);
|
|
31
|
+
await mouseOver(ariaDisabledOption);
|
|
32
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
33
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-aria-disabled-item-hovered'),
|
|
34
|
+
);
|
|
35
|
+
await expect(snapshot).toEqual(0);
|
|
36
|
+
});
|
|
19
37
|
});
|
|
20
38
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
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-18476 - ComboboxSingle:: disabled - axe-core', () => {
|
|
11
|
+
before('loading page', async () => {
|
|
12
|
+
const errorOnGo = await DSComboboxSingleCO.disabled.go();
|
|
13
|
+
if (errorOnGo) throw errorOnGo;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('01: disabled combobox should pass axe-core scan', async () => {
|
|
17
|
+
const combobox = await DSComboboxSingleCO.getComboboxByIndex(0);
|
|
18
|
+
await combobox.waitForExist();
|
|
19
|
+
|
|
20
|
+
const result = await axeCoreCheck();
|
|
21
|
+
expect(result.length).toBe(0);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fixes in PUI-15502 (disabled input hint/value font color = neutral-600)
|
|
4
|
+
// and PUI-15578 (dropdown chevron fill = neutral-400 in the disabled state).
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-18570 - ComboboxSingle:: Disabled -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxSingleCO.disabled.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('01: should display disabled combobox with dimmed value text and chevron', async () => {
|
|
13
|
+
const combobox = await DSComboboxSingleCO.getCombobox();
|
|
14
|
+
await combobox.waitForDisplayed();
|
|
15
|
+
|
|
16
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
17
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-disabled-input'),
|
|
18
|
+
);
|
|
19
|
+
await expect(snapshot).toEqual(0);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fixes introduced in PUI-15487 (group/section label styled per the
|
|
4
|
+
// b3-strong spec — bold, neutral color, 32px row) and PUI-15473 (single menu item
|
|
5
|
+
// idle label color set to neutral-700; disabled options fall through to the muted
|
|
6
|
+
// disabledOption color). The open grouped menu surfaces all of these at once.
|
|
7
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
8
|
+
describe('PUI-18568 - ComboboxSingle:: Grouped -Visual', () => {
|
|
9
|
+
before('loading page', async () => {
|
|
10
|
+
const errorOnGo = await DSComboboxSingleCO.grouped.go();
|
|
11
|
+
if (errorOnGo) throw errorOnGo;
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('01: should display grouped menu with section labels, idle and disabled option text', async () => {
|
|
15
|
+
const menuList = await DSComboboxSingleCO.getMenuList();
|
|
16
|
+
await menuList.waitForDisplayed();
|
|
17
|
+
|
|
18
|
+
const sectionLabel = await DSComboboxSingleCO.getComboboxSectionLabelByIndex(0);
|
|
19
|
+
await sectionLabel.waitForDisplayed();
|
|
20
|
+
|
|
21
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
22
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-grouped-menu'),
|
|
23
|
+
);
|
|
24
|
+
await expect(snapshot).toEqual(0);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('02: should display grouped menu with a selected option highlighted', async () => {
|
|
28
|
+
const option = await DSComboboxSingleCO.getOptionByIndex(0);
|
|
29
|
+
await option.click();
|
|
30
|
+
|
|
31
|
+
// single select closes the controlled menu on selection — reopen to capture
|
|
32
|
+
// the selected option styling inside the open listbox.
|
|
33
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
34
|
+
await dropdownMenuBtn.click();
|
|
35
|
+
|
|
36
|
+
const menuList = await DSComboboxSingleCO.getMenuList();
|
|
37
|
+
await menuList.waitForDisplayed();
|
|
38
|
+
|
|
39
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
40
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-grouped-menu-selected'),
|
|
41
|
+
);
|
|
42
|
+
await expect(snapshot).toEqual(0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
3
|
+
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
|
+
// Tests for the fix introduced in PUI-15481 (inline padding 8px top/bottom — was 10px)
|
|
6
|
+
describe('PUI-18559 - ComboboxSingle:: inline config padding - visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxSingleCO.inlineTest.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
it('01: inline combobox should render with the corrected 8px padding', async () => {
|
|
12
|
+
await browser.eyesOpen();
|
|
13
|
+
const pillDropdownBtn = await DSComboboxSingleCO.getPillDropDownBtn();
|
|
14
|
+
await pillDropdownBtn.click();
|
|
15
|
+
const menuList = await DSComboboxSingleCO.getMenuList();
|
|
16
|
+
await menuList.waitForDisplayed();
|
|
17
|
+
const snapshot = await browser.eyesCheckSnapshot(
|
|
18
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-inline-padding'),
|
|
19
|
+
);
|
|
20
|
+
await expect(snapshot).toEqual(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DSComboboxSingleCO from '../DSComboboxSingleCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the fix introduced in PUI-15485 (skeleton menu items render with the
|
|
4
|
+
// correct region fill — neutral-080 — and a 1px corner radius per the menu spec).
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
describe('PUI-18569 - ComboboxSingle:: Skeleton -Visual', () => {
|
|
7
|
+
before('loading page', async () => {
|
|
8
|
+
const errorOnGo = await DSComboboxSingleCO.skeletonTest.go();
|
|
9
|
+
if (errorOnGo) throw errorOnGo;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('01: should display skeleton menu items with region fill and corner radius', async () => {
|
|
13
|
+
const dropdownMenuBtn = await DSComboboxSingleCO.getDropDownMenuBtn();
|
|
14
|
+
await dropdownMenuBtn.click();
|
|
15
|
+
|
|
16
|
+
const skeletonMenuItem = await DSComboboxSingleCO.getComboboxSkeletonMenuItem();
|
|
17
|
+
await skeletonMenuItem.waitForDisplayed();
|
|
18
|
+
|
|
19
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
20
|
+
DSComboboxSingleCO.snapshotPath('combobox-single-skeleton-menu'),
|
|
21
|
+
);
|
|
22
|
+
await expect(snapshot).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DateRangePickerCO from '../DateRangePickerCO';
|
|
3
|
+
|
|
4
|
+
// Tests for the fix introduced in PUI-15568 — each day/month/year segment now exposes a
|
|
5
|
+
// name-only aria-label ("day"/"month"/"year") with no native role word and no sibling-field
|
|
6
|
+
// state; per-field state lives on role="spinbutton" + aria-valuetext.
|
|
7
|
+
// Chrome-only: pure DOM-attribute assertions are identical across browsers.
|
|
8
|
+
|
|
9
|
+
// Asserts a single segment input is name-only: aria-label === field name, spinbutton role,
|
|
10
|
+
// empty value-text, and none of the leaked phrases the defect used to inject into the label.
|
|
11
|
+
const assertNameOnlyEmptySegment = async (input, name) => {
|
|
12
|
+
await expect(input).toHaveAttribute('aria-label', name);
|
|
13
|
+
await expect(input).toHaveAttribute('role', 'spinbutton');
|
|
14
|
+
await expect(input).toHaveAttribute('aria-valuetext', 'empty');
|
|
15
|
+
const label = await input.getAttribute('aria-label');
|
|
16
|
+
expect(label).not.toContain('input field');
|
|
17
|
+
expect(label).not.toContain('current values');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (
|
|
21
|
+
(!browser.capabilities['ice:options'].isPhone &&
|
|
22
|
+
!browser.capabilities['ice:options'].isTablet &&
|
|
23
|
+
browser.capabilities.browserName === 'chrome') ||
|
|
24
|
+
browser.capabilities.browserName === 'Chrome'
|
|
25
|
+
) {
|
|
26
|
+
describe('PUI-18653 - DSControlledDateRangePicker:: date segment aria-labels - Func', () => {
|
|
27
|
+
before('loading page', async () => {
|
|
28
|
+
const errorOnGo = await DateRangePickerCO.basic.go();
|
|
29
|
+
if (errorOnGo) throw errorOnGo;
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Static reads on the empty initial state — consolidated into one it() (no interaction).
|
|
33
|
+
// index 0 = Start date group, index 1 = End date group.
|
|
34
|
+
it('01: each segment exposes a name-only aria-label, spinbutton role and empty value-text', async () => {
|
|
35
|
+
// Start date group
|
|
36
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getMonthInputByIndex(0), 'month');
|
|
37
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getDayInputByIndex(0), 'day');
|
|
38
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getYearInputByIndex(0), 'year');
|
|
39
|
+
// End date group
|
|
40
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getMonthInputByIndex(1), 'month');
|
|
41
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getDayInputByIndex(1), 'day');
|
|
42
|
+
await assertNameOnlyEmptySegment(await DateRangePickerCO.getYearInputByIndex(1), 'year');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('02: filling one segment does not leak its value into sibling aria-labels', async () => {
|
|
46
|
+
const month = await DateRangePickerCO.getMonthInputByIndex(0);
|
|
47
|
+
await month.click();
|
|
48
|
+
await browser.keys(Key.ArrowUp); // 01 / January
|
|
49
|
+
await browser.keys(Key.ArrowUp); // 02 / February
|
|
50
|
+
|
|
51
|
+
// filled field announces its OWN value via aria-valuetext; label stays name-only
|
|
52
|
+
await expect(month).toHaveAttribute('aria-label', 'month');
|
|
53
|
+
await expect(month).toHaveAttribute('aria-valuetext', 'February');
|
|
54
|
+
|
|
55
|
+
// siblings stay name-only + empty — no "February" leaks into their names
|
|
56
|
+
const day = await DateRangePickerCO.getDayInputByIndex(0);
|
|
57
|
+
const year = await DateRangePickerCO.getYearInputByIndex(0);
|
|
58
|
+
await expect(day).toHaveAttribute('aria-label', 'day');
|
|
59
|
+
await expect(day).toHaveAttribute('aria-valuetext', 'empty');
|
|
60
|
+
await expect(year).toHaveAttribute('aria-label', 'year');
|
|
61
|
+
await expect(year).toHaveAttribute('aria-valuetext', 'empty');
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -54,4 +54,43 @@ if (
|
|
|
54
54
|
expect(result.length).toBe(0);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
+
|
|
58
|
+
describe('PUI-16464 - NativeSelect: ApplyAriaDisabled -AxeCore', () => {
|
|
59
|
+
before(async () => {
|
|
60
|
+
const errorOnGo = await NativeSelect.applyAriaDisabledURL.go();
|
|
61
|
+
if (errorOnGo) throw errorOnGo;
|
|
62
|
+
});
|
|
63
|
+
it('01: should have applyAriaDisabled native select and pass axe-core scan', async () => {
|
|
64
|
+
const nativeSelect = await NativeSelect.getRootByIndex(0);
|
|
65
|
+
await nativeSelect.waitForDisplayed();
|
|
66
|
+
const result = await axeCoreCheck();
|
|
67
|
+
expect(result.length).toBe(0);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
describe('PUI-16464 - NativeSelect: ReadOnly -AxeCore', () => {
|
|
72
|
+
before(async () => {
|
|
73
|
+
const errorOnGo = await NativeSelect.readOnlyURL.go();
|
|
74
|
+
if (errorOnGo) throw errorOnGo;
|
|
75
|
+
});
|
|
76
|
+
it('01: should have readOnly native select and pass axe-core scan', async () => {
|
|
77
|
+
const nativeSelect = await NativeSelect.getRootByIndex(0);
|
|
78
|
+
await nativeSelect.waitForDisplayed();
|
|
79
|
+
const result = await axeCoreCheck();
|
|
80
|
+
expect(result.length).toBe(0);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
describe('PUI-16464 - NativeSelect: ApplyAriaDisabled + hasError -AxeCore', () => {
|
|
85
|
+
before(async () => {
|
|
86
|
+
const errorOnGo = await NativeSelect.applyAriaDisabledWithErrorURL.go();
|
|
87
|
+
if (errorOnGo) throw errorOnGo;
|
|
88
|
+
});
|
|
89
|
+
it('01: should have applyAriaDisabled + hasError native select and pass axe-core scan', async () => {
|
|
90
|
+
const nativeSelect = await NativeSelect.getRootByIndex(0);
|
|
91
|
+
await nativeSelect.waitForDisplayed();
|
|
92
|
+
const result = await axeCoreCheck();
|
|
93
|
+
expect(result.length).toBe(0);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
57
96
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import NativeSelect from './NativeSelectCO';
|
|
2
|
+
|
|
3
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
|
+
describe('PUI-18537 - NativeSelect:: basic state -Visual', () => {
|
|
5
|
+
before('loading page', async () => {
|
|
6
|
+
const errorOnGo = await NativeSelect.controlledURL.go();
|
|
7
|
+
if (errorOnGo) throw errorOnGo;
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('01: should render the basic controlled native select', async () => {
|
|
11
|
+
const root = await NativeSelect.getRootByIndex(0);
|
|
12
|
+
await root.waitForDisplayed();
|
|
13
|
+
const snapshot = await browser.percyCheckScreenshot(NativeSelect.snapshotPath('basic'));
|
|
14
|
+
await expect(snapshot).toEqual(0);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Coverage for the fix introduced in PUI-14617
|
|
19
|
+
// (disabled-state colors aligned with Combobox disabled-state colors to meet WCAG 1.4.3).
|
|
20
|
+
describe('PUI-18538 - NativeSelect:: disabled state -Visual', () => {
|
|
21
|
+
before('loading page', async () => {
|
|
22
|
+
const errorOnGo = await NativeSelect.disabledURL.go();
|
|
23
|
+
if (errorOnGo) throw errorOnGo;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('01: should render the disabled native select', async () => {
|
|
27
|
+
const root = await NativeSelect.getRootByIndex(0);
|
|
28
|
+
await root.waitForDisplayed();
|
|
29
|
+
const snapshot = await browser.percyCheckScreenshot(NativeSelect.snapshotPath('disabled'));
|
|
30
|
+
await expect(snapshot).toEqual(0);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -11,6 +11,12 @@ export default class NativeSelect extends PageObject {
|
|
|
11
11
|
|
|
12
12
|
static disabledURL = new Urlbuilder(PATH_E2E_NATIVE_SELECT, 'disabled-test');
|
|
13
13
|
|
|
14
|
+
static applyAriaDisabledURL = new Urlbuilder(PATH_E2E_NATIVE_SELECT, 'apply-aria-disabled-test');
|
|
15
|
+
|
|
16
|
+
static readOnlyURL = new Urlbuilder(PATH_E2E_NATIVE_SELECT, 'read-only-test');
|
|
17
|
+
|
|
18
|
+
static applyAriaDisabledWithErrorURL = new Urlbuilder(PATH_E2E_NATIVE_SELECT, 'apply-aria-disabled-with-error-test');
|
|
19
|
+
|
|
14
20
|
// Selectors
|
|
15
21
|
static async getInputSlotByIndex(index = 0) {
|
|
16
22
|
return $$(`[data-dimsum-slot="dsNativeselectInput"]`)[index];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import NativeSelect from '../NativeSelectCO';
|
|
2
|
+
|
|
3
|
+
// Tests for the option selection behavior of the native select introduced in PUI-14617.
|
|
4
|
+
// Selecting an option must update the <select> value (options use value={index}).
|
|
5
|
+
// Uses the WebDriver native select command (selectByIndex) so the native popup is opened and an
|
|
6
|
+
// option committed the same way in every browser — simulated keystrokes on the OS-drawn popup are
|
|
7
|
+
// not reachable by WebDriver on macOS/Safari, which is why a keystroke-based assertion is not portable.
|
|
8
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
9
|
+
describe('PUI-18563 - NativeSelect:: Option selection updates value -Func', () => {
|
|
10
|
+
before(async () => {
|
|
11
|
+
const errorOnGo = await NativeSelect.controlledURL.go();
|
|
12
|
+
if (errorOnGo) throw errorOnGo;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('01: should update the value when selecting an option from the popup', async () => {
|
|
16
|
+
const nativeSelect = await NativeSelect.getRootByIndex(0);
|
|
17
|
+
await nativeSelect.waitForDisplayed();
|
|
18
|
+
|
|
19
|
+
const input = await NativeSelect.getInputSlotByIndex(0);
|
|
20
|
+
await input.selectByIndex(2);
|
|
21
|
+
|
|
22
|
+
await expect(input).toHaveValue('2');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -71,11 +71,11 @@ export default class LeftNavCO extends PageObject {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
static async getTruncatedText(index) {
|
|
74
|
-
return $$('[data-testid="
|
|
74
|
+
return $$('[data-testid="leftnav-list-item-label"]')[index];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
static async getTooltip() {
|
|
78
|
-
return $('[data-testid="
|
|
78
|
+
return $('[data-testid="ds-floating-wrapper-root"]');
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
static async getSubItemBtn() {
|