fix : tag position

This commit is contained in:
2026-03-13 16:04:15 +01:00
parent c96eafdb23
commit c445aee0ef
3 changed files with 56 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ type SelectCheckboxProps = {
textValue?: string
textLabel?: string
rounded?: string
displayTag?: boolean
disabled?: boolean
}
@@ -72,4 +73,23 @@ describe('MalioSelectCheckbox', () => {
expect(wrapper.text()).toContain('0/3')
})
it('hides the summary when displayTag is enabled and options are selected', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: ['fr', 'ca'], options, displayTag: true},
})
expect(wrapper.text()).not.toContain('2/3')
expect(wrapper.text()).toContain('France')
expect(wrapper.text()).toContain('Canada')
})
it('hides the summary when displayTag is enabled and nothing is selected', () => {
const wrapper = mount(SelectCheckboxForTest, {
props: {modelValue: [], options, displayTag: true, emptyOptionLabel: 'Aucune selection'},
})
expect(wrapper.text()).not.toContain('0/3')
expect(wrapper.text()).toContain('Aucune selection')
})
})