fix: multi-select (#91)
Release / release (push) Successful in 53s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

---------

Co-authored-by: admin malio <malio@yuno.malio.fr>
Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr>
Reviewed-on: #91
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #91.
This commit is contained in:
2026-06-28 11:42:25 +00:00
committed by Autin
parent 2aded80971
commit 31eb941db0
5 changed files with 39 additions and 11 deletions
@@ -7,6 +7,7 @@ type Option = {
label: string
value: string | number
color?: string
textColor?: string
}
type SelectCheckboxProps = {
@@ -441,4 +442,23 @@ describe('MalioSelectCheckbox', () => {
expect(tag.classes()).toContain('bg-m-bg')
expect(tag.attributes('style')).toBeFalsy()
})
it('applique la couleur de texte fournie par loption', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: ['fr'], options: [{label: 'France', value: 'fr', textColor: '#ffffff'}], displayTag: true},
})
const tag = wrapper.findAll('span.inline-flex')[0]
expect(tag.attributes('style')).toContain('color')
})
it('napplique pas la couleur de texte custom en disabled (reste grisé)', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: ['fr'], options: [{label: 'France', value: 'fr', textColor: '#ffffff'}], displayTag: true, disabled: true},
})
const tag = wrapper.findAll('span.inline-flex')[0]
expect(tag.classes()).toContain('text-black/60')
expect(tag.attributes('style') ?? '').not.toContain('color')
})
})