diff --git a/tests/package/b01-consumer-app/main.js b/tests/package/b01-consumer-app/main.js index 3e4e7b8..ed5474f 100644 --- a/tests/package/b01-consumer-app/main.js +++ b/tests/package/b01-consumer-app/main.js @@ -177,6 +177,44 @@ const ModalCase = defineComponent({ }, }); +const WrapCase = defineComponent({ + name: "WrapCase", + setup() { + return () => + h("div", { "data-case": "wrap", class: "case" }, [ + h(DropdownRoot, { modal: false }, () => [ + h(DropdownTrigger, null, () => + h(Button, { "aria-label": "循环" }, () => "循环"), + ), + h(DropdownPopover, null, () => + h(DropdownMenu, null, () => + h(DropdownSubmenuTrigger, null, () => [ + h(DropdownItem, { id: "wrap-sub", textValue: "子菜单" }, () => [ + h(Label, null, () => "子菜单"), + h(DropdownSubmenuIndicator), + ]), + h(DropdownPopover, null, () => + h(DropdownMenu, { shouldFocusWrap: true }, () => [ + h( + DropdownItem, + { id: "wrap-first", textValue: "First" }, + () => h(Label, null, () => "First"), + ), + h( + DropdownItem, + { id: "wrap-last", textValue: "Last" }, + () => h(Label, null, () => "Last"), + ), + ]), + ), + ]), + ), + ), + ]), + ]); + }, +}); + const StandaloneCase = defineComponent({ name: "StandaloneCase", setup() { @@ -196,6 +234,7 @@ const cases = { submenu: SubmenuCase, modal: ModalCase, standalone: StandaloneCase, + wrap: WrapCase, }; const shown = only && cases[only] ? [cases[only]] : Object.values(cases);