@spectrum-web-components/menu 0.16.14 → 0.16.16-overlay.22
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 +9 -9
- package/src/Menu.d.ts +9 -2
- package/src/Menu.dev.js +117 -39
- package/src/Menu.dev.js.map +2 -2
- package/src/Menu.js +6 -3
- package/src/Menu.js.map +3 -3
- package/src/MenuGroup.dev.js +1 -3
- package/src/MenuGroup.dev.js.map +2 -2
- package/src/MenuGroup.js +3 -5
- package/src/MenuGroup.js.map +2 -2
- package/src/MenuItem.d.ts +12 -3
- package/src/MenuItem.dev.js +87 -85
- package/src/MenuItem.dev.js.map +3 -3
- package/src/MenuItem.js +31 -12
- package/src/MenuItem.js.map +3 -3
- package/src/menu-item.css.dev.js +1 -1
- package/src/menu-item.css.dev.js.map +1 -1
- package/src/menu-item.css.js +1 -1
- package/src/menu-item.css.js.map +1 -1
- package/src/menu.css.dev.js +1 -1
- package/src/menu.css.dev.js.map +1 -1
- package/src/menu.css.js +3 -3
- package/src/menu.css.js.map +1 -1
- package/stories/submenu.stories.js +25 -125
- package/stories/submenu.stories.js.map +3 -3
- package/test/menu-group.test.js +14 -1
- package/test/menu-group.test.js.map +2 -2
- package/test/menu.test.js +7 -0
- package/test/menu.test.js.map +2 -2
- package/test/submenu.test.js +57 -50
- package/test/submenu.test.js.map +2 -2
- package/custom-elements.json +0 -2191
- /package/src/{spectrum-config.js → spectrum-config.v1.js} +0 -0
package/test/submenu.test.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import "@spectrum-web-components/menu/sp-menu.js";
|
|
3
3
|
import "@spectrum-web-components/menu/sp-menu-item.js";
|
|
4
4
|
import {
|
|
5
|
+
aTimeout,
|
|
5
6
|
elementUpdated,
|
|
6
7
|
expect,
|
|
7
8
|
fixture,
|
|
@@ -74,6 +75,7 @@ describe("Submenu", () => {
|
|
|
74
75
|
]
|
|
75
76
|
});
|
|
76
77
|
await opened;
|
|
78
|
+
await aTimeout(150);
|
|
77
79
|
expect(rootItem.open).to.be.true;
|
|
78
80
|
const item2 = document.querySelector(".submenu-item-2");
|
|
79
81
|
const item2BoundingRect = item2.getBoundingClientRect();
|
|
@@ -90,11 +92,12 @@ describe("Submenu", () => {
|
|
|
90
92
|
]
|
|
91
93
|
});
|
|
92
94
|
await closed;
|
|
95
|
+
await aTimeout(150);
|
|
93
96
|
await nextFrame();
|
|
94
|
-
expect(
|
|
95
|
-
expect(
|
|
97
|
+
expect(submenuChanged.withArgs("Two").calledOnce, "submenu changed").to.be.true;
|
|
98
|
+
expect(rootChanged.withArgs("Has submenu").calledOnce, "root changed").to.be.true;
|
|
96
99
|
});
|
|
97
|
-
it("closes deep tree on selection", async () => {
|
|
100
|
+
it.only("closes deep tree on selection", async () => {
|
|
98
101
|
const rootChanged = spy();
|
|
99
102
|
const submenuChanged = spy();
|
|
100
103
|
const subSubmenuChanged = spy();
|
|
@@ -143,11 +146,12 @@ describe("Submenu", () => {
|
|
|
143
146
|
</sp-menu>
|
|
144
147
|
`
|
|
145
148
|
);
|
|
149
|
+
await aTimeout(150);
|
|
146
150
|
await elementUpdated(el);
|
|
147
151
|
const rootItem = el.querySelector(".root");
|
|
148
152
|
const rootItemBoundingRect = rootItem.getBoundingClientRect();
|
|
149
153
|
expect(rootItem.open).to.be.false;
|
|
150
|
-
|
|
154
|
+
let opened = oneEvent(rootItem, "sp-opened");
|
|
151
155
|
sendMouse({
|
|
152
156
|
steps: [
|
|
153
157
|
{
|
|
@@ -160,10 +164,11 @@ describe("Submenu", () => {
|
|
|
160
164
|
]
|
|
161
165
|
});
|
|
162
166
|
await opened;
|
|
167
|
+
await aTimeout(150);
|
|
163
168
|
expect(rootItem.open).to.be.true;
|
|
164
169
|
const item2 = document.querySelector(".submenu-item-2");
|
|
165
170
|
const item2BoundingRect = item2.getBoundingClientRect();
|
|
166
|
-
|
|
171
|
+
opened = oneEvent(item2, "sp-opened");
|
|
167
172
|
sendMouse({
|
|
168
173
|
steps: [
|
|
169
174
|
{
|
|
@@ -175,12 +180,13 @@ describe("Submenu", () => {
|
|
|
175
180
|
}
|
|
176
181
|
]
|
|
177
182
|
});
|
|
178
|
-
await
|
|
183
|
+
await opened;
|
|
184
|
+
await aTimeout(150);
|
|
179
185
|
await nextFrame();
|
|
180
186
|
expect(item2.open).to.be.true;
|
|
181
187
|
const itemC = document.querySelector(".sub-submenu-item-3");
|
|
182
188
|
const itemCBoundingRect = itemC.getBoundingClientRect();
|
|
183
|
-
closed = oneEvent(rootItem, "sp-closed");
|
|
189
|
+
const closed = oneEvent(rootItem, "sp-closed");
|
|
184
190
|
sendMouse({
|
|
185
191
|
steps: [
|
|
186
192
|
{
|
|
@@ -193,10 +199,11 @@ describe("Submenu", () => {
|
|
|
193
199
|
]
|
|
194
200
|
});
|
|
195
201
|
await closed;
|
|
202
|
+
await aTimeout(150);
|
|
196
203
|
await nextFrame();
|
|
197
|
-
expect(rootChanged.calledWith("Has submenu"), "root changed").to.be.true;
|
|
198
204
|
expect(submenuChanged.calledWith("Two"), "submenu changed").to.be.true;
|
|
199
205
|
expect(subSubmenuChanged.calledWith("C"), "sub submenu changed").to.be.true;
|
|
206
|
+
expect(rootChanged.calledWith("Has submenu"), "root changed").to.be.true;
|
|
200
207
|
});
|
|
201
208
|
[
|
|
202
209
|
{
|
|
@@ -211,11 +218,13 @@ describe("Submenu", () => {
|
|
|
211
218
|
}
|
|
212
219
|
].map((testData) => {
|
|
213
220
|
it(`selects - keyboard: ${testData.dir}`, async () => {
|
|
221
|
+
var _a, _b;
|
|
214
222
|
const rootChanged = spy();
|
|
215
223
|
const submenuChanged = spy();
|
|
216
224
|
const el = await styledFixture(
|
|
217
225
|
html`
|
|
218
226
|
<sp-menu
|
|
227
|
+
id="base"
|
|
219
228
|
@change=${(event) => {
|
|
220
229
|
rootChanged(event.target.value);
|
|
221
230
|
}}
|
|
@@ -223,6 +232,7 @@ describe("Submenu", () => {
|
|
|
223
232
|
<sp-menu-item class="root">
|
|
224
233
|
Has submenu
|
|
225
234
|
<sp-menu
|
|
235
|
+
id="sub"
|
|
226
236
|
slot="submenu"
|
|
227
237
|
@change=${(event) => {
|
|
228
238
|
submenuChanged(event.target.value);
|
|
@@ -245,6 +255,7 @@ describe("Submenu", () => {
|
|
|
245
255
|
);
|
|
246
256
|
await elementUpdated(el);
|
|
247
257
|
const rootItem = el.querySelector(".root");
|
|
258
|
+
const submenu = el.querySelector('[slot="submenu"]');
|
|
248
259
|
expect(rootItem.open).to.be.false;
|
|
249
260
|
el.focus();
|
|
250
261
|
await elementUpdated(el);
|
|
@@ -253,18 +264,29 @@ describe("Submenu", () => {
|
|
|
253
264
|
press: testData.openKey
|
|
254
265
|
});
|
|
255
266
|
await opened;
|
|
267
|
+
await aTimeout(150);
|
|
256
268
|
expect(rootItem.open).to.be.true;
|
|
269
|
+
expect(
|
|
270
|
+
submenu === document.activeElement,
|
|
271
|
+
`${(_a = document.activeElement) == null ? void 0 : _a.id}`
|
|
272
|
+
).to.be.true;
|
|
257
273
|
let closed = oneEvent(rootItem, "sp-closed");
|
|
258
274
|
sendKeys({
|
|
259
275
|
press: testData.closeKey
|
|
260
276
|
});
|
|
261
277
|
await closed;
|
|
278
|
+
await aTimeout(150);
|
|
262
279
|
expect(rootItem.open).to.be.false;
|
|
280
|
+
expect(
|
|
281
|
+
el === document.activeElement,
|
|
282
|
+
`${(_b = document.activeElement) == null ? void 0 : _b.id}`
|
|
283
|
+
).to.be.true;
|
|
263
284
|
opened = oneEvent(rootItem, "sp-opened");
|
|
264
285
|
sendKeys({
|
|
265
286
|
press: testData.openKey
|
|
266
287
|
});
|
|
267
288
|
await opened;
|
|
289
|
+
await aTimeout(150);
|
|
268
290
|
expect(rootItem.open).to.be.true;
|
|
269
291
|
await sendKeys({
|
|
270
292
|
press: "ArrowDown"
|
|
@@ -274,8 +296,15 @@ describe("Submenu", () => {
|
|
|
274
296
|
press: "Enter"
|
|
275
297
|
});
|
|
276
298
|
await closed;
|
|
277
|
-
|
|
299
|
+
await aTimeout(150);
|
|
300
|
+
await elementUpdated(el);
|
|
301
|
+
await nextFrame();
|
|
278
302
|
expect(submenuChanged.calledWith("Two"), "submenu changed").to.be.true;
|
|
303
|
+
expect(rootChanged.called, "root has changed").to.be.true;
|
|
304
|
+
expect(
|
|
305
|
+
rootChanged.calledWith("Has submenu"),
|
|
306
|
+
"root specifically changed"
|
|
307
|
+
).to.be.true;
|
|
279
308
|
});
|
|
280
309
|
});
|
|
281
310
|
it("closes on `pointerleave`", async () => {
|
|
@@ -556,22 +585,16 @@ describe("Submenu", () => {
|
|
|
556
585
|
el.click();
|
|
557
586
|
await opened;
|
|
558
587
|
expect(el.open).to.be.true;
|
|
559
|
-
let activeOverlays = document.querySelectorAll("active-overlay");
|
|
560
|
-
expect(activeOverlays.length).to.equal(1);
|
|
561
588
|
opened = oneEvent(rootMenu1, "sp-opened");
|
|
562
589
|
rootMenu1.dispatchEvent(
|
|
563
590
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
564
591
|
);
|
|
565
592
|
await opened;
|
|
566
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
567
|
-
expect(activeOverlays.length).to.equal(2);
|
|
568
593
|
opened = oneEvent(childMenu2, "sp-opened");
|
|
569
594
|
childMenu2.dispatchEvent(
|
|
570
595
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
571
596
|
);
|
|
572
597
|
await opened;
|
|
573
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
574
|
-
expect(activeOverlays.length).to.equal(3);
|
|
575
598
|
const overlaysManaged = Promise.all([
|
|
576
599
|
oneEvent(childMenu2, "sp-closed"),
|
|
577
600
|
oneEvent(rootMenu1, "sp-closed"),
|
|
@@ -581,8 +604,6 @@ describe("Submenu", () => {
|
|
|
581
604
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
582
605
|
);
|
|
583
606
|
await overlaysManaged;
|
|
584
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
585
|
-
expect(activeOverlays.length).to.equal(2);
|
|
586
607
|
});
|
|
587
608
|
it("closes back to the first overlay without a `root` when clicking away", async () => {
|
|
588
609
|
const el = await styledFixture(html`
|
|
@@ -631,31 +652,30 @@ describe("Submenu", () => {
|
|
|
631
652
|
el.click();
|
|
632
653
|
await opened;
|
|
633
654
|
expect(el.open).to.be.true;
|
|
634
|
-
let activeOverlays = document.querySelectorAll("active-overlay");
|
|
635
|
-
expect(activeOverlays.length).to.equal(1);
|
|
636
655
|
opened = oneEvent(rootMenu1, "sp-opened");
|
|
637
656
|
rootMenu1.dispatchEvent(
|
|
638
657
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
639
658
|
);
|
|
640
659
|
await opened;
|
|
641
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
642
|
-
expect(activeOverlays.length).to.equal(2);
|
|
643
660
|
opened = oneEvent(childMenu2, "sp-opened");
|
|
644
661
|
childMenu2.dispatchEvent(
|
|
645
662
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
646
663
|
);
|
|
647
664
|
await opened;
|
|
648
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
649
|
-
expect(activeOverlays.length).to.equal(3);
|
|
650
665
|
const closed = Promise.all([
|
|
651
666
|
oneEvent(childMenu2, "sp-closed"),
|
|
652
667
|
oneEvent(rootMenu1, "sp-closed"),
|
|
653
668
|
oneEvent(el, "sp-closed")
|
|
654
669
|
]);
|
|
655
|
-
|
|
670
|
+
sendMouse({
|
|
671
|
+
steps: [
|
|
672
|
+
{
|
|
673
|
+
type: "click",
|
|
674
|
+
position: [600, 5]
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
});
|
|
656
678
|
await closed;
|
|
657
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
658
|
-
expect(activeOverlays.length).to.equal(0);
|
|
659
679
|
});
|
|
660
680
|
it("closes decendent menus when Menu Item in ancestor without a submenu is pointerentered", async () => {
|
|
661
681
|
const el = await styledFixture(html`
|
|
@@ -694,22 +714,16 @@ describe("Submenu", () => {
|
|
|
694
714
|
el.click();
|
|
695
715
|
await opened;
|
|
696
716
|
expect(el.open).to.be.true;
|
|
697
|
-
let activeOverlays = document.querySelectorAll("active-overlay");
|
|
698
|
-
expect(activeOverlays.length).to.equal(1);
|
|
699
717
|
opened = oneEvent(rootMenu, "sp-opened");
|
|
700
718
|
rootMenu.dispatchEvent(
|
|
701
719
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
702
720
|
);
|
|
703
721
|
await opened;
|
|
704
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
705
|
-
expect(activeOverlays.length).to.equal(2);
|
|
706
722
|
const closed = oneEvent(rootMenu, "sp-closed");
|
|
707
723
|
noSubmenu.dispatchEvent(
|
|
708
724
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
709
725
|
);
|
|
710
726
|
await closed;
|
|
711
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
712
|
-
expect(activeOverlays.length).to.equal(1);
|
|
713
727
|
});
|
|
714
728
|
it("closes decendent menus when Menu Item in ancestor is clicked", async () => {
|
|
715
729
|
const el = await styledFixture(html`
|
|
@@ -753,6 +767,7 @@ describe("Submenu", () => {
|
|
|
753
767
|
</sp-menu-group>
|
|
754
768
|
</sp-action-menu>
|
|
755
769
|
`);
|
|
770
|
+
await nextFrame();
|
|
756
771
|
const rootMenu1 = el.querySelector("#submenu-item-1");
|
|
757
772
|
const childMenu2 = el.querySelector("#submenu-item-2");
|
|
758
773
|
const ancestorItem = el.querySelector("#ancestor-item");
|
|
@@ -761,22 +776,16 @@ describe("Submenu", () => {
|
|
|
761
776
|
el.click();
|
|
762
777
|
await opened;
|
|
763
778
|
expect(el.open).to.be.true;
|
|
764
|
-
let activeOverlays = document.querySelectorAll("active-overlay");
|
|
765
|
-
expect(activeOverlays.length).to.equal(1);
|
|
766
779
|
opened = oneEvent(rootMenu1, "sp-opened");
|
|
767
780
|
rootMenu1.dispatchEvent(
|
|
768
781
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
769
782
|
);
|
|
770
783
|
await opened;
|
|
771
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
772
|
-
expect(activeOverlays.length).to.equal(2);
|
|
773
784
|
opened = oneEvent(childMenu2, "sp-opened");
|
|
774
785
|
childMenu2.dispatchEvent(
|
|
775
786
|
new PointerEvent("pointerenter", { bubbles: true })
|
|
776
787
|
);
|
|
777
788
|
await opened;
|
|
778
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
779
|
-
expect(activeOverlays.length).to.equal(3);
|
|
780
789
|
const closed = Promise.all([
|
|
781
790
|
oneEvent(childMenu2, "sp-closed"),
|
|
782
791
|
oneEvent(rootMenu1, "sp-closed"),
|
|
@@ -784,10 +793,11 @@ describe("Submenu", () => {
|
|
|
784
793
|
]);
|
|
785
794
|
ancestorItem.click();
|
|
786
795
|
await closed;
|
|
787
|
-
activeOverlays = document.querySelectorAll("active-overlay");
|
|
788
|
-
expect(activeOverlays.length).to.equal(0);
|
|
789
796
|
});
|
|
790
797
|
it('cleans up submenus that close before they are "open"', async () => {
|
|
798
|
+
if ("showPopover" in document.createElement("div")) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
791
801
|
await sendMouse({
|
|
792
802
|
steps: [
|
|
793
803
|
{
|
|
@@ -837,7 +847,6 @@ describe("Submenu", () => {
|
|
|
837
847
|
expect(rootItem2.open, "initially closed 2").to.be.false;
|
|
838
848
|
const rootItemBoundingRect1 = rootItem1.getBoundingClientRect();
|
|
839
849
|
const rootItemBoundingRect2 = rootItem2.getBoundingClientRect();
|
|
840
|
-
let activeOverlay;
|
|
841
850
|
await sendMouse({
|
|
842
851
|
steps: [
|
|
843
852
|
{
|
|
@@ -882,6 +891,12 @@ describe("Submenu", () => {
|
|
|
882
891
|
}
|
|
883
892
|
]
|
|
884
893
|
});
|
|
894
|
+
await nextFrame();
|
|
895
|
+
await nextFrame();
|
|
896
|
+
await nextFrame();
|
|
897
|
+
await nextFrame();
|
|
898
|
+
await nextFrame();
|
|
899
|
+
await nextFrame();
|
|
885
900
|
const closed = oneEvent(rootItem2, "sp-closed");
|
|
886
901
|
await sendMouse({
|
|
887
902
|
steps: [
|
|
@@ -889,20 +904,12 @@ describe("Submenu", () => {
|
|
|
889
904
|
type: "move",
|
|
890
905
|
position: [
|
|
891
906
|
rootItemBoundingRect2.left + rootItemBoundingRect2.width / 2,
|
|
892
|
-
rootItemBoundingRect2.top + rootItemBoundingRect2.
|
|
907
|
+
rootItemBoundingRect2.top + rootItemBoundingRect2.height * 2
|
|
893
908
|
]
|
|
894
909
|
}
|
|
895
910
|
]
|
|
896
911
|
});
|
|
897
|
-
activeOverlay = document.querySelector(
|
|
898
|
-
"active-overlay"
|
|
899
|
-
);
|
|
900
|
-
expect(activeOverlay).to.not.be.null;
|
|
901
912
|
await closed;
|
|
902
|
-
activeOverlay = document.querySelector(
|
|
903
|
-
"active-overlay"
|
|
904
|
-
);
|
|
905
|
-
expect(activeOverlay).to.be.null;
|
|
906
913
|
expect(rootItem1.open, "finally closed 1").to.be.false;
|
|
907
914
|
expect(rootItem2.open, "finally closed 2").to.be.false;
|
|
908
915
|
});
|
package/test/submenu.test.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["submenu.test.ts"],
|
|
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/menu/sp-menu.js';\nimport '@spectrum-web-components/menu/sp-menu-item.js';\nimport { Menu, MenuItem } from '@spectrum-web-components/menu';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n oneEvent,\n} from '@open-wc/testing';\nimport '@spectrum-web-components/theme/sp-theme.js';\nimport '@spectrum-web-components/theme/src/themes.js';\nimport { sendMouse } from '../../../test/plugins/browser.js';\nimport { spy } from 'sinon';\nimport { Theme } from '@spectrum-web-components/theme';\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { ActionMenu } from '@spectrum-web-components/action-menu';\nimport '@spectrum-web-components/action-menu/sp-action-menu.js';\nimport '@spectrum-web-components/menu/sp-menu-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-show-menu.js';\nimport { ActiveOverlay } from '@spectrum-web-components/overlay';\n\nasync function styledFixture<T extends Element>(\n story: TemplateResult,\n dir: 'ltr' | 'rtl' | 'auto' = 'ltr'\n): Promise<T> {\n const test = await fixture<Theme>(html`\n <sp-theme dir=${dir} scale=\"medium\" color=\"dark\">${story}</sp-theme>\n `);\n document.documentElement.dir = dir;\n return test.children[0] as T;\n}\n\ndescribe('Submenu', () => {\n it('selects - pointer', async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const item2BoundingRect = item2.getBoundingClientRect();\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n await nextFrame();\n\n expect(rootChanged.calledWith('Has submenu'), 'root changed').to.be\n .true;\n expect(submenuChanged.calledWith('Two'), 'submenu changed').to.be.true;\n });\n it('closes deep tree on selection', async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const subSubmenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n <sp-menu\n slot=\"submenu\"\n @change=${(\n event: Event & { target: Menu }\n ) => {\n subSubmenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"sub-submenu-item-1\">\n A\n </sp-menu-item>\n <sp-menu-item class=\"sub-submenu-item-2\">\n B\n </sp-menu-item>\n <sp-menu-item class=\"sub-submenu-item-3\">\n C\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const item2BoundingRect = item2.getBoundingClientRect();\n\n let closed = oneEvent(item2, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n await nextFrame();\n\n expect(item2.open).to.be.true;\n\n const itemC = document.querySelector('.sub-submenu-item-3') as MenuItem;\n const itemCBoundingRect = itemC.getBoundingClientRect();\n\n closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n itemCBoundingRect.left + itemCBoundingRect.width / 2,\n itemCBoundingRect.top + itemCBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n await nextFrame();\n\n expect(rootChanged.calledWith('Has submenu'), 'root changed').to.be\n .true;\n expect(submenuChanged.calledWith('Two'), 'submenu changed').to.be.true;\n expect(subSubmenuChanged.calledWith('C'), 'sub submenu changed').to.be\n .true;\n });\n (\n [\n {\n dir: 'ltr',\n openKey: 'ArrowRight',\n closeKey: 'ArrowLeft',\n },\n {\n dir: 'rtl',\n openKey: 'ArrowLeft',\n closeKey: 'ArrowRight',\n },\n ] as {\n dir: 'ltr' | 'rtl' | 'auto';\n openKey: 'ArrowRight' | 'ArrowLeft';\n closeKey: 'ArrowRight' | 'ArrowLeft';\n }[]\n ).map((testData) => {\n it(`selects - keyboard: ${testData.dir}`, async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `,\n testData.dir\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n expect(rootItem.open).to.be.false;\n el.focus();\n await elementUpdated(el);\n\n let opened = oneEvent(rootItem, 'sp-opened');\n sendKeys({\n press: testData.openKey,\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n let closed = oneEvent(rootItem, 'sp-closed');\n sendKeys({\n press: testData.closeKey,\n });\n await closed;\n\n expect(rootItem.open).to.be.false;\n\n opened = oneEvent(rootItem, 'sp-opened');\n sendKeys({\n press: testData.openKey,\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n await sendKeys({\n press: 'ArrowDown',\n });\n\n closed = oneEvent(rootItem, 'sp-closed');\n sendKeys({\n press: 'Enter',\n });\n await closed;\n\n expect(rootChanged.calledWith('Has submenu'), 'root changed').to.be\n .true;\n expect(submenuChanged.calledWith('Two'), 'submenu changed').to.be\n .true;\n });\n });\n it('closes on `pointerleave`', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(rootItem.open).to.be.false;\n });\n it('stays open when mousing off menu item and back again', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await closed;\n });\n it('stays open when mousing between menu item and submenu', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width * 1.5,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n });\n it('not opens if disabled', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item disabled class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n // wait 200ms for open\n await new Promise((r) => setTimeout(r, 200));\n\n expect(rootItem.open).to.be.false;\n });\n it('closes all decendent submenus when closing a ancestor menu', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item>Williamsburg</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as Menu;\n const rootMenu2 = el.querySelector('#submenu-item-3') as Menu;\n const childMenu2 = el.querySelector('#submenu-item-2') as Menu;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n let activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(1);\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(2);\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(3);\n\n const overlaysManaged = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(rootMenu2, 'sp-opened'),\n ]);\n rootMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await overlaysManaged;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(2);\n });\n\n it('closes back to the first overlay without a `root` when clicking away', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item>Williamsburg</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as Menu;\n const childMenu2 = el.querySelector('#submenu-item-2') as Menu;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n let activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(1);\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(2);\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(3);\n\n const closed = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(el, 'sp-closed'),\n ]);\n document.body.click();\n await closed;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(0);\n });\n\n it('closes decendent menus when Menu Item in ancestor without a submenu is pointerentered', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item id=\"no-submenu\">Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item id=\"ancestor-item\">\n Williamsburg\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>Union Square</sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu = el.querySelector('#submenu-item-1') as MenuItem;\n const noSubmenu = el.querySelector('#no-submenu') as MenuItem;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n let activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(1);\n opened = oneEvent(rootMenu, 'sp-opened');\n rootMenu.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(2);\n\n const closed = oneEvent(rootMenu, 'sp-closed');\n noSubmenu.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await closed;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(1);\n });\n\n it('closes decendent menus when Menu Item in ancestor is clicked', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item id=\"ancestor-item\">\n Williamsburg\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as MenuItem;\n const childMenu2 = el.querySelector('#submenu-item-2') as MenuItem;\n const ancestorItem = el.querySelector('#ancestor-item') as MenuItem;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n let activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(1);\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(2);\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(3);\n\n const closed = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(el, 'sp-closed'),\n ]);\n ancestorItem.click();\n await closed;\n activeOverlays = document.querySelectorAll('active-overlay');\n expect(activeOverlays.length).to.equal(0);\n });\n it('cleans up submenus that close before they are \"open\"', async () => {\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [-5, -5],\n },\n ],\n });\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root-1\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item class=\"root-2\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem1 = el.querySelector('.root-1') as MenuItem;\n const rootItem2 = el.querySelector('.root-2') as MenuItem;\n expect(rootItem1.open, 'initially closed 1').to.be.false;\n expect(rootItem2.open, 'initially closed 2').to.be.false;\n\n const rootItemBoundingRect1 = rootItem1.getBoundingClientRect();\n const rootItemBoundingRect2 = rootItem2.getBoundingClientRect();\n let activeOverlay!: ActiveOverlay | null;\n\n // Open the first submenu\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect1.left +\n rootItemBoundingRect1.width / 2,\n rootItemBoundingRect1.top +\n rootItemBoundingRect1.height / 2,\n ],\n },\n ],\n });\n // Open the second submenu, closing the first\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height / 2,\n ],\n },\n ],\n });\n // Open the first submenu, closing the second\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect1.left +\n rootItemBoundingRect1.width / 2,\n rootItemBoundingRect1.top +\n rootItemBoundingRect1.height / 2,\n ],\n },\n ],\n });\n // Open the second submenu, closing the first\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height / 2,\n ],\n },\n ],\n });\n const closed = oneEvent(rootItem2, 'sp-closed');\n // Close the second submenu\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height / 2,\n ],\n },\n ],\n });\n activeOverlay = document.querySelector(\n 'active-overlay'\n ) as ActiveOverlay;\n expect(activeOverlay).to.not.be.null;\n await closed;\n\n activeOverlay = document.querySelector(\n 'active-overlay'\n ) as ActiveOverlay;\n expect(activeOverlay).to.be.null;\n expect(rootItem1.open, 'finally closed 1').to.be.false;\n expect(rootItem2.open, 'finally closed 2').to.be.false;\n });\n});\n"],
|
|
5
|
-
"mappings": ";AAYA,OAAO;AACP,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,OAAO;AACP,OAAO;AACP,SAAS,iBAAiB;AAC1B,SAAS,WAAW;AAGpB,SAAS,gBAAgB;AAEzB,OAAO;AACP,OAAO;AACP,OAAO;AAGP,eAAe,cACX,OACA,MAA8B,OACpB;AACV,QAAM,OAAO,MAAM,Q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AAC;",
|
|
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/menu/sp-menu.js';\nimport '@spectrum-web-components/menu/sp-menu-item.js';\nimport { Menu, MenuItem } from '@spectrum-web-components/menu';\nimport {\n aTimeout,\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n oneEvent,\n} from '@open-wc/testing';\nimport '@spectrum-web-components/theme/sp-theme.js';\nimport '@spectrum-web-components/theme/src/themes.js';\nimport { sendMouse } from '../../../test/plugins/browser.js';\nimport { spy } from 'sinon';\nimport { Theme } from '@spectrum-web-components/theme';\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { ActionMenu } from '@spectrum-web-components/action-menu';\nimport '@spectrum-web-components/action-menu/sp-action-menu.js';\nimport '@spectrum-web-components/menu/sp-menu-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-show-menu.js';\n\nasync function styledFixture<T extends Element>(\n story: TemplateResult,\n dir: 'ltr' | 'rtl' | 'auto' = 'ltr'\n): Promise<T> {\n const test = await fixture<Theme>(html`\n <sp-theme dir=${dir} scale=\"medium\" color=\"dark\">${story}</sp-theme>\n `);\n document.documentElement.dir = dir;\n return test.children[0] as T;\n}\n\ndescribe('Submenu', () => {\n it('selects - pointer', async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const item2BoundingRect = item2.getBoundingClientRect();\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n await aTimeout(150);\n await nextFrame();\n\n expect(submenuChanged.withArgs('Two').calledOnce, 'submenu changed').to\n .be.true;\n expect(rootChanged.withArgs('Has submenu').calledOnce, 'root changed')\n .to.be.true;\n });\n it.only('closes deep tree on selection', async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const subSubmenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n <sp-menu\n slot=\"submenu\"\n @change=${(\n event: Event & { target: Menu }\n ) => {\n subSubmenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"sub-submenu-item-1\">\n A\n </sp-menu-item>\n <sp-menu-item class=\"sub-submenu-item-2\">\n B\n </sp-menu-item>\n <sp-menu-item class=\"sub-submenu-item-3\">\n C\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await aTimeout(150);\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n let opened = oneEvent(rootItem, 'sp-opened');\n // Hover the root menu item to open a submenu\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const item2BoundingRect = item2.getBoundingClientRect();\n\n opened = oneEvent(item2, 'sp-opened');\n // Click the submenu item to open a submenu\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n await aTimeout(150);\n await nextFrame();\n\n expect(item2.open).to.be.true;\n\n const itemC = document.querySelector('.sub-submenu-item-3') as MenuItem;\n const itemCBoundingRect = itemC.getBoundingClientRect();\n\n const closed = oneEvent(rootItem, 'sp-closed');\n // click to select and close\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n itemCBoundingRect.left + itemCBoundingRect.width / 2,\n itemCBoundingRect.top + itemCBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n await aTimeout(150);\n await nextFrame();\n\n expect(submenuChanged.calledWith('Two'), 'submenu changed').to.be.true;\n expect(subSubmenuChanged.calledWith('C'), 'sub submenu changed').to.be\n .true;\n expect(rootChanged.calledWith('Has submenu'), 'root changed').to.be\n .true;\n });\n (\n [\n {\n dir: 'ltr',\n openKey: 'ArrowRight',\n closeKey: 'ArrowLeft',\n },\n {\n dir: 'rtl',\n openKey: 'ArrowLeft',\n closeKey: 'ArrowRight',\n },\n ] as {\n dir: 'ltr' | 'rtl' | 'auto';\n openKey: 'ArrowRight' | 'ArrowLeft';\n closeKey: 'ArrowRight' | 'ArrowLeft';\n }[]\n ).map((testData) => {\n it(`selects - keyboard: ${testData.dir}`, async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await styledFixture<Menu>(\n html`\n <sp-menu\n id=\"base\"\n @change=${(event: Event & { target: Menu }) => {\n rootChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu\n id=\"sub\"\n slot=\"submenu\"\n @change=${(event: Event & { target: Menu }) => {\n submenuChanged(event.target.value);\n }}\n >\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `,\n testData.dir\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const submenu = el.querySelector('[slot=\"submenu\"]') as Menu;\n expect(rootItem.open).to.be.false;\n el.focus();\n await elementUpdated(el);\n\n let opened = oneEvent(rootItem, 'sp-opened');\n sendKeys({\n press: testData.openKey,\n });\n await opened;\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n expect(\n submenu === document.activeElement,\n `${document.activeElement?.id}`\n ).to.be.true;\n\n let closed = oneEvent(rootItem, 'sp-closed');\n sendKeys({\n press: testData.closeKey,\n });\n await closed;\n await aTimeout(150);\n\n expect(rootItem.open).to.be.false;\n expect(\n el === document.activeElement,\n `${document.activeElement?.id}`\n ).to.be.true;\n\n opened = oneEvent(rootItem, 'sp-opened');\n sendKeys({\n press: testData.openKey,\n });\n await opened;\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n await sendKeys({\n press: 'ArrowDown',\n });\n\n closed = oneEvent(rootItem, 'sp-closed');\n sendKeys({\n press: 'Enter',\n });\n await closed;\n await aTimeout(150);\n await elementUpdated(el);\n await nextFrame();\n\n expect(submenuChanged.calledWith('Two'), 'submenu changed').to.be\n .true;\n expect(rootChanged.called, 'root has changed').to.be.true;\n expect(\n rootChanged.calledWith('Has submenu'),\n 'root specifically changed'\n ).to.be.true;\n });\n });\n it('closes on `pointerleave`', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(rootItem.open).to.be.false;\n });\n it('stays open when mousing off menu item and back again', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await closed;\n });\n it('stays open when mousing between menu item and submenu', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n const opened = oneEvent(rootItem, 'sp-opened');\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height * 2,\n ],\n },\n ],\n });\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width * 1.5,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(rootItem.open).to.be.true;\n });\n it('not opens if disabled', async () => {\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item disabled class=\"root\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n expect(rootItem.open).to.be.false;\n\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect.left +\n rootItemBoundingRect.width / 2,\n rootItemBoundingRect.top +\n rootItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n // wait 200ms for open\n await new Promise((r) => setTimeout(r, 200));\n\n expect(rootItem.open).to.be.false;\n });\n it('closes all decendent submenus when closing a ancestor menu', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item>Williamsburg</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as Menu;\n const rootMenu2 = el.querySelector('#submenu-item-3') as Menu;\n const childMenu2 = el.querySelector('#submenu-item-2') as Menu;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n const overlaysManaged = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(rootMenu2, 'sp-opened'),\n ]);\n rootMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await overlaysManaged;\n });\n\n it('closes back to the first overlay without a `root` when clicking away', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item>Williamsburg</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as Menu;\n const childMenu2 = el.querySelector('#submenu-item-2') as Menu;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n const closed = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(el, 'sp-closed'),\n ]);\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [600, 5],\n },\n ],\n });\n await closed;\n });\n\n it('closes decendent menus when Menu Item in ancestor without a submenu is pointerentered', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item id=\"no-submenu\">Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item id=\"ancestor-item\">\n Williamsburg\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>Union Square</sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n\n const rootMenu = el.querySelector('#submenu-item-1') as MenuItem;\n const noSubmenu = el.querySelector('#no-submenu') as MenuItem;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n opened = oneEvent(rootMenu, 'sp-opened');\n rootMenu.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n const closed = oneEvent(rootMenu, 'sp-closed');\n noSubmenu.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await closed;\n });\n\n it('closes decendent menus when Menu Item in ancestor is clicked', async () => {\n const el = await styledFixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\">\n <span slot=\"header\">New York</span>\n <sp-menu-item>Bronx</sp-menu-item>\n <sp-menu-item id=\"submenu-item-1\">\n Brooklyn\n <sp-menu slot=\"submenu\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\">\n <sp-menu-item>S. Oxford St</sp-menu-item>\n <sp-menu-item>S. Portland Ave</sp-menu-item>\n <sp-menu-item>S. Elliot Pl</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item disabled>Park Slope</sp-menu-item>\n <sp-menu-item id=\"ancestor-item\">\n Williamsburg\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item id=\"submenu-item-3\">\n Manhattan\n <sp-menu slot=\"submenu\">\n <sp-menu-item disabled>SoHo</sp-menu-item>\n <sp-menu-item>\n Union Square\n <sp-menu slot=\"submenu\">\n <sp-menu-item>14th St</sp-menu-item>\n <sp-menu-item>Broadway</sp-menu-item>\n <sp-menu-item>Park Ave</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item>Upper East Side</sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu-group>\n </sp-action-menu>\n `);\n await nextFrame();\n\n const rootMenu1 = el.querySelector('#submenu-item-1') as MenuItem;\n const childMenu2 = el.querySelector('#submenu-item-2') as MenuItem;\n const ancestorItem = el.querySelector('#ancestor-item') as MenuItem;\n\n expect(el.open).to.be.false;\n let opened = oneEvent(el, 'sp-opened');\n el.click();\n await opened;\n expect(el.open).to.be.true;\n\n opened = oneEvent(rootMenu1, 'sp-opened');\n rootMenu1.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n\n const closed = Promise.all([\n oneEvent(childMenu2, 'sp-closed'),\n oneEvent(rootMenu1, 'sp-closed'),\n oneEvent(el, 'sp-closed'),\n ]);\n ancestorItem.click();\n await closed;\n });\n it('cleans up submenus that close before they are \"open\"', async () => {\n if ('showPopover' in document.createElement('div')) {\n return;\n }\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [-5, -5],\n },\n ],\n });\n const el = await styledFixture<Menu>(\n html`\n <sp-menu>\n <sp-menu-item class=\"root-1\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n <sp-menu-item class=\"root-2\">\n Has submenu\n <sp-menu slot=\"submenu\">\n <sp-menu-item class=\"submenu-item-1\">\n One\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-2\">\n Two\n </sp-menu-item>\n <sp-menu-item class=\"submenu-item-3\">\n Three\n </sp-menu-item>\n </sp-menu>\n </sp-menu-item>\n </sp-menu>\n `\n );\n\n await elementUpdated(el);\n const rootItem1 = el.querySelector('.root-1') as MenuItem;\n const rootItem2 = el.querySelector('.root-2') as MenuItem;\n expect(rootItem1.open, 'initially closed 1').to.be.false;\n expect(rootItem2.open, 'initially closed 2').to.be.false;\n\n const rootItemBoundingRect1 = rootItem1.getBoundingClientRect();\n const rootItemBoundingRect2 = rootItem2.getBoundingClientRect();\n\n // Open the first submenu\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect1.left +\n rootItemBoundingRect1.width / 2,\n rootItemBoundingRect1.top +\n rootItemBoundingRect1.height / 2,\n ],\n },\n ],\n });\n // Open the second submenu, closing the first\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height / 2,\n ],\n },\n ],\n });\n // Open the first submenu, closing the second\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect1.left +\n rootItemBoundingRect1.width / 2,\n rootItemBoundingRect1.top +\n rootItemBoundingRect1.height / 2,\n ],\n },\n ],\n });\n // Open the second submenu, closing the first\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height / 2,\n ],\n },\n ],\n });\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n const closed = oneEvent(rootItem2, 'sp-closed');\n // Close the second submenu\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n rootItemBoundingRect2.left +\n rootItemBoundingRect2.width / 2,\n rootItemBoundingRect2.top +\n rootItemBoundingRect2.height * 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(rootItem1.open, 'finally closed 1').to.be.false;\n expect(rootItem2.open, 'finally closed 2').to.be.false;\n });\n});\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO;AACP,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,OAAO;AACP,OAAO;AACP,SAAS,iBAAiB;AAC1B,SAAS,WAAW;AAGpB,SAAS,gBAAgB;AAEzB,OAAO;AACP,OAAO;AACP,OAAO;AAEP,eAAe,cACX,OACA,MAA8B,OACpB;AACV,QAAM,OAAO,MAAM,QAAe;AAAA,wBACd,mCAAmC;AAAA,KACtD;AACD,WAAS,gBAAgB,MAAM;AAC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