fix(ui) : readonly InputUpload — drop peer-focus float + idiome grow-height/cursor
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
import {describe, expect, it, vi} from 'vitest'
|
||||
import {mount} from '@vue/test-utils'
|
||||
import type {DefineComponent} from 'vue'
|
||||
import { Icon as IconifyIcon } from '@iconify/vue'
|
||||
@@ -230,9 +230,9 @@ describe('MalioInputUpload', () => {
|
||||
|
||||
it('readonly empêche l\'ouverture du sélecteur de fichier', async () => {
|
||||
const wrapper = mountComponent({label: 'Champ', readonly: true})
|
||||
// openFilePicker doit être un no-op : cliquer le champ ne déclenche pas l'input file caché.
|
||||
// Vérifie au minimum que le champ visible reste readonly et qu'aucune erreur n'est levée.
|
||||
const fileInput = wrapper.get('input[type="file"]').element as HTMLInputElement
|
||||
const clickSpy = vi.spyOn(fileInput, 'click')
|
||||
await wrapper.get('input[type="text"]').trigger('click')
|
||||
expect(wrapper.get('input[type="text"]').attributes('readonly')).toBeDefined()
|
||||
expect(clickSpy).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user