@spectrum-web-components/sidenav 0.13.0-devmode.0 → 0.13.0
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/package.json +5 -5
- package/sp-sidenav-heading.js +1 -2
- package/sp-sidenav-heading.js.map +1 -1
- package/sp-sidenav-item.js +1 -2
- package/sp-sidenav-item.js.map +1 -1
- package/sp-sidenav.js +1 -2
- package/sp-sidenav.js.map +1 -1
- package/src/Sidenav.js +2 -132
- package/src/Sidenav.js.map +1 -1
- package/src/SidenavHeading.js +2 -40
- package/src/SidenavHeading.js.map +1 -1
- package/src/SidenavItem.js +9 -136
- package/src/SidenavItem.js.map +1 -1
- package/src/index.js +1 -3
- package/src/index.js.map +1 -1
- package/src/sidenav-heading.css.js +2 -4
- package/src/sidenav-heading.css.js.map +1 -1
- package/src/sidenav-item.css.js +2 -4
- package/src/sidenav-item.css.js.map +1 -1
- package/src/sidenav.css.js +2 -4
- package/src/sidenav.css.js.map +1 -1
- package/src/spectrum-sidenav-heading.css.js +2 -4
- package/src/spectrum-sidenav-heading.css.js.map +1 -1
- package/src/spectrum-sidenav-item.css.js +2 -4
- package/src/spectrum-sidenav-item.css.js.map +1 -1
- package/src/spectrum-sidenav.css.js +2 -4
- package/src/spectrum-sidenav.css.js.map +1 -1
- package/stories/sidenav.stories.js +8 -40
- package/stories/sidenav.stories.js.map +1 -1
- package/test/benchmark/test-basic.js +1 -6
- package/test/benchmark/test-basic.js.map +1 -1
- package/test/sidenav-item.test.js +5 -53
- package/test/sidenav-item.test.js.map +1 -1
- package/test/sidenav.test-vrt.js +1 -3
- package/test/sidenav.test-vrt.js.map +1 -1
- package/test/sidenav.test.js +13 -282
- package/test/sidenav.test.js.map +1 -1
package/test/sidenav.test.js
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "@spectrum-web-components/sidenav/sp-sidenav-item.js";
|
|
3
|
-
import "@spectrum-web-components/sidenav/sp-sidenav-heading.js";
|
|
4
|
-
import { SideNavItem } from "@spectrum-web-components/sidenav";
|
|
5
|
-
import { manageTabIndex } from "../stories/sidenav.stories.js";
|
|
6
|
-
import {
|
|
7
|
-
arrowDownEvent,
|
|
8
|
-
arrowUpEvent,
|
|
9
|
-
shiftTabEvent
|
|
10
|
-
} from "../../../test/testing-helpers.js";
|
|
11
|
-
import {
|
|
12
|
-
elementUpdated,
|
|
13
|
-
expect,
|
|
14
|
-
fixture,
|
|
15
|
-
html,
|
|
16
|
-
waitUntil
|
|
17
|
-
} from "@open-wc/testing";
|
|
18
|
-
import { LitElement } from "@spectrum-web-components/base";
|
|
19
|
-
import { spy } from "sinon";
|
|
20
|
-
import { sendMouse } from "../../../test/plugins/browser.js";
|
|
21
|
-
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
22
|
-
describe("Sidenav", () => {
|
|
23
|
-
testForLitDevWarnings(async () => await fixture(html`
|
|
1
|
+
import"@spectrum-web-components/sidenav/sp-sidenav.js";import"@spectrum-web-components/sidenav/sp-sidenav-item.js";import"@spectrum-web-components/sidenav/sp-sidenav-heading.js";import{SideNavItem as u}from"@spectrum-web-components/sidenav";import{manageTabIndex as v}from"../stories/sidenav.stories.js";import{arrowDownEvent as l,arrowUpEvent as S,shiftTabEvent as m}from"../../../test/testing-helpers.js";import{elementUpdated as i,expect as t,fixture as o,html as d,waitUntil as r}from"@open-wc/testing";import{LitElement as f}from"@spectrum-web-components/base";import{spy as p}from"sinon";import{sendMouse as b}from"../../../test/plugins/browser.js";import{testForLitDevWarnings as h}from"../../../test/testing-helpers.js";describe("Sidenav",()=>{h(async()=>await o(d`
|
|
24
2
|
<sp-sidenav>
|
|
25
3
|
<sp-sidenav-heading label="CATEGORY 1">
|
|
26
4
|
<sp-sidenav-item
|
|
@@ -33,9 +11,7 @@ describe("Sidenav", () => {
|
|
|
33
11
|
></sp-sidenav-item>
|
|
34
12
|
</sp-sidenav-heading>
|
|
35
13
|
</sp-sidenav>
|
|
36
|
-
`))
|
|
37
|
-
it("loads", async () => {
|
|
38
|
-
const el = await fixture(html`
|
|
14
|
+
`)),it("loads",async()=>{const e=await o(d`
|
|
39
15
|
<sp-sidenav>
|
|
40
16
|
<sp-sidenav-heading label="CATEGORY 1">
|
|
41
17
|
<sp-sidenav-item
|
|
@@ -48,49 +24,16 @@ describe("Sidenav", () => {
|
|
|
48
24
|
></sp-sidenav-item>
|
|
49
25
|
</sp-sidenav-heading>
|
|
50
26
|
</sp-sidenav>
|
|
51
|
-
`);
|
|
52
|
-
await elementUpdated(el);
|
|
53
|
-
await expect(el).to.be.accessible();
|
|
54
|
-
});
|
|
55
|
-
it("does not accept focus/click/blur when empty", async () => {
|
|
56
|
-
const el = await fixture(html`
|
|
27
|
+
`);await i(e),await t(e).to.be.accessible()}),it("does not accept focus/click/blur when empty",async()=>{const e=await o(d`
|
|
57
28
|
<sp-sidenav></sp-sidenav>
|
|
58
|
-
`);
|
|
59
|
-
await elementUpdated(el);
|
|
60
|
-
expect(document.activeElement === el).to.be.false;
|
|
61
|
-
el.focus();
|
|
62
|
-
await elementUpdated(el);
|
|
63
|
-
expect(document.activeElement === el).to.be.false;
|
|
64
|
-
el.blur();
|
|
65
|
-
await elementUpdated(el);
|
|
66
|
-
expect(document.activeElement === el).to.be.false;
|
|
67
|
-
el.click();
|
|
68
|
-
await elementUpdated(el);
|
|
69
|
-
expect(document.activeElement === el).to.be.false;
|
|
70
|
-
});
|
|
71
|
-
it("does not accept keyboard events when items are not present", async () => {
|
|
72
|
-
const errorSpy = spy();
|
|
73
|
-
const el = await fixture(html`
|
|
29
|
+
`);await i(e),t(document.activeElement===e).to.be.false,e.focus(),await i(e),t(document.activeElement===e).to.be.false,e.blur(),await i(e),t(document.activeElement===e).to.be.false,e.click(),await i(e),t(document.activeElement===e).to.be.false}),it("does not accept keyboard events when items are not present",async()=>{const e=p(),a=await o(d`
|
|
74
30
|
<sp-sidenav>
|
|
75
31
|
<sp-sidenav-item
|
|
76
32
|
value="Section 1"
|
|
77
33
|
label="Section 1"
|
|
78
34
|
></sp-sidenav-item>
|
|
79
35
|
</sp-sidenav>
|
|
80
|
-
`);
|
|
81
|
-
await elementUpdated(el);
|
|
82
|
-
const item = el.querySelector("sp-sidenav-item");
|
|
83
|
-
window.addEventListener("error", () => errorSpy());
|
|
84
|
-
el.dispatchEvent(new FocusEvent("focusin"));
|
|
85
|
-
item.remove();
|
|
86
|
-
await elementUpdated(el);
|
|
87
|
-
el.dispatchEvent(new KeyboardEvent("keydown", {
|
|
88
|
-
code: "ArrowDown"
|
|
89
|
-
}));
|
|
90
|
-
expect(errorSpy.callCount).to.equal(0);
|
|
91
|
-
});
|
|
92
|
-
it("does not accept focus when all children [disabled]", async () => {
|
|
93
|
-
const el = await fixture(html`
|
|
36
|
+
`);await i(a);const s=a.querySelector("sp-sidenav-item");window.addEventListener("error",()=>e()),a.dispatchEvent(new FocusEvent("focusin")),s.remove(),await i(a),a.dispatchEvent(new KeyboardEvent("keydown",{code:"ArrowDown"})),t(e.callCount).to.equal(0)}),it("does not accept focus when all children [disabled]",async()=>{const e=await o(d`
|
|
94
37
|
<sp-sidenav>
|
|
95
38
|
<sp-sidenav-item
|
|
96
39
|
disabled
|
|
@@ -103,16 +46,7 @@ describe("Sidenav", () => {
|
|
|
103
46
|
label="Section 2"
|
|
104
47
|
></sp-sidenav-item>
|
|
105
48
|
</sp-sidenav>
|
|
106
|
-
`);
|
|
107
|
-
await elementUpdated(el);
|
|
108
|
-
expect(document.activeElement === el).to.be.false;
|
|
109
|
-
el.focus();
|
|
110
|
-
await elementUpdated(el);
|
|
111
|
-
expect(document.activeElement === el).to.be.false;
|
|
112
|
-
expect(el.matches(":focus-within")).to.be.false;
|
|
113
|
-
});
|
|
114
|
-
it("sets manageTabIndex on new children", async () => {
|
|
115
|
-
const el = await fixture(html`
|
|
49
|
+
`);await i(e),t(document.activeElement===e).to.be.false,e.focus(),await i(e),t(document.activeElement===e).to.be.false,t(e.matches(":focus-within")).to.be.false}),it("sets manageTabIndex on new children",async()=>{const e=await o(d`
|
|
116
50
|
<sp-sidenav>
|
|
117
51
|
<sp-sidenav-item
|
|
118
52
|
value="Section 1"
|
|
@@ -123,29 +57,8 @@ describe("Sidenav", () => {
|
|
|
123
57
|
label="Section 2"
|
|
124
58
|
></sp-sidenav-item>
|
|
125
59
|
</sp-sidenav>
|
|
126
|
-
`);
|
|
127
|
-
|
|
128
|
-
expect(el.manageTabIndex).to.be.false;
|
|
129
|
-
const item1 = el.querySelector("sp-sidenav-item");
|
|
130
|
-
expect(item1.tabIndex).to.equal(0);
|
|
131
|
-
const newItem = document.createElement("sp-sidenav-item");
|
|
132
|
-
newItem.value = "Section 3";
|
|
133
|
-
newItem.label = "Section 3";
|
|
134
|
-
el.appendChild(newItem);
|
|
135
|
-
await elementUpdated(newItem);
|
|
136
|
-
expect(newItem.tabIndex).to.equal(0);
|
|
137
|
-
el.focus();
|
|
138
|
-
const focused = document.activeElement;
|
|
139
|
-
focused.click();
|
|
140
|
-
expect(focused.selected).to.be.true;
|
|
141
|
-
el.dispatchEvent(shiftTabEvent());
|
|
142
|
-
const outsideFocused = document.activeElement;
|
|
143
|
-
expect(typeof outsideFocused).not.to.equal(SideNavItem);
|
|
144
|
-
});
|
|
145
|
-
it("handles select", async () => {
|
|
146
|
-
const changeSpy = spy();
|
|
147
|
-
const el = await fixture(html`
|
|
148
|
-
<sp-sidenav @change=${() => changeSpy()}>
|
|
60
|
+
`);await i(e),t(e.manageTabIndex).to.be.false;const a=e.querySelector("sp-sidenav-item");t(a.tabIndex).to.equal(0);const s=document.createElement("sp-sidenav-item");s.value="Section 3",s.label="Section 3",e.appendChild(s),await i(s),t(s.tabIndex).to.equal(0),e.focus();const n=document.activeElement;n.click(),t(n.selected).to.be.true,e.dispatchEvent(m());const c=document.activeElement;t(typeof c).not.to.equal(u)}),it("handles select",async()=>{const e=p(),a=await o(d`
|
|
61
|
+
<sp-sidenav @change=${()=>e()}>
|
|
149
62
|
<sp-sidenav-heading label="CATEGORY 1">
|
|
150
63
|
<sp-sidenav-item
|
|
151
64
|
value="Section 1"
|
|
@@ -159,35 +72,9 @@ describe("Sidenav", () => {
|
|
|
159
72
|
</sp-sidenav-item>
|
|
160
73
|
</sp-sidenav-heading>
|
|
161
74
|
</sp-sidenav>
|
|
162
|
-
`);
|
|
163
|
-
await elementUpdated(el);
|
|
164
|
-
expect(el.value).to.be.undefined;
|
|
165
|
-
const sidenavItem = el.querySelector('[value="Section 2"]');
|
|
166
|
-
sidenavItem.dispatchEvent(new CustomEvent("sidenav-select", {
|
|
167
|
-
bubbles: true,
|
|
168
|
-
detail: {
|
|
169
|
-
value: "Section 2"
|
|
170
|
-
}
|
|
171
|
-
}));
|
|
172
|
-
await elementUpdated(el);
|
|
173
|
-
expect(el.value).to.equal("Section 2");
|
|
174
|
-
expect(changeSpy.callCount).to.equal(1);
|
|
175
|
-
sidenavItem.click();
|
|
176
|
-
await elementUpdated(sidenavItem);
|
|
177
|
-
const sidenavItemChild = el.querySelector('[value="Section 2a"]');
|
|
178
|
-
sidenavItemChild.click();
|
|
179
|
-
await elementUpdated(el);
|
|
180
|
-
expect(el.value).to.equal("Section 2a");
|
|
181
|
-
expect(changeSpy.callCount).to.equal(2);
|
|
182
|
-
});
|
|
183
|
-
it("prevents selection", async () => {
|
|
184
|
-
const changeSpy = spy();
|
|
185
|
-
const el = await fixture(html`
|
|
75
|
+
`);await i(a),t(a.value).to.be.undefined;const s=a.querySelector('[value="Section 2"]');s.dispatchEvent(new CustomEvent("sidenav-select",{bubbles:!0,detail:{value:"Section 2"}})),await i(a),t(a.value).to.equal("Section 2"),t(e.callCount).to.equal(1),s.click(),await i(s),a.querySelector('[value="Section 2a"]').click(),await i(a),t(a.value).to.equal("Section 2a"),t(e.callCount).to.equal(2)}),it("prevents selection",async()=>{const e=p(),a=await o(d`
|
|
186
76
|
<sp-sidenav
|
|
187
|
-
@change=${(
|
|
188
|
-
event.preventDefault();
|
|
189
|
-
changeSpy();
|
|
190
|
-
}}
|
|
77
|
+
@change=${s=>{s.preventDefault(),e()}}
|
|
191
78
|
>
|
|
192
79
|
<sp-sidenav-heading label="CATEGORY 1">
|
|
193
80
|
<sp-sidenav-item
|
|
@@ -206,147 +93,9 @@ describe("Sidenav", () => {
|
|
|
206
93
|
</sp-sidenav-item>
|
|
207
94
|
</sp-sidenav-heading>
|
|
208
95
|
</sp-sidenav>
|
|
209
|
-
`);
|
|
210
|
-
await elementUpdated(el);
|
|
211
|
-
expect(el.value).to.be.undefined;
|
|
212
|
-
el.click();
|
|
213
|
-
await elementUpdated(el);
|
|
214
|
-
expect(el.value).to.be.undefined;
|
|
215
|
-
expect(changeSpy.callCount).to.equal(1);
|
|
216
|
-
});
|
|
217
|
-
it("prevents [tabindex=0] while `focusin`", async () => {
|
|
218
|
-
const el = await fixture(manageTabIndex());
|
|
219
|
-
const selected = el.querySelector('[value="Section 1"]');
|
|
220
|
-
const toBeSelected = el.querySelector('[value="Section 0"]');
|
|
221
|
-
await elementUpdated(el);
|
|
222
|
-
await waitUntil(() => el.value === "Section 1", "wait for selection");
|
|
223
|
-
expect(el.value).to.equal("Section 1");
|
|
224
|
-
expect(selected.tabIndex, "initially 0").to.equal(0);
|
|
225
|
-
expect(toBeSelected.tabIndex, "initially -1").to.equal(-1);
|
|
226
|
-
el.focus();
|
|
227
|
-
await elementUpdated(el);
|
|
228
|
-
expect(el.value).to.equal("Section 1");
|
|
229
|
-
expect(selected.tabIndex, "-1 when focusin").to.equal(-1);
|
|
230
|
-
el.blur();
|
|
231
|
-
await elementUpdated(el);
|
|
232
|
-
expect(el.value).to.equal("Section 1");
|
|
233
|
-
expect(selected.tabIndex, "0 when blur").to.equal(0);
|
|
234
|
-
const bindingRect = toBeSelected.getBoundingClientRect();
|
|
235
|
-
await sendMouse({
|
|
236
|
-
steps: [
|
|
237
|
-
{
|
|
238
|
-
type: "click",
|
|
239
|
-
position: [
|
|
240
|
-
bindingRect.x + bindingRect.width / 2,
|
|
241
|
-
bindingRect.y + bindingRect.height / 2
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
]
|
|
245
|
-
});
|
|
246
|
-
await elementUpdated(el);
|
|
247
|
-
expect(el.value).to.equal("Section 0");
|
|
248
|
-
expect(toBeSelected.tabIndex, "will be new focusable child").to.equal(-1);
|
|
249
|
-
expect(selected.tabIndex, "no longer selected").to.equal(-1);
|
|
250
|
-
});
|
|
251
|
-
it("manage tab index", async () => {
|
|
252
|
-
const el = await fixture(manageTabIndex());
|
|
253
|
-
await elementUpdated(el);
|
|
254
|
-
expect(el.value).to.equal("Section 1");
|
|
255
|
-
el.focus();
|
|
256
|
-
el.dispatchEvent(arrowUpEvent());
|
|
257
|
-
let focused = document.activeElement;
|
|
258
|
-
focused.click();
|
|
259
|
-
await elementUpdated(el);
|
|
260
|
-
expect(el.value).to.equal("Section 0");
|
|
261
|
-
el.focus();
|
|
262
|
-
el.dispatchEvent(arrowDownEvent());
|
|
263
|
-
el.dispatchEvent(arrowDownEvent());
|
|
264
|
-
focused = document.activeElement;
|
|
265
|
-
expect(focused.expanded, "not expanded").to.be.false;
|
|
266
|
-
focused.click();
|
|
267
|
-
await elementUpdated(el);
|
|
268
|
-
expect(focused.expanded, "expanded").to.be.true;
|
|
269
|
-
el.dispatchEvent(arrowDownEvent());
|
|
270
|
-
await elementUpdated(el);
|
|
271
|
-
focused = document.activeElement;
|
|
272
|
-
focused.click();
|
|
273
|
-
await elementUpdated(el);
|
|
274
|
-
expect(el.value).to.equal("Section 3a");
|
|
275
|
-
document.body.focus();
|
|
276
|
-
el.focus();
|
|
277
|
-
focused = document.activeElement;
|
|
278
|
-
expect(focused.selected, "selected").to.be.true;
|
|
279
|
-
el.dispatchEvent(shiftTabEvent());
|
|
280
|
-
const outsideFocused = document.activeElement;
|
|
281
|
-
expect(typeof outsideFocused).not.to.equal(SideNavItem);
|
|
282
|
-
});
|
|
283
|
-
it("focuses the child anchor not the root when [tabindex=-1]", async () => {
|
|
284
|
-
const el = await fixture(manageTabIndex());
|
|
285
|
-
await elementUpdated(el);
|
|
286
|
-
const firstItem = el.querySelector('[value="Section 0"]');
|
|
287
|
-
const selected = el.querySelector("[selected]");
|
|
288
|
-
expect(selected.tabIndex).to.equal(0);
|
|
289
|
-
expect(firstItem.tabIndex).to.equal(-1);
|
|
290
|
-
const firstRect = firstItem.getBoundingClientRect();
|
|
291
|
-
await sendMouse({
|
|
292
|
-
steps: [
|
|
293
|
-
{
|
|
294
|
-
type: "move",
|
|
295
|
-
position: [firstRect.x + 2, firstRect.y + 2]
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
type: "down"
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
});
|
|
302
|
-
await elementUpdated(el);
|
|
303
|
-
expect(firstItem.focusElement.matches(":focus")).to.be.true;
|
|
304
|
-
});
|
|
305
|
-
it("manage tab index through shadow DOM", async () => {
|
|
306
|
-
class SideNavTestEl extends LitElement {
|
|
307
|
-
render() {
|
|
308
|
-
return manageTabIndex();
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
customElements.define("sidenav-test-el", SideNavTestEl);
|
|
312
|
-
const el = await fixture(html`
|
|
96
|
+
`);await i(a),t(a.value).to.be.undefined,a.click(),await i(a),t(a.value).to.be.undefined,t(e.callCount).to.equal(1)}),it("prevents [tabindex=0] while `focusin`",async()=>{const e=await o(v()),a=e.querySelector('[value="Section 1"]'),s=e.querySelector('[value="Section 0"]');await i(e),await r(()=>e.value==="Section 1","wait for selection"),t(e.value).to.equal("Section 1"),t(a.tabIndex,"initially 0").to.equal(0),t(s.tabIndex,"initially -1").to.equal(-1),e.focus(),await i(e),t(e.value).to.equal("Section 1"),t(a.tabIndex,"-1 when focusin").to.equal(-1),e.blur(),await i(e),t(e.value).to.equal("Section 1"),t(a.tabIndex,"0 when blur").to.equal(0);const n=s.getBoundingClientRect();await b({steps:[{type:"click",position:[n.x+n.width/2,n.y+n.height/2]}]}),await i(e),t(e.value).to.equal("Section 0"),t(s.tabIndex,"will be new focusable child").to.equal(-1),t(a.tabIndex,"no longer selected").to.equal(-1)}),it("manage tab index",async()=>{const e=await o(v());await i(e),t(e.value).to.equal("Section 1"),e.focus(),e.dispatchEvent(S());let a=document.activeElement;a.click(),await i(e),t(e.value).to.equal("Section 0"),e.focus(),e.dispatchEvent(l()),e.dispatchEvent(l()),a=document.activeElement,t(a.expanded,"not expanded").to.be.false,a.click(),await i(e),t(a.expanded,"expanded").to.be.true,e.dispatchEvent(l()),await i(e),a=document.activeElement,a.click(),await i(e),t(e.value).to.equal("Section 3a"),document.body.focus(),e.focus(),a=document.activeElement,t(a.selected,"selected").to.be.true,e.dispatchEvent(m());const s=document.activeElement;t(typeof s).not.to.equal(u)}),it("focuses the child anchor not the root when [tabindex=-1]",async()=>{const e=await o(v());await i(e);const a=e.querySelector('[value="Section 0"]'),s=e.querySelector("[selected]");t(s.tabIndex).to.equal(0),t(a.tabIndex).to.equal(-1);const n=a.getBoundingClientRect();await b({steps:[{type:"move",position:[n.x+2,n.y+2]},{type:"down"}]}),await i(e),t(a.focusElement.matches(":focus")).to.be.true}),it("manage tab index through shadow DOM",async()=>{class e extends f{render(){return v()}}customElements.define("sidenav-test-el",e);const a=await o(d`
|
|
313
97
|
<sidenav-test-el></sidenav-test-el>
|
|
314
|
-
`);
|
|
315
|
-
await elementUpdated(el);
|
|
316
|
-
const rootNode = el.shadowRoot;
|
|
317
|
-
const sidenavEl = rootNode.querySelector("sp-sidenav");
|
|
318
|
-
await elementUpdated(sidenavEl);
|
|
319
|
-
expect(sidenavEl.value).to.equal("Section 1");
|
|
320
|
-
sidenavEl.focus();
|
|
321
|
-
sidenavEl.dispatchEvent(arrowUpEvent());
|
|
322
|
-
let focused = rootNode.activeElement;
|
|
323
|
-
focused.focusElement.click();
|
|
324
|
-
await elementUpdated(sidenavEl);
|
|
325
|
-
expect(sidenavEl.value).to.equal("Section 0");
|
|
326
|
-
sidenavEl.focus();
|
|
327
|
-
sidenavEl.dispatchEvent(arrowDownEvent());
|
|
328
|
-
sidenavEl.dispatchEvent(arrowDownEvent());
|
|
329
|
-
focused = rootNode.activeElement;
|
|
330
|
-
expect(focused.expanded).to.be.false;
|
|
331
|
-
focused.focusElement.click();
|
|
332
|
-
await elementUpdated(sidenavEl);
|
|
333
|
-
expect(focused.expanded).to.be.true;
|
|
334
|
-
sidenavEl.dispatchEvent(arrowDownEvent());
|
|
335
|
-
await elementUpdated(sidenavEl);
|
|
336
|
-
focused = rootNode.activeElement;
|
|
337
|
-
focused.focusElement.click();
|
|
338
|
-
await elementUpdated(sidenavEl);
|
|
339
|
-
expect(sidenavEl.value).to.equal("Section 3a");
|
|
340
|
-
document.body.focus();
|
|
341
|
-
sidenavEl.focus();
|
|
342
|
-
focused = rootNode.activeElement;
|
|
343
|
-
expect(focused.selected).to.be.true;
|
|
344
|
-
sidenavEl.dispatchEvent(shiftTabEvent());
|
|
345
|
-
const outsideFocused = rootNode.activeElement;
|
|
346
|
-
expect(typeof outsideFocused).not.to.equal(SideNavItem);
|
|
347
|
-
});
|
|
348
|
-
it("manage tab index for late added items", async () => {
|
|
349
|
-
const el = await fixture(html`
|
|
98
|
+
`);await i(a);const s=a.shadowRoot,n=s.querySelector("sp-sidenav");await i(n),t(n.value).to.equal("Section 1"),n.focus(),n.dispatchEvent(S());let c=s.activeElement;c.focusElement.click(),await i(n),t(n.value).to.equal("Section 0"),n.focus(),n.dispatchEvent(l()),n.dispatchEvent(l()),c=s.activeElement,t(c.expanded).to.be.false,c.focusElement.click(),await i(n),t(c.expanded).to.be.true,n.dispatchEvent(l()),await i(n),c=s.activeElement,c.focusElement.click(),await i(n),t(n.value).to.equal("Section 3a"),document.body.focus(),n.focus(),c=s.activeElement,t(c.selected).to.be.true,n.dispatchEvent(m());const w=s.activeElement;t(typeof w).not.to.equal(u)}),it("manage tab index for late added items",async()=>{const e=await o(d`
|
|
350
99
|
<sp-sidenav manage-tab-index>
|
|
351
100
|
<sp-sidenav-item
|
|
352
101
|
value="Section 0"
|
|
@@ -357,23 +106,5 @@ describe("Sidenav", () => {
|
|
|
357
106
|
label="Section 1"
|
|
358
107
|
></sp-sidenav-item>
|
|
359
108
|
</sp-sidenav>
|
|
360
|
-
`);
|
|
361
|
-
await elementUpdated(el);
|
|
362
|
-
expect(el.manageTabIndex).to.be.true;
|
|
363
|
-
const item1 = el.querySelector("sp-sidenav-item");
|
|
364
|
-
const item2 = el.querySelector("sp-sidenav-item:nth-child(2)");
|
|
365
|
-
await elementUpdated(item1);
|
|
366
|
-
await elementUpdated(item2);
|
|
367
|
-
expect(item1.tabIndex, "first item tabindex").to.equal(0);
|
|
368
|
-
expect(item2.tabIndex, "second item tabindex").to.equal(-1);
|
|
369
|
-
const item3 = document.createElement("sp-sidenav-item");
|
|
370
|
-
item3.value = "Section 2";
|
|
371
|
-
item3.label = "Section 2";
|
|
372
|
-
await elementUpdated(el);
|
|
373
|
-
el.appendChild(item3);
|
|
374
|
-
await elementUpdated(item3);
|
|
375
|
-
await elementUpdated(el);
|
|
376
|
-
await waitUntil(() => item3.tabIndex === -1, "after");
|
|
377
|
-
});
|
|
378
|
-
});
|
|
109
|
+
`);await i(e),t(e.manageTabIndex).to.be.true;const a=e.querySelector("sp-sidenav-item"),s=e.querySelector("sp-sidenav-item:nth-child(2)");await i(a),await i(s),t(a.tabIndex,"first item tabindex").to.equal(0),t(s.tabIndex,"second item tabindex").to.equal(-1);const n=document.createElement("sp-sidenav-item");n.value="Section 2",n.label="Section 2",await i(e),e.appendChild(n),await i(n),await i(e),await r(()=>n.tabIndex===-1,"after")})});
|
|
379
110
|
//# sourceMappingURL=sidenav.test.js.map
|
package/test/sidenav.test.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sidenav.test.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '@spectrum-web-components/sidenav/sp-sidenav.js';\nimport '@spectrum-web-components/sidenav/sp-sidenav-item.js';\nimport '@spectrum-web-components/sidenav/sp-sidenav-heading.js';\nimport { SideNav, SideNavItem } from '@spectrum-web-components/sidenav';\nimport { manageTabIndex } from '../stories/sidenav.stories.js';\nimport {\n arrowDownEvent,\n arrowUpEvent,\n shiftTabEvent,\n} from '../../../test/testing-helpers.js';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n waitUntil,\n} from '@open-wc/testing';\nimport { LitElement, TemplateResult } from '@spectrum-web-components/base';\nimport { spy } from 'sinon';\nimport { sendMouse } from '../../../test/plugins/browser.js';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Sidenav', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<SideNav>(\n html`\n <sp-sidenav>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 2\"\n label=\"Section 2\"\n ></sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `\n )\n );\n it('loads', async () => {\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 2\"\n label=\"Section 2\"\n ></sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('does not accept focus/click/blur when empty', async () => {\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav></sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.focus();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.blur();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.click();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n });\n it('does not accept keyboard events when items are not present', async () => {\n const errorSpy = spy();\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav>\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n const item = el.querySelector('sp-sidenav-item') as SideNavItem;\n window.addEventListener('error', () => errorSpy());\n\n el.dispatchEvent(new FocusEvent('focusin'));\n item.remove();\n\n await elementUpdated(el);\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n code: 'ArrowDown',\n })\n );\n\n expect(errorSpy.callCount).to.equal(0);\n });\n it('does not accept focus when all children [disabled]', async () => {\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav>\n <sp-sidenav-item\n disabled\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n disabled\n value=\"Section 2\"\n label=\"Section 2\"\n ></sp-sidenav-item>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.focus();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n expect(el.matches(':focus-within')).to.be.false;\n });\n it('sets manageTabIndex on new children', async () => {\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav>\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 2\"\n label=\"Section 2\"\n ></sp-sidenav-item>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n expect(el.manageTabIndex).to.be.false;\n\n const item1 = el.querySelector('sp-sidenav-item') as SideNavItem;\n expect(item1.tabIndex).to.equal(0);\n\n const newItem = document.createElement('sp-sidenav-item');\n newItem.value = 'Section 3';\n newItem.label = 'Section 3';\n el.appendChild(newItem);\n\n await elementUpdated(newItem);\n\n expect(newItem.tabIndex).to.equal(0);\n\n el.focus();\n const focused = document.activeElement as SideNavItem;\n focused.click();\n expect(focused.selected).to.be.true;\n\n el.dispatchEvent(shiftTabEvent());\n const outsideFocused = document.activeElement as HTMLElement;\n\n expect(typeof outsideFocused).not.to.equal(SideNavItem);\n });\n it('handles select', async () => {\n const changeSpy = spy();\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav @change=${() => changeSpy()}>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item value=\"Section 2\" label=\"Section 2\">\n <sp-sidenav-item\n value=\"Section 2a\"\n label=\"Section 2a\"\n ></sp-sidenav-item>\n </sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.be.undefined;\n\n const sidenavItem = el.querySelector(\n '[value=\"Section 2\"]'\n ) as SideNavItem;\n sidenavItem.dispatchEvent(\n new CustomEvent('sidenav-select', {\n bubbles: true,\n detail: {\n value: 'Section 2',\n },\n })\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 2');\n expect(changeSpy.callCount).to.equal(1);\n\n sidenavItem.click();\n\n await elementUpdated(sidenavItem);\n\n const sidenavItemChild = el.querySelector(\n '[value=\"Section 2a\"]'\n ) as SideNavItem;\n sidenavItemChild.click();\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 2a');\n expect(changeSpy.callCount).to.equal(2);\n });\n it('prevents selection', async () => {\n const changeSpy = spy();\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav\n @change=${(event: Event) => {\n event.preventDefault();\n changeSpy();\n }}\n >\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 2\"\n label=\"Section 2\"\n opened\n >\n <sp-sidenav-item\n value=\"Section 2a\"\n label=\"Section 2a\"\n ></sp-sidenav-item>\n </sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.value).to.be.undefined;\n\n el.click();\n\n await elementUpdated(el);\n\n expect(el.value).to.be.undefined;\n expect(changeSpy.callCount).to.equal(1);\n });\n it('prevents [tabindex=0] while `focusin`', async () => {\n const el = await fixture<SideNav>(manageTabIndex());\n const selected = el.querySelector('[value=\"Section 1\"]') as SideNavItem;\n const toBeSelected = el.querySelector(\n '[value=\"Section 0\"]'\n ) as SideNavItem;\n\n await elementUpdated(el);\n await waitUntil(() => el.value === 'Section 1', 'wait for selection');\n\n expect(el.value).to.equal('Section 1');\n expect(selected.tabIndex, 'initially 0').to.equal(0);\n expect(toBeSelected.tabIndex, 'initially -1').to.equal(-1);\n\n el.focus();\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 1');\n expect(selected.tabIndex, '-1 when focusin').to.equal(-1);\n\n el.blur();\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 1');\n expect(selected.tabIndex, '0 when blur').to.equal(0);\n\n const bindingRect = toBeSelected.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n bindingRect.x + bindingRect.width / 2,\n bindingRect.y + bindingRect.height / 2,\n ],\n },\n ],\n });\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 0');\n expect(toBeSelected.tabIndex, 'will be new focusable child').to.equal(\n -1\n );\n expect(selected.tabIndex, 'no longer selected').to.equal(-1);\n });\n it('manage tab index', async () => {\n const el = await fixture<SideNav>(manageTabIndex());\n\n await elementUpdated(el);\n expect(el.value).to.equal('Section 1');\n\n el.focus();\n el.dispatchEvent(arrowUpEvent());\n let focused = document.activeElement as SideNavItem;\n focused.click();\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 0');\n\n el.focus();\n el.dispatchEvent(arrowDownEvent());\n el.dispatchEvent(arrowDownEvent());\n focused = document.activeElement as SideNavItem;\n expect(focused.expanded, 'not expanded').to.be.false;\n focused.click();\n\n await elementUpdated(el);\n\n expect(focused.expanded, 'expanded').to.be.true;\n\n el.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n focused = document.activeElement as SideNavItem;\n focused.click();\n\n await elementUpdated(el);\n\n expect(el.value).to.equal('Section 3a');\n\n document.body.focus();\n\n el.focus();\n focused = document.activeElement as SideNavItem;\n expect(focused.selected, 'selected').to.be.true;\n\n el.dispatchEvent(shiftTabEvent());\n const outsideFocused = document.activeElement as HTMLElement;\n\n expect(typeof outsideFocused).not.to.equal(SideNavItem);\n });\n it('focuses the child anchor not the root when [tabindex=-1]', async () => {\n const el = await fixture<SideNav>(manageTabIndex());\n\n await elementUpdated(el);\n const firstItem = el.querySelector(\n '[value=\"Section 0\"]'\n ) as SideNavItem;\n const selected = el.querySelector('[selected]') as SideNavItem;\n expect(selected.tabIndex).to.equal(0);\n expect(firstItem.tabIndex).to.equal(-1);\n\n const firstRect = firstItem.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [firstRect.x + 2, firstRect.y + 2],\n },\n {\n type: 'down',\n },\n ],\n });\n await elementUpdated(el);\n\n expect(firstItem.focusElement.matches(':focus')).to.be.true;\n });\n it('manage tab index through shadow DOM', async () => {\n class SideNavTestEl extends LitElement {\n protected override render(): TemplateResult {\n return manageTabIndex();\n }\n }\n customElements.define('sidenav-test-el', SideNavTestEl);\n const el = await fixture<SideNav>(html`\n <sidenav-test-el></sidenav-test-el>\n `);\n\n await elementUpdated(el);\n const rootNode = el.shadowRoot as ShadowRoot;\n const sidenavEl = rootNode.querySelector('sp-sidenav') as SideNav;\n\n await elementUpdated(sidenavEl);\n expect(sidenavEl.value).to.equal('Section 1');\n\n sidenavEl.focus();\n sidenavEl.dispatchEvent(arrowUpEvent());\n let focused = rootNode.activeElement as SideNavItem;\n focused.focusElement.click();\n\n await elementUpdated(sidenavEl);\n\n expect(sidenavEl.value).to.equal('Section 0');\n\n sidenavEl.focus();\n sidenavEl.dispatchEvent(arrowDownEvent());\n sidenavEl.dispatchEvent(arrowDownEvent());\n focused = rootNode.activeElement as SideNavItem;\n expect(focused.expanded).to.be.false;\n focused.focusElement.click();\n\n await elementUpdated(sidenavEl);\n\n expect(focused.expanded).to.be.true;\n\n sidenavEl.dispatchEvent(arrowDownEvent());\n await elementUpdated(sidenavEl);\n focused = rootNode.activeElement as SideNavItem;\n focused.focusElement.click();\n\n await elementUpdated(sidenavEl);\n\n expect(sidenavEl.value).to.equal('Section 3a');\n\n document.body.focus();\n\n sidenavEl.focus();\n focused = rootNode.activeElement as SideNavItem;\n expect(focused.selected).to.be.true;\n\n sidenavEl.dispatchEvent(shiftTabEvent());\n const outsideFocused = rootNode.activeElement as HTMLElement;\n\n expect(typeof outsideFocused).not.to.equal(SideNavItem);\n });\n it('manage tab index for late added items', async () => {\n const el = await fixture<SideNav>(\n html`\n <sp-sidenav manage-tab-index>\n <sp-sidenav-item\n value=\"Section 0\"\n label=\"Section 0\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n </sp-sidenav>\n `\n );\n\n await elementUpdated(el);\n expect(el.manageTabIndex).to.be.true;\n\n const item1 = el.querySelector('sp-sidenav-item') as SideNavItem;\n const item2 = el.querySelector(\n 'sp-sidenav-item:nth-child(2)'\n ) as SideNavItem;\n\n await elementUpdated(item1);\n await elementUpdated(item2);\n expect(item1.tabIndex, 'first item tabindex').to.equal(0);\n expect(item2.tabIndex, 'second item tabindex').to.equal(-1);\n\n const item3 = document.createElement('sp-sidenav-item');\n item3.value = 'Section 2';\n item3.label = 'Section 2';\n\n await elementUpdated(el);\n\n el.appendChild(item3);\n\n await elementUpdated(item3);\n await elementUpdated(el);\n\n await waitUntil(() => item3.tabIndex === -1, 'after');\n });\n});\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,uDACA,4DACA,+DACA,+DACA,+DACA,uGAKA,oGAOA,2DACA,4BACA,6DACA,yEAEA,SAAS,UAAW,IAAM,CACtB,EACI,SACI,KAAM,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAcJ,CACR,EACA,GAAG,QAAS,SAAY,CACpB,KAAM,GAAK,KAAM,GACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAcJ,EAEA,KAAM,GAAe,CAAE,EAEvB,KAAM,GAAO,CAAE,EAAE,GAAG,GAAG,WAAW,CACtC,CAAC,EACD,GAAG,8CAA+C,SAAY,CAC1D,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,aAGJ,EAEA,KAAM,GAAe,CAAE,EAEvB,EAAO,SAAS,gBAAkB,CAAE,EAAE,GAAG,GAAG,MAE5C,EAAG,MAAM,EACT,KAAM,GAAe,CAAE,EAEvB,EAAO,SAAS,gBAAkB,CAAE,EAAE,GAAG,GAAG,MAE5C,EAAG,KAAK,EACR,KAAM,GAAe,CAAE,EAEvB,EAAO,SAAS,gBAAkB,CAAE,EAAE,GAAG,GAAG,MAE5C,EAAG,MAAM,EACT,KAAM,GAAe,CAAE,EAEvB,EAAO,SAAS,gBAAkB,CAAE,EAAE,GAAG,GAAG,KAChD,CAAC,EACD,GAAG,6DAA8D,SAAY,CACzE,KAAM,GAAW,EAAI,EACf,EAAK,KAAM,GACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQJ,EAEA,KAAM,GAAe,CAAE,EACvB,KAAM,GAAO,EAAG,cAAc,iBAAiB,EAC/C,OAAO,iBAAiB,QAAS,IAAM,EAAS,CAAC,EAEj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