From 0dc4678c68e4b500be49c38336dc75b73843e38d Mon Sep 17 00:00:00 2001 From: Vachmara Date: Tue, 13 May 2025 14:02:02 +0200 Subject: [PATCH] fix(NavigationMenu): arrow position conflict (#4137) Co-authored-by: Benjamin Canac --- src/runtime/components/NavigationMenu.vue | 6 +- test/components/NavigationMenu.spec.ts | 10 +- .../NavigationMenu-vue.spec.ts.snap | 122 +++++++++--------- .../__snapshots__/NavigationMenu.spec.ts.snap | 122 +++++++++--------- 4 files changed, 132 insertions(+), 128 deletions(-) diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index 24251cc9..2264b3d0 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -43,6 +43,10 @@ export interface NavigationMenuItem extends Omit(() => { it.each([ // Props ['with items', { props }], - ['with modelValue', { props: { ...props, modelValue: '0' } }], + ['with modelValue', { props: { ...props, modelValue: 'item-0' } }], ['with labelKey', { props: { ...props, labelKey: 'icon' } }], - ['with arrow', { props: { ...props, arrow: true, modelValue: '0' } }], - ['with orientation vertical', { props: { ...props, orientation: 'vertical' as const, modelValue: '0' } }], - ['with orientation vertical and collapsed', { props: { ...props, orientation: 'vertical' as const, modelValue: '0', collapsed: true } }], - ['with content orientation vertical', { props: { ...props, contentOrientation: 'vertical' as const, modelValue: '0' } }], + ['with arrow', { props: { ...props, arrow: true, modelValue: 'item-0' } }], + ['with orientation vertical', { props: { ...props, orientation: 'vertical' as const, modelValue: 'item-0' } }], + ['with orientation vertical and collapsed', { props: { ...props, orientation: 'vertical' as const, modelValue: 'item-0', collapsed: true } }], + ['with content orientation vertical', { props: { ...props, contentOrientation: 'vertical' as const, modelValue: 'item-0' } }], ...variants.map((variant: string) => [`with primary variant ${variant}`, { props: { ...props, variant } }]), ...variants.map((variant: string) => [`with neutral variant ${variant}`, { props: { ...props, variant, color: 'neutral' } }]), ...variants.map((variant: string) => [`with primary variant ${variant} highlight`, { props: { ...props, variant, highlight: true } }]), diff --git a/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap b/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap index 9ccffd6f..fc4077de 100644 --- a/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap @@ -5,14 +5,14 @@ exports[`NavigationMenu > renders with arrow correctly 1`] = `
  • -
  • -
  • +
  • @@ -33,7 +33,7 @@ exports[`NavigationMenu > renders with arrow correctly 1`] = `
- @@ -54,7 +54,7 @@ exports[`NavigationMenu > renders with as correctly 1`] = `