From 120020b210feaf6058c6b0e2ee99095d34ce5714 Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 3 Jun 2026 11:45:48 +0200 Subject: [PATCH] =?UTF-8?q?feat(ui):=20ast=C3=A9risque=20required=20dans?= =?UTF-8?q?=20le=20label=20de=20la=20famille=20formulaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- app/components/malio/checkbox/Checkbox.test.ts | 10 ++++++++++ app/components/malio/checkbox/Checkbox.vue | 3 ++- app/components/malio/date/Date.test.ts | 10 ++++++++++ app/components/malio/date/internal/CalendarField.vue | 3 ++- app/components/malio/input/Input.test.ts | 10 ++++++++++ app/components/malio/input/InputAmount.test.ts | 10 ++++++++++ app/components/malio/input/InputAmount.vue | 3 ++- app/components/malio/input/InputAutocomplete.test.ts | 10 ++++++++++ app/components/malio/input/InputAutocomplete.vue | 3 ++- app/components/malio/input/InputEmail.test.ts | 10 ++++++++++ app/components/malio/input/InputEmail.vue | 3 ++- app/components/malio/input/InputNumber.test.ts | 11 +++++++++++ app/components/malio/input/InputNumber.vue | 3 ++- app/components/malio/input/InputPassword.test.ts | 10 ++++++++++ app/components/malio/input/InputPassword.vue | 3 ++- app/components/malio/input/InputPhone.test.ts | 10 ++++++++++ app/components/malio/input/InputPhone.vue | 3 ++- app/components/malio/input/InputText.vue | 3 ++- app/components/malio/input/InputTextArea.test.ts | 10 ++++++++++ app/components/malio/input/InputTextArea.vue | 3 ++- app/components/malio/radio/RadioButton.test.ts | 10 ++++++++++ app/components/malio/radio/RadioButton.vue | 3 ++- app/components/malio/time/Time.test.ts | 10 ++++++++++ app/components/malio/time/Time.vue | 3 ++- app/components/malio/time/TimePicker.test.ts | 10 ++++++++++ app/components/malio/time/TimePicker.vue | 3 ++- 26 files changed, 157 insertions(+), 13 deletions(-) diff --git a/app/components/malio/checkbox/Checkbox.test.ts b/app/components/malio/checkbox/Checkbox.test.ts index 0f27fa1..c291ced 100644 --- a/app/components/malio/checkbox/Checkbox.test.ts +++ b/app/components/malio/checkbox/Checkbox.test.ts @@ -161,4 +161,14 @@ describe('MalioCheckbox', () => { expect(wrapper.get('label').classes()).toContain('text-black') }) + + it('affiche l\'astérisque quand required est vrai', () => { + const wrapper = mountCheckbox({label: 'Champ', required: true}) + expect(wrapper.find('[data-test="required-mark"]').exists()).toBe(true) + }) + + it('n\'affiche pas l\'astérisque par défaut', () => { + const wrapper = mountCheckbox({label: 'Champ'}) + expect(wrapper.find('[data-test="required-mark"]').exists()).toBe(false) + }) }) diff --git a/app/components/malio/checkbox/Checkbox.vue b/app/components/malio/checkbox/Checkbox.vue index a5ee3df..b4de360 100644 --- a/app/components/malio/checkbox/Checkbox.vue +++ b/app/components/malio/checkbox/Checkbox.vue @@ -25,7 +25,7 @@ - {{ label }} + {{ label }} @@ -41,6 +41,7 @@