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

Loading…
Cancel
Save