qc-trousse-sdg 1.4.8 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -461,6 +461,23 @@ test.describe('choix multiples', () => {
461
461
  await expect(page.locator('#qc-select-multiple-choices-input')).toContainText('Option 3, Option 4');
462
462
  });
463
463
 
464
+ test('manipulation externe de la valeur', {
465
+ tag: ['@multiple', '@dropdownlist'],
466
+ annotation: {
467
+ type: 'description',
468
+ description: 'Soit la liste déroulante Choix multiples, en changeant value à 1, alors option 1 est cochée.'
469
+ }
470
+ }, async ({page}) => {
471
+ // On ne manipule pas value directement sur l'élément select en slot en raison de limitations avec
472
+ // les éléments select multiple.
473
+ await page.locator('#qc-select-multiple-choices').evaluate((qcSelect: HTMLElement) => {
474
+ // @ts-ignore
475
+ qcSelect.value = ["1"];
476
+ });
477
+
478
+ await expect(page.locator('#select-multiple-choices > option[value="1"]')).toHaveAttribute("selected");
479
+ });
480
+
464
481
  test('choix multiples 2 clics par option', {
465
482
  tag: ['@multiple', '@dropdownlist'],
466
483
  annotation: {