dimsum-e2e-tests 3.70.0-next.62 → 3.70.0-next.69
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 +807 -767
- package/ds-apppicker/DSAppPickerCO.js +28 -1
- package/ds-apppicker/basic/DSAppPicker.basic.keyboard-nav.func.spec.js +18 -7
- package/ds-apppicker/closeAfterSelection/DSAppPicker.closeAfterSelection.func.spec.js +1 -1
- package/ds-apppicker/custom-trigger-focus/DSAppPicker.custom-trigger-focus.func.spec.js +82 -0
- package/ds-apppicker/label-expansion-dismissal/DSAppPicker.label-expansion-dismissal.visual.spec.js +108 -0
- package/ds-apppicker/reflow/DSAppPicker.reflow.visual.spec.js +5 -6
- package/ds-banner/DSBanner.text-resize.visual.spec.js +5 -2
- package/ds-banner/DSBannerCO.js +4 -0
- package/ds-card-v3/reflow/DSCardV3.reflow.visual.spec.js +2 -0
- package/ds-chip/label-expansion-dismissal/DSChip.label-expansion-dismissal.visual.spec.js +84 -0
- package/ds-dataviz/DSDataViz.axis.visual.spec.js +1 -2
- package/ds-dataviz/DSDataViz.ticks.visual.spec.js +1 -2
- package/ds-form-combobox-multi/aria-disabled/DSComboboxMulti.aria-disabled.visual.spec.js +4 -2
- package/ds-form-date-range-picker/DateRangePickerCO.js +6 -0
- package/ds-form-date-range-picker/picker-callbacks/DateRangePicker.picker-callbacks.func.spec.js +36 -0
- package/ds-global-header/GlobalHeaderCO.js +96 -2
- package/ds-global-header/app-picker-passthrough/GlobalHeader.app-picker-passthrough.func.spec.js +113 -0
- package/ds-global-header/popup-menu-focus/GlobalHeader.popup-menu-focus.func.spec.js +63 -0
- package/ds-global-header/popup-menu-slots/GlobalHeader.popup-menu-slots.func.spec.js +70 -0
- package/ds-global-header/search-toggle-slots/GlobalHeader.search-toggle-slots.func.spec.js +118 -0
- package/ds-global-header/toolbar-item-attributes/GlobalHeader.toolbar-item-attributes.func.spec.js +53 -0
- package/ds-grid/DSGridCO.js +20 -0
- package/ds-grid/layout-mode/DSGrid.layout-mode.func.spec.js +51 -0
- package/ds-grid/layout-mode/DSGrid.layout-mode.visual.spec.js +22 -0
- package/ds-hooks/DSHook.UseFontSizeMedia.visual.spec.js +5 -2
- package/ds-hooks/DSHookCO.js +55 -1
- package/ds-query-builder/DSQueryBuilder.visual.spec.js +6 -6
- package/package.json +149 -149
- package/paths.js +1 -0
|
@@ -18,6 +18,13 @@ export default class DSAppPickerCO extends PageObject {
|
|
|
18
18
|
|
|
19
19
|
static reflowURL = new Urlbuilder(`${PATH_E2E_APP_PICKER}`, 'reflow-test');
|
|
20
20
|
|
|
21
|
+
// PUI-18647 — the two custom-trigger APIs side by side. Storybook kebab-cases the
|
|
22
|
+
// `PUI18647CustomTriggers...` export with a hyphen after the prefix, hence `pui-18647`.
|
|
23
|
+
static customTriggerFocusURL = new Urlbuilder(
|
|
24
|
+
`${PATH_E2E_APP_PICKER}`,
|
|
25
|
+
'pui-18647-custom-triggers-focus-parity-with-deprecated',
|
|
26
|
+
);
|
|
27
|
+
|
|
21
28
|
// Snapshots
|
|
22
29
|
static snapshotPath(example = 'basic') {
|
|
23
30
|
return PageObject.getSnapshotPathBuilder('AppPicker', example);
|
|
@@ -126,8 +133,28 @@ export default class DSAppPickerCO extends PageObject {
|
|
|
126
133
|
return $$('[data-testid="ds-chip-label"]')[index];
|
|
127
134
|
}
|
|
128
135
|
|
|
136
|
+
// Selection is exposed as `aria-current="true"`, not `aria-selected`. The chips are `role="button"`,
|
|
137
|
+
// which does not support `aria-selected` — PUI-17213/PUI-17860 (#8260) swapped it for `aria-current`
|
|
138
|
+
// plus the "X of Y" position announcement, signed off with the A11y SME.
|
|
139
|
+
// The attribute is omitted (not `false`) when unselected, so `getAttribute` resolves to null: compare
|
|
140
|
+
// the value instead of calling a string method on it, so an unselected chip returns false rather than
|
|
141
|
+
// throwing.
|
|
129
142
|
static async isSelected(element) {
|
|
130
|
-
return (await element.getAttribute('aria-
|
|
143
|
+
return (await element.getAttribute('aria-current')) === 'true';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// PUI-18647 selectors
|
|
147
|
+
|
|
148
|
+
// The supported API: DSAppPicker hands the trigger renderer `innerRef` plus the internal handlers,
|
|
149
|
+
// so it can drive the first-app/selected-app focus logic on open.
|
|
150
|
+
static async getSupportedCustomTrigger() {
|
|
151
|
+
return $('[data-testid="pui18647-trigger-component"]');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// The deprecated API: `renderTrigger` receives only `ref`, so it cannot reach those handlers. It
|
|
155
|
+
// keeps its pre-existing behaviour by design — this is not a bug, it is the documented delta.
|
|
156
|
+
static async getDeprecatedCustomTrigger() {
|
|
157
|
+
return $('[data-testid="pui18647-render-trigger"]');
|
|
131
158
|
}
|
|
132
159
|
|
|
133
160
|
// Slots
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Key } from 'webdriverio';
|
|
2
2
|
import DSAppPickerCO from '../DSAppPickerCO';
|
|
3
3
|
|
|
4
|
-
if (
|
|
5
|
-
!browser.capabilities['ice:options'].isPhone &&
|
|
6
|
-
!browser.capabilities['ice:options'].isTablet &&
|
|
7
|
-
browser.capabilities.browserName !== 'Safari'
|
|
8
|
-
) {
|
|
4
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
9
5
|
describe('PUI-8030 - AppPicker:: Basic - keyboard nav func', () => {
|
|
10
6
|
before('loading page', async () => {
|
|
11
7
|
const errorOnGo = await DSAppPickerCO.basicURL.go();
|
|
@@ -34,12 +30,27 @@ if (
|
|
|
34
30
|
const appPickerChip = await DSAppPickerCO.getChipByIndex(1);
|
|
35
31
|
await expect(appPickerChip).toBeFocused();
|
|
36
32
|
});
|
|
37
|
-
|
|
33
|
+
// PUI-17950 made Escape the dismissal mechanism for a chip's expanded label, satisfying the
|
|
34
|
+
// "Dismissible" clause of WCAG 2.1 AA 1.4.13. Escape on an open panel is therefore two-stage
|
|
35
|
+
// whenever the focused chip's label truncates: the first press dismisses the expansion, only
|
|
36
|
+
// the second reaches the dialog. Chip 1 here truncates, so both presses are needed. The
|
|
37
|
+
// dismissal is conditional, not blanket — on a chip whose label fits, Escape still closes the
|
|
38
|
+
// panel in a single press, so this is not a rule that can be applied by rote to every spec.
|
|
39
|
+
it('05: should dismiss the expanded chip label and keep the menu open - Escape', async () => {
|
|
40
|
+
const appPickerChip = await DSAppPickerCO.getChipByIndex(1);
|
|
41
|
+
expect(await appPickerChip.getAttribute('data-expanded')).toEqual('true');
|
|
42
|
+
await browser.keys(Key.Escape);
|
|
43
|
+
const appPicker = await DSAppPickerCO.getAppPickerRoot();
|
|
44
|
+
await expect(appPicker).toBeDisplayedInViewport();
|
|
45
|
+
await expect(appPickerChip).toBeFocused();
|
|
46
|
+
expect(await appPickerChip.getAttribute('data-expanded')).not.toEqual('true');
|
|
47
|
+
});
|
|
48
|
+
it('06: should close the menu - Escape', async () => {
|
|
38
49
|
const openAppPickerBtn = await DSAppPickerCO.getOpenAppPicker();
|
|
39
50
|
await browser.keys(Key.Escape);
|
|
40
51
|
await expect(openAppPickerBtn).toBeFocused();
|
|
41
52
|
});
|
|
42
|
-
it('
|
|
53
|
+
it('07: should reopen the menu and focus the first enabled chip - Space', async () => {
|
|
43
54
|
await browser.keys(Key.Space);
|
|
44
55
|
const appPicker = await DSAppPickerCO.getAppPickerRoot();
|
|
45
56
|
const appPickerChip = await DSAppPickerCO.getChipByIndex(1);
|
|
@@ -20,7 +20,7 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
20
20
|
await expect(appPicker).not.toBeDisplayedInViewport();
|
|
21
21
|
await expect(triggerBtn).toBeFocused();
|
|
22
22
|
});
|
|
23
|
-
it('03: should
|
|
23
|
+
it('03: should reopen appPicker with the selected app still marked as current', async () => {
|
|
24
24
|
const openAppPickerBtn = await DSAppPickerCO.getOpenAppPicker();
|
|
25
25
|
await openAppPickerBtn.click();
|
|
26
26
|
const reportChip = await DSAppPickerCO.getChipByIndex(6);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAppPickerCO from '../DSAppPickerCO';
|
|
3
|
+
|
|
4
|
+
// Tests for the change introduced in PUI-18647 (GlobalHeader -> DSAppPicker contract passthrough).
|
|
5
|
+
// Widening the hand-off meant a consumer can finally supply a custom trigger, which exposed two
|
|
6
|
+
// different focus stories that now need pinning:
|
|
7
|
+
//
|
|
8
|
+
// - `TriggerComponent` (supported) receives `innerRef` AND the internal open handlers, so a keyboard
|
|
9
|
+
// open can run the selected-app focus logic and land on the selected chip.
|
|
10
|
+
// - `renderTrigger` (deprecated) receives only `ref`, so it cannot reach those handlers and falls
|
|
11
|
+
// back to focusing the panel on every path. Unchanged by design.
|
|
12
|
+
//
|
|
13
|
+
// The mouse path is the RE-BASELINE: a TriggerComponent picker opened with the mouse used to land on
|
|
14
|
+
// the FIRST app and now lands on the panel, matching the built-in trigger. Kept on the full browser
|
|
15
|
+
// matrix because pointer-driven focus is exactly where engines disagree.
|
|
16
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
17
|
+
describe('PUI-19014 - DSAppPicker:: custom trigger open focus destinations - Func', () => {
|
|
18
|
+
before('loading page', async () => {
|
|
19
|
+
const errorOnGo = await DSAppPickerCO.customTriggerFocusURL.go();
|
|
20
|
+
if (errorOnGo) throw errorOnGo;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('01: should focus the panel when the supported trigger is opened with the mouse', async () => {
|
|
24
|
+
const trigger = await DSAppPickerCO.getSupportedCustomTrigger();
|
|
25
|
+
await trigger.waitForDisplayed();
|
|
26
|
+
await trigger.click();
|
|
27
|
+
|
|
28
|
+
const panel = await DSAppPickerCO.getAppPickerRoot();
|
|
29
|
+
await panel.waitForDisplayed();
|
|
30
|
+
await expect(panel).toBeFocused();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('02: should focus the selected app when the supported trigger is opened with Enter', async () => {
|
|
34
|
+
// Escape closes the panel opened in 01 and returns focus to the trigger, which is also the
|
|
35
|
+
// starting state this case needs.
|
|
36
|
+
await browser.keys(Key.Escape);
|
|
37
|
+
const trigger = await DSAppPickerCO.getSupportedCustomTrigger();
|
|
38
|
+
await expect(trigger).toBeFocused();
|
|
39
|
+
|
|
40
|
+
await browser.keys(Key.Enter);
|
|
41
|
+
await (await DSAppPickerCO.getAppPickerRoot()).waitForDisplayed();
|
|
42
|
+
|
|
43
|
+
// 'Reports' is deliberately the third app, so "landed on the selected app" cannot be mistaken
|
|
44
|
+
// for "landed on the first app".
|
|
45
|
+
const selectedChip = await DSAppPickerCO.getChipByLabel('Reports');
|
|
46
|
+
await expect(selectedChip).toBeFocused();
|
|
47
|
+
await expect(await DSAppPickerCO.isSelected(selectedChip)).toBe(true);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('03: should focus the panel when the deprecated trigger is opened with the mouse', async () => {
|
|
51
|
+
await browser.keys(Key.Escape);
|
|
52
|
+
|
|
53
|
+
const trigger = await DSAppPickerCO.getDeprecatedCustomTrigger();
|
|
54
|
+
await trigger.waitForDisplayed();
|
|
55
|
+
await trigger.click();
|
|
56
|
+
|
|
57
|
+
const panel = await DSAppPickerCO.getAppPickerRoot();
|
|
58
|
+
await panel.waitForDisplayed();
|
|
59
|
+
await expect(panel).toBeFocused();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('04: should focus the panel when the deprecated trigger is opened with Enter', async () => {
|
|
63
|
+
// The panel 03 left open is controlled from the story and has no Escape handler, so it is
|
|
64
|
+
// dismissed by clicking its trigger again. Where a dismissal click leaves focus is NOT what
|
|
65
|
+
// this case is about and is not consistent across engines — clicking a <button> does not focus
|
|
66
|
+
// it on macOS, and the panel unmounting mid-click can blur. So the keyboard starting state is
|
|
67
|
+
// established explicitly instead of being inherited from the click.
|
|
68
|
+
const trigger = await DSAppPickerCO.getDeprecatedCustomTrigger();
|
|
69
|
+
await trigger.click();
|
|
70
|
+
await (await DSAppPickerCO.getAppPickerRoot()).waitForDisplayed({ reverse: true });
|
|
71
|
+
|
|
72
|
+
await browser.execute((el) => el.focus(), trigger);
|
|
73
|
+
await expect(trigger).toBeFocused();
|
|
74
|
+
|
|
75
|
+
await browser.keys(Key.Enter);
|
|
76
|
+
|
|
77
|
+
const panel = await DSAppPickerCO.getAppPickerRoot();
|
|
78
|
+
await panel.waitForDisplayed();
|
|
79
|
+
await expect(panel).toBeFocused();
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
package/ds-apppicker/label-expansion-dismissal/DSAppPicker.label-expansion-dismissal.visual.spec.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSAppPickerCO from '../DSAppPickerCO';
|
|
3
|
+
import { mouseOver } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
const PARKED_X = 10;
|
|
7
|
+
const PARKED_Y = 10;
|
|
8
|
+
|
|
9
|
+
// Enabled and long enough to truncate. Chip 1 of the apps list is used rather than the first one,
|
|
10
|
+
// which is natively disabled and tracked separately under PUI-18981.
|
|
11
|
+
const TRUNCATING_CHIP = 'Pipeline but with a really long label that will truncate';
|
|
12
|
+
|
|
13
|
+
const ARIA_DISABLED_CHIP = 'Dashboard but with a really long label that will truncate';
|
|
14
|
+
|
|
15
|
+
describe('PUI-18986 - DSAppPicker:: Escape dismisses the expanded chip label - Visual', () => {
|
|
16
|
+
before('loading page', async () => {
|
|
17
|
+
const errorOnGo = await DSAppPickerCO.basicURL.go();
|
|
18
|
+
if (errorOnGo) throw errorOnGo;
|
|
19
|
+
await browser.maximizeWindow();
|
|
20
|
+
await DSAppPickerCO.openPanel();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('01: truncated chip expands its label on hover', async () => {
|
|
24
|
+
await mouseOver(await DSAppPickerCO.getChipByLabel(TRUNCATING_CHIP));
|
|
25
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-hover-expanded'));
|
|
26
|
+
await expect(snapshot).toEqual(0);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('02: Escape collapses the hover-expanded label and keeps the panel open', async () => {
|
|
30
|
+
await browser.keys(Key.Escape);
|
|
31
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-hover-collapsed'));
|
|
32
|
+
await expect(snapshot).toEqual(0);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('03: label expands again once the pointer leaves and returns', async () => {
|
|
36
|
+
await mouseOver(null, PARKED_X, PARKED_Y);
|
|
37
|
+
await mouseOver(await DSAppPickerCO.getChipByLabel(TRUNCATING_CHIP));
|
|
38
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-rehover-expanded'));
|
|
39
|
+
await expect(snapshot).toEqual(0);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('04: truncated chip expands its label on focus alone', async () => {
|
|
43
|
+
await mouseOver(null, PARKED_X, PARKED_Y);
|
|
44
|
+
await browser.keys(Key.Tab);
|
|
45
|
+
await expect(await DSAppPickerCO.getChipByLabel(TRUNCATING_CHIP)).toBeFocused();
|
|
46
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-focus-expanded'));
|
|
47
|
+
await expect(snapshot).toEqual(0);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('05: Escape collapses the focus-expanded label without moving focus', async () => {
|
|
51
|
+
await browser.keys(Key.Escape);
|
|
52
|
+
await expect(await DSAppPickerCO.getChipByLabel(TRUNCATING_CHIP)).toBeFocused();
|
|
53
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-focus-collapsed'));
|
|
54
|
+
await expect(snapshot).toEqual(0);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('06: a further Escape closes the panel once the label is collapsed', async () => {
|
|
58
|
+
await browser.keys(Key.Escape);
|
|
59
|
+
await (await DSAppPickerCO.getAppPickerRoot()).waitForDisplayed({ reverse: true });
|
|
60
|
+
const snapshot = await browser.percyCheckScreenshot(DSAppPickerCO.snapshotPath('esc-dismiss-panel-closed'));
|
|
61
|
+
await expect(snapshot).toEqual(0);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('PUI-18987 - DSAppPicker:: Escape dismisses the expanded aria-disabled chip label - Visual', () => {
|
|
66
|
+
before('loading page', async () => {
|
|
67
|
+
const errorOnGo = await DSAppPickerCO.applyAriaDisabledURL.go();
|
|
68
|
+
if (errorOnGo) throw errorOnGo;
|
|
69
|
+
await browser.maximizeWindow();
|
|
70
|
+
await DSAppPickerCO.openPanel();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('01: aria-disabled truncated chip expands its label on hover', async () => {
|
|
74
|
+
await mouseOver(await DSAppPickerCO.getChipByLabel(ARIA_DISABLED_CHIP));
|
|
75
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
76
|
+
DSAppPickerCO.snapshotPath('aria-disabled-esc-dismiss-hover-expanded'),
|
|
77
|
+
);
|
|
78
|
+
await expect(snapshot).toEqual(0);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('02: Escape collapses the hover-expanded label and keeps the panel open', async () => {
|
|
82
|
+
await browser.keys(Key.Escape);
|
|
83
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
84
|
+
DSAppPickerCO.snapshotPath('aria-disabled-esc-dismiss-hover-collapsed'),
|
|
85
|
+
);
|
|
86
|
+
await expect(snapshot).toEqual(0);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('03: aria-disabled truncated chip expands its label on keyboard focus', async () => {
|
|
90
|
+
await mouseOver(null, PARKED_X, PARKED_Y);
|
|
91
|
+
await browser.keys(Key.Tab);
|
|
92
|
+
await expect(await DSAppPickerCO.getChipByLabel(ARIA_DISABLED_CHIP)).toBeFocused();
|
|
93
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
94
|
+
DSAppPickerCO.snapshotPath('aria-disabled-esc-dismiss-focus-expanded'),
|
|
95
|
+
);
|
|
96
|
+
await expect(snapshot).toEqual(0);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it('04: Escape collapses the focus-expanded label without moving focus', async () => {
|
|
100
|
+
await browser.keys(Key.Escape);
|
|
101
|
+
await expect(await DSAppPickerCO.getChipByLabel(ARIA_DISABLED_CHIP)).toBeFocused();
|
|
102
|
+
const snapshot = await browser.percyCheckScreenshot(
|
|
103
|
+
DSAppPickerCO.snapshotPath('aria-disabled-esc-dismiss-focus-collapsed'),
|
|
104
|
+
);
|
|
105
|
+
await expect(snapshot).toEqual(0);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/* eslint-disable wdio/no-pause */
|
|
2
2
|
import DSAppPickerCO from '../DSAppPickerCO';
|
|
3
|
+
import { setTextSize } from '../../helpers';
|
|
3
4
|
|
|
4
5
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
5
6
|
describe('PUI-17867 - AppPicker:: Reflow test -visual', () => {
|
|
6
7
|
before('loading page', async () => {
|
|
7
8
|
const errorOnGo = await DSAppPickerCO.reflowURL.go();
|
|
8
9
|
if (errorOnGo) throw errorOnGo;
|
|
9
|
-
await
|
|
10
|
+
await setTextSize('26');
|
|
10
11
|
});
|
|
11
12
|
|
|
12
13
|
it('01: should show appPicker open', async () => {
|
|
13
14
|
const openAppPickerBtn = await DSAppPickerCO.getOpenAppPicker();
|
|
14
15
|
await openAppPickerBtn.click();
|
|
15
|
-
const snapshot = await browser.percyCheckScreenshot(
|
|
16
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
16
17
|
await expect(snapshot).toEqual(0);
|
|
17
18
|
});
|
|
18
19
|
|
|
@@ -20,16 +21,14 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
20
21
|
const secondPipelineChip = await DSAppPickerCO.getChipByLabelAndIndex('Pipeline', 1);
|
|
21
22
|
await secondPipelineChip.scrollIntoView();
|
|
22
23
|
await browser.pause(300);
|
|
23
|
-
const snapshot = await browser.percyCheckScreenshot(
|
|
24
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
24
25
|
await expect(snapshot).toEqual(0);
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
it('03: should select the 2nd Pipeline chip', async () => {
|
|
28
29
|
const secondPipelineChip = await DSAppPickerCO.getChipByLabelAndIndex('Pipeline', 1);
|
|
29
30
|
await secondPipelineChip.click();
|
|
30
|
-
const snapshot = await browser.percyCheckScreenshot(
|
|
31
|
-
DSAppPickerCO.snapshotPath('reflow-appPicker-pipeline-selected'),
|
|
32
|
-
);
|
|
31
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
33
32
|
await expect(snapshot).toEqual(0);
|
|
34
33
|
});
|
|
35
34
|
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import DSBannerCO from './DSBannerCO';
|
|
2
|
+
import { setTextSize } from '../helpers';
|
|
2
3
|
|
|
3
4
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
5
|
describe('PUI-17535 - DSBanner - Text Resize In Different Layouts - Visual Test', () => {
|
|
5
6
|
before('loading page', async () => {
|
|
6
7
|
const errorOnGo = await DSBannerCO.textResizeInDifferentLayoutsTest.go();
|
|
7
8
|
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
await setTextSize('26');
|
|
8
10
|
});
|
|
9
11
|
it('01: should display text resize in different layouts properly', async () => {
|
|
10
|
-
await
|
|
11
|
-
|
|
12
|
+
const banner = await DSBannerCO.getBannerByIndex();
|
|
13
|
+
await banner.waitForDisplayed();
|
|
14
|
+
const snapshot = await browser.percyCheckScreenshot();
|
|
12
15
|
await expect(snapshot).toEqual(0);
|
|
13
16
|
});
|
|
14
17
|
});
|
package/ds-banner/DSBannerCO.js
CHANGED
|
@@ -62,6 +62,10 @@ export default class DSBannerCO extends PageObject {
|
|
|
62
62
|
return $('[data-testid="ds-banner"');
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
static async getBannerByIndex(index = 0) {
|
|
66
|
+
return $$('[data-testid="ds-banner"]')[index];
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
static async getBannerContainer() {
|
|
66
70
|
return $('[data-testid="ds-banner-container"]');
|
|
67
71
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import DSCardV3CO from '../DSCardV3CO';
|
|
2
|
+
import { setTextSize } from '../../helpers';
|
|
2
3
|
|
|
3
4
|
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
4
5
|
describe('PUI-13981 - CardV3: Reflow -Visual Test', () => {
|
|
5
6
|
before('loading page', async () => {
|
|
6
7
|
const errorOnGo = await DSCardV3CO.reflowURL.go();
|
|
7
8
|
if (errorOnGo) throw errorOnGo;
|
|
9
|
+
await setTextSize('26');
|
|
8
10
|
});
|
|
9
11
|
it('01: should display cards after a 200% of text resize', async () => {
|
|
10
12
|
const expandContentButton = await DSCardV3CO.getExpandContentButton();
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DSChipCO from '../DSChipCO';
|
|
3
|
+
import { mouseOver } from '../../helpers';
|
|
4
|
+
|
|
5
|
+
if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:options'].isTablet) {
|
|
6
|
+
const PARKED_X = 10;
|
|
7
|
+
const PARKED_Y = 10;
|
|
8
|
+
|
|
9
|
+
// Indexes into the basic-test story grid:
|
|
10
|
+
// 0 Large | 1 Small | 2 Selected | 3 Truncated with large label | 4 Disabled | 5 wrapText with large label
|
|
11
|
+
const TRUNCATING_CHIP = 3;
|
|
12
|
+
const WRAP_TEXT_CHIP = 5;
|
|
13
|
+
|
|
14
|
+
// DSChipCO deliberately has no label lookup, so the tab target is reached by walking the tab order.
|
|
15
|
+
// The natively disabled chip drops out of it on its own, which keeps this independent of the story's
|
|
16
|
+
// exact number of focus stops.
|
|
17
|
+
const MAX_TAB_STOPS = 12;
|
|
18
|
+
const tabUntilFocused = async (index) => {
|
|
19
|
+
const target = await DSChipCO.getChipButtonByIndex(index);
|
|
20
|
+
for (let i = 0; i < MAX_TAB_STOPS; i += 1) {
|
|
21
|
+
// eslint-disable-next-line no-await-in-loop
|
|
22
|
+
if (await target.isFocused()) return target;
|
|
23
|
+
// eslint-disable-next-line no-await-in-loop
|
|
24
|
+
await browser.keys(Key.Tab);
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`chip ${index} never took focus within ${MAX_TAB_STOPS} tab stops`);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
describe('PUI-19009 - DSChip:: Escape dismisses the expanded truncated chip label - Visual', () => {
|
|
30
|
+
before('loading page', async () => {
|
|
31
|
+
const errorOnGo = await DSChipCO.basicURL.go();
|
|
32
|
+
if (errorOnGo) throw errorOnGo;
|
|
33
|
+
await browser.maximizeWindow();
|
|
34
|
+
await (await DSChipCO.getChipByIndex(TRUNCATING_CHIP)).waitForDisplayed();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('01: truncated chip expands its label on hover', async () => {
|
|
38
|
+
await mouseOver(await DSChipCO.getChipByIndex(TRUNCATING_CHIP));
|
|
39
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-hover-expanded'));
|
|
40
|
+
await expect(snapshot).toEqual(0);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('02: Escape collapses the hover-expanded label without moving the pointer', async () => {
|
|
44
|
+
await browser.keys(Key.Escape);
|
|
45
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-hover-collapsed'));
|
|
46
|
+
await expect(snapshot).toEqual(0);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('03: label stays collapsed while the pointer remains on the chip', async () => {
|
|
50
|
+
await mouseOver(await DSChipCO.getChipByIndex(TRUNCATING_CHIP), 12, 12);
|
|
51
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-hover-still-collapsed'));
|
|
52
|
+
await expect(snapshot).toEqual(0);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('04: label expands again once the pointer leaves and returns', async () => {
|
|
56
|
+
await mouseOver(null, PARKED_X, PARKED_Y);
|
|
57
|
+
await mouseOver(await DSChipCO.getChipByIndex(TRUNCATING_CHIP));
|
|
58
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-rehover-expanded'));
|
|
59
|
+
await expect(snapshot).toEqual(0);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('05: truncated chip expands its label on focus alone', async () => {
|
|
63
|
+
await mouseOver(null, PARKED_X, PARKED_Y);
|
|
64
|
+
const chipButton = await tabUntilFocused(TRUNCATING_CHIP);
|
|
65
|
+
await expect(chipButton).toBeFocused();
|
|
66
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-focus-expanded'));
|
|
67
|
+
await expect(snapshot).toEqual(0);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('06: Escape collapses the focus-expanded label without moving focus', async () => {
|
|
71
|
+
await browser.keys(Key.Escape);
|
|
72
|
+
await expect(await DSChipCO.getChipButtonByIndex(TRUNCATING_CHIP)).toBeFocused();
|
|
73
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-focus-collapsed'));
|
|
74
|
+
await expect(snapshot).toEqual(0);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('07: a wrapText chip never expands, so Escape leaves it untouched', async () => {
|
|
78
|
+
await mouseOver(await DSChipCO.getChipByIndex(WRAP_TEXT_CHIP));
|
|
79
|
+
await browser.keys(Key.Escape);
|
|
80
|
+
const snapshot = await browser.percyCheckScreenshot(DSChipCO.snapshotPath('esc-dismiss-wrap-text-unchanged'));
|
|
81
|
+
await expect(snapshot).toEqual(0);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
@@ -65,8 +65,7 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
65
65
|
|
|
66
66
|
// fails on firefox due to fake-positive of infinte loop
|
|
67
67
|
if (browser.capabilities.browserName !== 'Firefox') {
|
|
68
|
-
|
|
69
|
-
describe.skip('PUI-9401 - DSDataViz, TimeLinear axis -Visual', () => {
|
|
68
|
+
describe('PUI-9401 - DSDataViz, TimeLinear axis -Visual', () => {
|
|
70
69
|
before('loading page', async () => {
|
|
71
70
|
const errorOnGo = await DSDataVizCO.timeLinearAxis.go();
|
|
72
71
|
if (errorOnGo) throw errorOnGo;
|
|
@@ -62,8 +62,7 @@ if (!browser.capabilities['ice:options'].isPhone) {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
describe.skip('PUI-10321 - DSDataViz, Force ticks -Visual', () => {
|
|
65
|
+
describe('PUI-10321 - DSDataViz, Force ticks -Visual', () => {
|
|
67
66
|
before('loading page', async () => {
|
|
68
67
|
const errorOnGo = await DSDataVizCO.forceTicks.go();
|
|
69
68
|
if (errorOnGo) throw errorOnGo;
|
|
@@ -11,8 +11,10 @@ if (!browser.capabilities['ice:options'].isPhone && !browser.capabilities['ice:o
|
|
|
11
11
|
});
|
|
12
12
|
it('01: The first aria-disabled combobox should be focused', async () => {
|
|
13
13
|
await browser.eyesOpen();
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// the container centre lands on the aria-hidden overlay input, which never focuses the
|
|
15
|
+
// combobox; the selected-values area is the only pointer target that reliably focuses it
|
|
16
|
+
const firstComboboxValues = await DSComboboxMultiCO.getSelectedValuesByIndex(0);
|
|
17
|
+
await firstComboboxValues.click();
|
|
16
18
|
const snapshot = await browser.eyesCheckSnapshot(
|
|
17
19
|
DSComboboxMultiCO.snapshotPath('combobox-multi-aria-disabled-click'),
|
|
18
20
|
);
|
|
@@ -30,6 +30,8 @@ export default class DateRangePickerCO extends PageObject {
|
|
|
30
30
|
'apply-aria-disabled-invalid-selection-test',
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
static pickerCallbacks = new Urlbuilder(PATH_E2E_CONTROLLED_FORM_DATE_RANGE_PICKER, 'picker-callbacks-test');
|
|
34
|
+
|
|
33
35
|
// Story elements
|
|
34
36
|
|
|
35
37
|
static getNextMonthBtn = async () => $('[data-testid="ds-controlled-date-time-picker-calendar-next-month"]');
|
|
@@ -68,6 +70,10 @@ export default class DateRangePickerCO extends PageObject {
|
|
|
68
70
|
static getClearableByIndex = async (index = 0) =>
|
|
69
71
|
$$(`[data-testid="ds-controlled-date-time-picker-clear-btn"]`)[index];
|
|
70
72
|
|
|
73
|
+
static getOpenCallbackCount = async () => $('[data-testid="picker-open-count"]');
|
|
74
|
+
|
|
75
|
+
static getCloseCallbackCount = async () => $('[data-testid="picker-close-count"]');
|
|
76
|
+
|
|
71
77
|
// TimeInput
|
|
72
78
|
static getHourInput = async () => $('[data-testid="ds-controlled-date-time-picker-hour-input"]');
|
|
73
79
|
|
package/ds-form-date-range-picker/picker-callbacks/DateRangePicker.picker-callbacks.func.spec.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Key } from 'webdriverio';
|
|
2
|
+
import DateRangePickerCO from '../DateRangePickerCO';
|
|
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
|
+
// Tests for the fix introduced in PUI-18907 (forward picker open and close callbacks).
|
|
11
|
+
describe('PUI-19082 - DSControlledDateRangePicker:: picker open and close callbacks - Func', () => {
|
|
12
|
+
before('loading page', async () => {
|
|
13
|
+
const errorOnGo = await DateRangePickerCO.pickerCallbacks.go();
|
|
14
|
+
if (errorOnGo) throw errorOnGo;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('01: should invoke onPickerOpen when the calendar opens', async () => {
|
|
18
|
+
const calendarTrigger = await DateRangePickerCO.getPickerBtn();
|
|
19
|
+
const openCallbackCount = await DateRangePickerCO.getOpenCallbackCount();
|
|
20
|
+
|
|
21
|
+
await expect(openCallbackCount).toHaveText('0');
|
|
22
|
+
await calendarTrigger.click();
|
|
23
|
+
await expect(await DateRangePickerCO.getCalendarDialog()).toBeDisplayedInViewport();
|
|
24
|
+
await expect(openCallbackCount).toHaveText('1');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('02: should invoke onPickerClose when the calendar closes', async () => {
|
|
28
|
+
const closeCallbackCount = await DateRangePickerCO.getCloseCallbackCount();
|
|
29
|
+
|
|
30
|
+
await expect(closeCallbackCount).toHaveText('0');
|
|
31
|
+
await browser.keys(Key.Escape);
|
|
32
|
+
await expect(await DateRangePickerCO.getCalendarDialog()).not.toBeDisplayedInViewport();
|
|
33
|
+
await expect(closeCallbackCount).toHaveText('1');
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|