feat(ui) : required cohérent + astérisque label + sanitisation email (MUI-41) #60

Merged
tristan merged 51 commits from feature/MUI-41-props-required-asterisque-dans-le-label-sur-les-co into develop 2026-06-04 06:42:20 +00:00
3 changed files with 44 additions and 0 deletions
Showing only changes of commit 6b1e11bd6f - Show all commits
@@ -156,6 +156,18 @@ describe('MalioInputRichText', () => {
expect(editorContent.attributes('aria-describedby')).toBe('rt-aria-describedby')
})
it('expose aria-required quand required est vrai', async () => {
const wrapper = await mountComponent({required: true})
expect(wrapper.find('[aria-required="true"]').exists()).toBe(true)
})
it('n\'expose pas aria-required par défaut', async () => {
const wrapper = await mountComponent()
expect(wrapper.find('[aria-required="true"]').exists()).toBe(false)
})
it('renders initial markdown content visually', async () => {
const wrapper = await mountComponent({modelValue: '## Mon titre\n\nUn paragraphe.'})
@@ -277,6 +277,22 @@ describe('MalioSelect', () => {
expect(wrapper.find('[data-test="required-mark"]').exists()).toBe(false)
})
it('expose aria-required quand required est vrai', () => {
const wrapper = mount(SelectForTest, {
props: {modelValue: null, options, required: true},
})
expect(wrapper.find('[aria-required="true"]').exists()).toBe(true)
})
it('n\'expose pas aria-required par défaut', () => {
const wrapper = mount(SelectForTest, {
props: {modelValue: null, options},
})
expect(wrapper.find('[aria-required="true"]').exists()).toBe(false)
})
it('keeps the bottom border allocation when open downward (transparent, not zero)', async () => {
const wrapper = mount(SelectForTest, {
props: {modelValue: null, options},
@@ -252,6 +252,22 @@ describe('MalioSelectCheckbox', () => {
expect(wrapper.find('[data-test="required-mark"]').exists()).toBe(false)
})
it('expose aria-required quand required est vrai', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: [], options, required: true},
})
expect(wrapper.find('[aria-required="true"]').exists()).toBe(true)
})
it('n\'expose pas aria-required par défaut', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: [], options},
})
expect(wrapper.find('[aria-required="true"]').exists()).toBe(false)
})
it('keeps the bottom border allocation when open downward (transparent, not zero)', async () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: [], options},