test: add a submenu shouldFocusWrap case to the consumer fixture
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user