@spectrum-web-components/menu 0.40.3 → 0.40.5

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.
@@ -5,13 +5,11 @@ import {
5
5
  aTimeout,
6
6
  elementUpdated,
7
7
  expect,
8
- fixture,
9
8
  html,
10
9
  nextFrame,
11
10
  oneEvent
12
11
  } from "@open-wc/testing";
13
- import "@spectrum-web-components/theme/sp-theme.js";
14
- import "@spectrum-web-components/theme/src/themes.js";
12
+ import { fixture } from "../../../test/testing-helpers.js";
15
13
  import { sendMouse } from "../../../test/plugins/browser.js";
16
14
  import { spy } from "sinon";
17
15
  import { sendKeys } from "@web/test-runner-commands";
@@ -19,51 +17,11 @@ import "@spectrum-web-components/action-menu/sp-action-menu.js";
19
17
  import "@spectrum-web-components/menu/sp-menu-group.js";
20
18
  import "@spectrum-web-components/overlay/sp-overlay.js";
21
19
  import "@spectrum-web-components/icons-workflow/icons/sp-icon-show-menu.js";
22
- async function styledFixture(story, dir = "ltr") {
23
- const test = await fixture(html`
24
- <sp-theme dir=${dir} scale="medium" color="light">
25
- ${story}
26
- <style>
27
- sp-theme {
28
- --spectrum-global-animation-duration-100: 50ms;
29
- --spectrum-global-animation-duration-200: 50ms;
30
- --spectrum-global-animation-duration-300: 50ms;
31
- --spectrum-global-animation-duration-400: 50ms;
32
- --spectrum-global-animation-duration-500: 50ms;
33
- --spectrum-global-animation-duration-600: 50ms;
34
- --spectrum-global-animation-duration-700: 50ms;
35
- --spectrum-global-animation-duration-800: 50ms;
36
- --spectrum-global-animation-duration-900: 50ms;
37
- --spectrum-global-animation-duration-1000: 50ms;
38
- --spectrum-global-animation-duration-2000: 50ms;
39
- --spectrum-global-animation-duration-4000: 50ms;
40
- --spectrum-animation-duration-0: 50ms;
41
- --spectrum-animation-duration-100: 50ms;
42
- --spectrum-animation-duration-200: 50ms;
43
- --spectrum-animation-duration-300: 50ms;
44
- --spectrum-animation-duration-400: 50ms;
45
- --spectrum-animation-duration-500: 50ms;
46
- --spectrum-animation-duration-600: 50ms;
47
- --spectrum-animation-duration-700: 50ms;
48
- --spectrum-animation-duration-800: 50ms;
49
- --spectrum-animation-duration-900: 50ms;
50
- --spectrum-animation-duration-1000: 50ms;
51
- --spectrum-animation-duration-2000: 50ms;
52
- --spectrum-animation-duration-4000: 50ms;
53
- --spectrum-coachmark-animation-indicator-ring-duration: 50ms;
54
- --swc-test-duration: 1ms;
55
- }
56
- </style>
57
- </sp-theme>
58
- `);
59
- document.documentElement.dir = dir;
60
- return test.children[0];
61
- }
62
20
  describe("Submenu", () => {
63
21
  it("selects - pointer", async () => {
64
22
  const rootChanged = spy();
65
23
  const submenuChanged = spy();
66
- const el = await styledFixture(
24
+ const el = await fixture(
67
25
  html`
68
26
  <sp-menu
69
27
  @change=${(event) => {
@@ -99,7 +57,7 @@ describe("Submenu", () => {
99
57
  const rootItemBoundingRect = rootItem.getBoundingClientRect();
100
58
  expect(rootItem.open).to.be.false;
101
59
  const opened = oneEvent(rootItem, "sp-opened");
102
- sendMouse({
60
+ await sendMouse({
103
61
  steps: [
104
62
  {
105
63
  type: "move",
@@ -115,7 +73,7 @@ describe("Submenu", () => {
115
73
  const item2 = document.querySelector(".submenu-item-2");
116
74
  const item2BoundingRect = item2.getBoundingClientRect();
117
75
  const closed = oneEvent(rootItem, "sp-closed");
118
- sendMouse({
76
+ await sendMouse({
119
77
  steps: [
120
78
  {
121
79
  type: "click",
@@ -127,14 +85,17 @@ describe("Submenu", () => {
127
85
  ]
128
86
  });
129
87
  await closed;
130
- expect(submenuChanged.withArgs("Two").calledOnce, "submenu changed").to.be.true;
88
+ expect(
89
+ submenuChanged.withArgs("Two").calledOnce,
90
+ `submenu changed ${submenuChanged.callCount} times`
91
+ ).to.be.true;
131
92
  expect(rootChanged.withArgs("Has submenu").calledOnce, "root changed").to.be.true;
132
93
  });
133
94
  it("closes deep tree on selection", async function() {
134
95
  const rootChanged = spy();
135
96
  const submenuChanged = spy();
136
97
  const subSubmenuChanged = spy();
137
- const el = await styledFixture(
98
+ const el = await fixture(
138
99
  html`
139
100
  <sp-menu
140
101
  @change=${(event) => {
@@ -185,7 +146,7 @@ describe("Submenu", () => {
185
146
  const itemC = document.querySelector(".sub-submenu-item-3");
186
147
  expect(rootItem.open).to.be.false;
187
148
  let opened = oneEvent(rootItem, "sp-opened");
188
- sendMouse({
149
+ await sendMouse({
189
150
  steps: [
190
151
  {
191
152
  type: "move",
@@ -200,7 +161,7 @@ describe("Submenu", () => {
200
161
  expect(rootItem.open).to.be.true;
201
162
  const item2BoundingRect = item2.getBoundingClientRect();
202
163
  opened = oneEvent(item2, "sp-opened");
203
- sendMouse({
164
+ await sendMouse({
204
165
  steps: [
205
166
  {
206
167
  type: "move",
@@ -247,7 +208,7 @@ describe("Submenu", () => {
247
208
  var _a, _b;
248
209
  const rootChanged = spy();
249
210
  const submenuChanged = spy();
250
- const el = await styledFixture(
211
+ const el = await fixture(
251
212
  html`
252
213
  <sp-menu
253
214
  id="base"
@@ -334,7 +295,7 @@ describe("Submenu", () => {
334
295
  });
335
296
  });
336
297
  it("closes on `pointerleave`", async () => {
337
- const el = await styledFixture(
298
+ const el = await fixture(
338
299
  html`
339
300
  <sp-menu>
340
301
  <sp-menu-item class="root">
@@ -359,7 +320,7 @@ describe("Submenu", () => {
359
320
  const rootItemBoundingRect = rootItem.getBoundingClientRect();
360
321
  expect(rootItem.open).to.be.false;
361
322
  const opened = oneEvent(rootItem, "sp-opened");
362
- sendMouse({
323
+ await sendMouse({
363
324
  steps: [
364
325
  {
365
326
  type: "move",
@@ -373,7 +334,7 @@ describe("Submenu", () => {
373
334
  await opened;
374
335
  expect(rootItem.open).to.be.true;
375
336
  const closed = oneEvent(rootItem, "sp-closed");
376
- sendMouse({
337
+ await sendMouse({
377
338
  steps: [
378
339
  {
379
340
  type: "move",
@@ -388,7 +349,7 @@ describe("Submenu", () => {
388
349
  expect(rootItem.open).to.be.false;
389
350
  });
390
351
  it("stays open when mousing off menu item and back again", async () => {
391
- const el = await styledFixture(
352
+ const el = await fixture(
392
353
  html`
393
354
  <sp-menu>
394
355
  <sp-menu-item class="root">
@@ -449,7 +410,7 @@ describe("Submenu", () => {
449
410
  await opened;
450
411
  expect(rootItem.open).to.be.true;
451
412
  const closed = oneEvent(rootItem, "sp-closed");
452
- sendMouse({
413
+ await sendMouse({
453
414
  steps: [
454
415
  {
455
416
  type: "move",
@@ -464,7 +425,7 @@ describe("Submenu", () => {
464
425
  });
465
426
  it("continues to open when mousing between menu item and submenu", async function() {
466
427
  const clickSpy = spy();
467
- const el = await styledFixture(
428
+ const el = await fixture(
468
429
  html`
469
430
  <sp-menu>
470
431
  <sp-menu-item class="root">
@@ -529,7 +490,7 @@ describe("Submenu", () => {
529
490
  await aTimeout(150);
530
491
  expect(rootItem.open).to.be.true;
531
492
  const closed = oneEvent(rootItem, "sp-closed");
532
- sendMouse({
493
+ await sendMouse({
533
494
  steps: [
534
495
  {
535
496
  type: "click",
@@ -545,7 +506,7 @@ describe("Submenu", () => {
545
506
  });
546
507
  it("stays open when mousing between menu item and submenu", async () => {
547
508
  const clickSpy = spy();
548
- const el = await styledFixture(
509
+ const el = await fixture(
549
510
  html`
550
511
  <sp-menu>
551
512
  <sp-menu-item class="root">
@@ -605,7 +566,7 @@ describe("Submenu", () => {
605
566
  await aTimeout(150);
606
567
  expect(rootItem.open).to.be.true;
607
568
  const closed = oneEvent(rootItem, "sp-closed");
608
- sendMouse({
569
+ await sendMouse({
609
570
  steps: [
610
571
  {
611
572
  type: "click",
@@ -620,7 +581,7 @@ describe("Submenu", () => {
620
581
  expect(clickSpy.callCount).to.equal(1);
621
582
  });
622
583
  it("not opens if disabled", async () => {
623
- const el = await styledFixture(
584
+ const el = await fixture(
624
585
  html`
625
586
  <sp-menu>
626
587
  <sp-menu-item disabled class="root">
@@ -644,7 +605,7 @@ describe("Submenu", () => {
644
605
  const rootItem = el.querySelector(".root");
645
606
  const rootItemBoundingRect = rootItem.getBoundingClientRect();
646
607
  expect(rootItem.open).to.be.false;
647
- sendMouse({
608
+ await sendMouse({
648
609
  steps: [
649
610
  {
650
611
  type: "move",
@@ -659,7 +620,7 @@ describe("Submenu", () => {
659
620
  expect(rootItem.open).to.be.false;
660
621
  });
661
622
  it("closes all decendent submenus when closing a ancestor menu", async () => {
662
- const el = await styledFixture(html`
623
+ const el = await fixture(html`
663
624
  <sp-action-menu>
664
625
  <sp-icon-show-menu slot="icon"></sp-icon-show-menu>
665
626
  <sp-menu-group role="none" id="group">
@@ -729,7 +690,7 @@ describe("Submenu", () => {
729
690
  await rootMenu2Opened;
730
691
  });
731
692
  it("closes back to the first overlay without a `root` when clicking away", async function() {
732
- const el = await styledFixture(html`
693
+ const el = await fixture(html`
733
694
  <sp-action-menu>
734
695
  <sp-icon-show-menu slot="icon"></sp-icon-show-menu>
735
696
  <sp-menu-group role="none">
@@ -790,7 +751,7 @@ describe("Submenu", () => {
790
751
  oneEvent(rootMenu1, "sp-closed"),
791
752
  oneEvent(el, "sp-closed")
792
753
  ]);
793
- sendMouse({
754
+ await sendMouse({
794
755
  steps: [
795
756
  {
796
757
  type: "click",
@@ -801,7 +762,7 @@ describe("Submenu", () => {
801
762
  await closed;
802
763
  });
803
764
  it("closes decendent menus when Menu Item in ancestor without a submenu is pointerentered", async () => {
804
- const el = await styledFixture(html`
765
+ const el = await fixture(html`
805
766
  <sp-action-menu>
806
767
  <sp-icon-show-menu slot="icon"></sp-icon-show-menu>
807
768
  <sp-menu-group role="none">
@@ -849,7 +810,7 @@ describe("Submenu", () => {
849
810
  await closed;
850
811
  });
851
812
  it("closes decendent menus when Menu Item in ancestor is clicked", async function() {
852
- const el = await styledFixture(html`
813
+ const el = await fixture(html`
853
814
  <sp-action-menu>
854
815
  <sp-icon-show-menu slot="icon"></sp-icon-show-menu>
855
816
  <sp-menu-group role="none">
@@ -891,6 +852,7 @@ describe("Submenu", () => {
891
852
  </sp-action-menu>
892
853
  `);
893
854
  await nextFrame();
855
+ await nextFrame();
894
856
  const rootMenu1 = el.querySelector("#submenu-item-1");
895
857
  const childMenu2 = el.querySelector("#submenu-item-2");
896
858
  const ancestorItem = el.querySelector("#ancestor-item");
@@ -940,7 +902,7 @@ describe("Submenu", () => {
940
902
  }
941
903
  ]
942
904
  });
943
- const el = await styledFixture(
905
+ const el = await fixture(
944
906
  html`
945
907
  <sp-menu>
946
908
  <sp-menu-item class="root-1">
@@ -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 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/overlay/sp-overlay.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=\"light\">\n ${story}\n <style>\n sp-theme {\n --spectrum-global-animation-duration-100: 50ms;\n --spectrum-global-animation-duration-200: 50ms;\n --spectrum-global-animation-duration-300: 50ms;\n --spectrum-global-animation-duration-400: 50ms;\n --spectrum-global-animation-duration-500: 50ms;\n --spectrum-global-animation-duration-600: 50ms;\n --spectrum-global-animation-duration-700: 50ms;\n --spectrum-global-animation-duration-800: 50ms;\n --spectrum-global-animation-duration-900: 50ms;\n --spectrum-global-animation-duration-1000: 50ms;\n --spectrum-global-animation-duration-2000: 50ms;\n --spectrum-global-animation-duration-4000: 50ms;\n --spectrum-animation-duration-0: 50ms;\n --spectrum-animation-duration-100: 50ms;\n --spectrum-animation-duration-200: 50ms;\n --spectrum-animation-duration-300: 50ms;\n --spectrum-animation-duration-400: 50ms;\n --spectrum-animation-duration-500: 50ms;\n --spectrum-animation-duration-600: 50ms;\n --spectrum-animation-duration-700: 50ms;\n --spectrum-animation-duration-800: 50ms;\n --spectrum-animation-duration-900: 50ms;\n --spectrum-animation-duration-1000: 50ms;\n --spectrum-animation-duration-2000: 50ms;\n --spectrum-animation-duration-4000: 50ms;\n --spectrum-coachmark-animation-indicator-ring-duration: 50ms;\n --swc-test-duration: 1ms;\n }\n </style>\n </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 await nextFrame();\n await nextFrame();\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\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('closes deep tree on selection', async function () {\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 const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const itemC = document.querySelector('.sub-submenu-item-3') as MenuItem;\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\n expect(rootItem.open).to.be.true;\n\n const item2BoundingRect = item2.getBoundingClientRect();\n\n opened = oneEvent(item2, 'sp-opened');\n // Move to the submenu item to open a submenu\n sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(item2.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n // click to select and close\n const itemCBoundingRect = itemC.getBoundingClientRect();\n await 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\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 function () {\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 const submenuItem = el.querySelector('.submenu-item-2') 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 await sendKeys({\n press: testData.openKey,\n });\n await opened;\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 await sendKeys({\n press: testData.closeKey,\n });\n await closed;\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 await 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 await elementUpdated(submenu);\n await elementUpdated(submenuItem);\n\n expect(submenu.getAttribute('aria-activedescendant')).to.equal(\n submenuItem.id\n );\n\n closed = oneEvent(rootItem, 'sp-closed');\n await sendKeys({\n press: 'Enter',\n });\n await closed;\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('continues to open when mousing between menu item and submenu', async function () {\n const clickSpy = spy();\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\n class=\"submenu-item-2\"\n @click=${() => clickSpy()}\n >\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 subItem = el.querySelector('.submenu-item-2') 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 // Wait for the overlay system to position the submenu before measuring it's position and moving to it.\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n const subItemBoundingRect = subItem.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n expect(rootItem.open).to.be.true;\n // Ensure it _doesn't_ get closed.\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(clickSpy.callCount).to.equal(1);\n });\n it('stays open when mousing between menu item and submenu', async () => {\n const clickSpy = spy();\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\n class=\"submenu-item-2\"\n @click=${() => clickSpy()}\n >\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 subItem = el.querySelector('.submenu-item-2') 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 opened;\n await nextFrame();\n await nextFrame();\n const subItemBoundingRect = subItem.getBoundingClientRect();\n expect(rootItem.open).to.be.true;\n\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n expect(rootItem.open).to.be.true;\n // Ensure it _doesn't_ get closed.\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(clickSpy.callCount).to.equal(1);\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\" id=\"group\">\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\" id=\"submenu-1\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\" id=\"submenu-2\">\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\" id=\"submenu-3\">\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 rootMenu2 = el.querySelector('#submenu-item-3') as MenuItem;\n const childMenu2 = el.querySelector('#submenu-item-2') 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 expect(rootMenu1.open).to.be.true;\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n expect(childMenu2.open).to.be.true;\n\n const childMenu2Closed = oneEvent(childMenu2, 'sp-closed');\n const rootMenu1Closed = oneEvent(rootMenu1, 'sp-closed');\n const rootMenu2Opened = oneEvent(rootMenu2, 'sp-opened');\n rootMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await childMenu2Closed;\n await rootMenu1Closed;\n await rootMenu2Opened;\n });\n\n it('closes back to the first overlay without a `root` when clicking away', async function () {\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 function () {\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 const rect = ancestorItem.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n rect.left + rect.width / 2,\n rect.top + rect.height / 2,\n ],\n },\n ],\n });\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: [1, 1],\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;AAA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;AAAA,MACJ;AAAA,IACJ,CAAC;AAED,UAAM,UAAU;AAAA,MACZ,OAAO;AAAA,QACH;AAAA,UACI,MAAM;AAAA,UACN,UAAU;AAAA,YACN,sBAAsB,OAClB,sBAAsB,QAAQ;AAAA,YAClC,sBAAsB,MAClB,sBAAsB,SAAS;AAAA,UACvC;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,CAAC;AACD,UAAM,UAAU;AAChB,UAAM,UAAU;AAChB,UAAM,UAAU;AAChB,UAAM,UAAU;AAChB,UAAM,UAAU;AAChB,UAAM,UAAU;AAChB,UAAM,SAAS,SAAS,WAAW,WAAW;AAE9C,UAAM,UAAU;AAAA,MACZ,OAAO;AAAA,QACH;AAAA,UACI,MAAM;AAAA,UACN,UAAU;AAAA,YACN,sBAAsB,OAClB,sBAAsB,QAAQ;AAAA,YAClC,sBAAsB,MAClB,sBAAsB,SAAS;AAAA,UACvC;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,CAAC;AACD,UAAM;AAEN,WAAO,UAAU,MAAM,kBAAkB,EAAE,GAAG,GAAG;AACjD,WAAO,UAAU,MAAM,kBAAkB,EAAE,GAAG,GAAG;AAAA,EACrD,CAAC;AACL,CAAC;",
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 html,\n nextFrame,\n oneEvent,\n} from '@open-wc/testing';\nimport { fixture } from '../../../test/testing-helpers.js';\nimport { sendMouse } from '../../../test/plugins/browser.js';\nimport { spy } from 'sinon';\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/overlay/sp-overlay.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-show-menu.js';\n\ndescribe('Submenu', () => {\n it('selects - pointer', async () => {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await fixture<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 await nextFrame();\n await nextFrame();\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 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 await 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\n expect(\n submenuChanged.withArgs('Two').calledOnce,\n `submenu changed ${submenuChanged.callCount} times`\n ).to.be.true;\n expect(rootChanged.withArgs('Has submenu').calledOnce, 'root changed')\n .to.be.true;\n });\n it('closes deep tree on selection', async function () {\n const rootChanged = spy();\n const submenuChanged = spy();\n const subSubmenuChanged = spy();\n const el = await fixture<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 const rootItem = el.querySelector('.root') as MenuItem;\n const rootItemBoundingRect = rootItem.getBoundingClientRect();\n const item2 = document.querySelector('.submenu-item-2') as MenuItem;\n const itemC = document.querySelector('.sub-submenu-item-3') as MenuItem;\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 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 item2BoundingRect = item2.getBoundingClientRect();\n\n opened = oneEvent(item2, 'sp-opened');\n // Move to the submenu item to open a submenu\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n item2BoundingRect.left + item2BoundingRect.width / 2,\n item2BoundingRect.top + item2BoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n\n expect(item2.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n // click to select and close\n const itemCBoundingRect = itemC.getBoundingClientRect();\n await 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\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 function () {\n const rootChanged = spy();\n const submenuChanged = spy();\n const el = await fixture<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 const submenuItem = el.querySelector('.submenu-item-2') 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 await sendKeys({\n press: testData.openKey,\n });\n await opened;\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 await sendKeys({\n press: testData.closeKey,\n });\n await closed;\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 await 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 await elementUpdated(submenu);\n await elementUpdated(submenuItem);\n\n expect(submenu.getAttribute('aria-activedescendant')).to.equal(\n submenuItem.id\n );\n\n closed = oneEvent(rootItem, 'sp-closed');\n await sendKeys({\n press: 'Enter',\n });\n await closed;\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 fixture<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 opened;\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\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 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 fixture<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 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 closed;\n });\n it('continues to open when mousing between menu item and submenu', async function () {\n const clickSpy = spy();\n const el = await fixture<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\n class=\"submenu-item-2\"\n @click=${() => clickSpy()}\n >\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 subItem = el.querySelector('.submenu-item-2') 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 // Wait for the overlay system to position the submenu before measuring it's position and moving to it.\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n await nextFrame();\n const subItemBoundingRect = subItem.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await opened;\n expect(rootItem.open).to.be.true;\n // Ensure it _doesn't_ get closed.\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n await sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(clickSpy.callCount).to.equal(1);\n });\n it('stays open when mousing between menu item and submenu', async () => {\n const clickSpy = spy();\n const el = await fixture<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\n class=\"submenu-item-2\"\n @click=${() => clickSpy()}\n >\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 subItem = el.querySelector('.submenu-item-2') 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 opened;\n await nextFrame();\n await nextFrame();\n const subItemBoundingRect = subItem.getBoundingClientRect();\n expect(rootItem.open).to.be.true;\n\n await sendMouse({\n steps: [\n {\n type: 'move',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n expect(rootItem.open).to.be.true;\n // Ensure it _doesn't_ get closed.\n await aTimeout(150);\n\n expect(rootItem.open).to.be.true;\n\n const closed = oneEvent(rootItem, 'sp-closed');\n await sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n subItemBoundingRect.left +\n subItemBoundingRect.width / 2,\n subItemBoundingRect.top +\n subItemBoundingRect.height / 2,\n ],\n },\n ],\n });\n await closed;\n\n expect(clickSpy.callCount).to.equal(1);\n });\n it('not opens if disabled', async () => {\n const el = await fixture<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 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 // 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 fixture<ActionMenu>(html`\n <sp-action-menu>\n <sp-icon-show-menu slot=\"icon\"></sp-icon-show-menu>\n <sp-menu-group role=\"none\" id=\"group\">\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\" id=\"submenu-1\">\n <sp-menu-item id=\"submenu-item-2\">\n Ft. Greene\n <sp-menu slot=\"submenu\" id=\"submenu-2\">\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\" id=\"submenu-3\">\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 rootMenu2 = el.querySelector('#submenu-item-3') as MenuItem;\n const childMenu2 = el.querySelector('#submenu-item-2') 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 expect(rootMenu1.open).to.be.true;\n\n opened = oneEvent(childMenu2, 'sp-opened');\n childMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await opened;\n expect(childMenu2.open).to.be.true;\n\n const childMenu2Closed = oneEvent(childMenu2, 'sp-closed');\n const rootMenu1Closed = oneEvent(rootMenu1, 'sp-closed');\n const rootMenu2Opened = oneEvent(rootMenu2, 'sp-opened');\n rootMenu2.dispatchEvent(\n new PointerEvent('pointerenter', { bubbles: true })\n );\n await childMenu2Closed;\n await rootMenu1Closed;\n await rootMenu2Opened;\n });\n\n it('closes back to the first overlay without a `root` when clicking away', async function () {\n const el = await fixture<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 await 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 fixture<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 function () {\n const el = await fixture<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 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 const rect = ancestorItem.getBoundingClientRect();\n await sendMouse({\n steps: [\n {\n type: 'click',\n position: [\n rect.left + rect.width / 2,\n rect.top + rect.height / 2,\n ],\n },\n ],\n });\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: [1, 1],\n },\n ],\n });\n const el = await fixture<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,OACG;AACP,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,WAAW;AACpB,SAAS,gBAAgB;AAEzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAEP,SAAS,WAAW,MAAM;AACtB,KAAG,qBAAqB,YAAY;AAChC,UAAM,cAAc,IAAI;AACxB,UAAM,iBAAiB,IAAI;AAC3B,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA,8BAEkB,CAAC,UAAoC;AAC3C,oBAAY,MAAM,OAAO,KAAK;AAAA,MAClC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAMiB,CAAC,UAAoC;AAC3C,uBAAe,MAAM,OAAO,KAAK;AAAA,MACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAerB;AAEA,UAAM,eAAe,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