fix : tag position
This commit is contained in:
@@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user