Browse Source

fix: fix PasswordInput test stubs for Vue Test Utils compatibility

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat/registration-page
npmrun 2 weeks ago
parent
commit
82d37e04b6
  1. 40
      app/components/register/__tests__/PasswordInput.test.ts

40
app/components/register/__tests__/PasswordInput.test.ts

@ -9,17 +9,17 @@ describe('PasswordInput', () => {
global: {
stubs: {
UInput: {
template: '<input :type="$attrs.type" :disabled="$attrs.disabled" :value="modelValue" @input="$emit(\'update:modelValue\', $event.target.value)" />',
template: '<input :type="type" :disabled="disabled" :value="modelValue" />',
props: ['type', 'disabled', 'modelValue', 'placeholder'],
},
UButton: {
template: '<button :disabled="$attrs.disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled'],
template: '<button :disabled="disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled', 'icon', 'variant', 'size'],
emits: ['click'],
},
UFormField: {
template: '<div><slot /></div>',
props: ['label'],
template: '<div><span>{{ label }}</span><slot /></div>',
props: ['label', 'required'],
},
},
},
@ -34,17 +34,17 @@ describe('PasswordInput', () => {
global: {
stubs: {
UInput: {
template: '<input :type="$attrs.type" :disabled="$attrs.disabled" :value="modelValue" @input="$emit(\'update:modelValue\', $event.target.value)" />',
template: '<input :type="type" :disabled="disabled" :value="modelValue" />',
props: ['type', 'disabled', 'modelValue', 'placeholder'],
},
UButton: {
template: '<button :disabled="$attrs.disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled'],
template: '<button :disabled="disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled', 'icon', 'variant', 'size'],
emits: ['click'],
},
UFormField: {
template: '<div><slot /></div>',
props: ['label'],
template: '<div><span>{{ label }}</span><slot /></div>',
props: ['label', 'required'],
},
},
},
@ -60,17 +60,17 @@ describe('PasswordInput', () => {
global: {
stubs: {
UInput: {
template: '<input :type="$attrs.type" :disabled="$attrs.disabled" :value="modelValue" @input="$emit(\'update:modelValue\', $event.target.value)" />',
template: '<input :type="type" :disabled="disabled" :value="modelValue" />',
props: ['type', 'disabled', 'modelValue', 'placeholder'],
},
UButton: {
template: '<button :disabled="$attrs.disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled'],
template: '<button :disabled="disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled', 'icon', 'variant', 'size'],
emits: ['click'],
},
UFormField: {
template: '<div><slot /></div>',
props: ['label'],
template: '<div><span>{{ label }}</span><slot /></div>',
props: ['label', 'required'],
},
},
},
@ -84,17 +84,17 @@ describe('PasswordInput', () => {
global: {
stubs: {
UInput: {
template: '<input :type="$attrs.type" :disabled="$attrs.disabled" :value="modelValue" @input="$emit(\'update:modelValue\', $event.target.value)" />',
template: '<input :type="type" :disabled="disabled" :value="modelValue" />',
props: ['type', 'disabled', 'modelValue', 'placeholder'],
},
UButton: {
template: '<button :disabled="$attrs.disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled'],
template: '<button :disabled="disabled" @click="$emit(\'click\')"><slot /></button>',
props: ['disabled', 'icon', 'variant', 'size'],
emits: ['click'],
},
UFormField: {
template: '<div><slot /></div>',
props: ['label'],
template: '<div><span>{{ label }}</span><slot /></div>',
props: ['label', 'required'],
},
},
},

Loading…
Cancel
Save