test(ui) : fiabiliser la suite Vitest (3 tests SelectCheckbox + flaky)

- SelectCheckbox : 3 tests cliquaient setValue() sur la checkbox (event change),
  mais depuis MUI-42 le toggle se fait au clic sur la ligne d'option
  (checkbox en pointer-events-none) -> on clique la ligne. Echec deterministe corrige.
- vitest.config : testTimeout 15000 (absorbe la contention CPU des 12 workers jsdom)
  + retry 2 (rejoue les flaky de timing diffus sur focus/popover/async).
- Suite : 4 runs pleine charge -> 975/975 a chaque fois.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-11 17:43:03 +02:00
parent 9f9723d01c
commit 437d0ecf62
2 changed files with 17 additions and 6 deletions
@@ -68,8 +68,9 @@ describe('MalioSelectCheckbox', () => {
})
await wrapper.get('button').trigger('click')
const checkboxInputs = wrapper.findAll('input[type="checkbox"]')
await checkboxInputs[1].setValue(true)
// Le toggle se fait au clic sur la ligne d'option (la checkbox est en pointer-events-none).
const optionRows = wrapper.findAll('li[role="option"]')
await optionRows[1].trigger('click')
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([['fr', 'be']])
})
@@ -149,8 +150,9 @@ describe('MalioSelectCheckbox', () => {
await wrapper.get('button').trigger('click')
const checkboxes = wrapper.findAll('input[type="checkbox"]')
await checkboxes[0].setValue(true)
// La ligne « tout sélectionner » est la première option de la liste.
const selectAllRow = wrapper.findAll('li[role="option"]')[0]
await selectAllRow.trigger('click')
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([['fr', 'be', 'ca']])
})
@@ -162,8 +164,9 @@ describe('MalioSelectCheckbox', () => {
await wrapper.get('button').trigger('click')
const checkboxes = wrapper.findAll('input[type="checkbox"]')
await checkboxes[0].setValue(false)
// La ligne « tout sélectionner » est la première option de la liste.
const selectAllRow = wrapper.findAll('li[role="option"]')[0]
await selectAllRow.trigger('click')
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([[]])
})