Skip to content

Commit

Permalink
Fix opt-group e2e tests false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
Xon committed Sep 5, 2024
1 parent 93531ab commit 8a12d5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions test-e2e/tests/select-multiple.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,10 @@ describe(`Choices - select multiple`, () => {
await suite.startWithClick();

await expect(suite.dropdown.locator('.choices__group[data-group]')).toHaveCount(1);
expect(
await suite.selectableChoices.filter({ hasNot: page.locator('[data-group-id]') }).count(),
).toBeGreaterThan(0);
expect(await suite.dropdown.locator('.choices__item--choice[data-group-id]').count()).toEqual(1);
expect(await suite.dropdown.locator('.choices__item--choice:not([data-group-id])').count()).toBeGreaterThan(
1,
);
});
});
});
Expand Down
7 changes: 4 additions & 3 deletions test-e2e/tests/select-one.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,10 @@ describe(`Choices - select one`, () => {
await suite.startWithClick();

await expect(suite.dropdown.locator('.choices__group[data-group]')).toHaveCount(1);
expect(
await suite.selectableChoices.filter({ hasNot: page.locator('[data-group-id]') }).count(),
).toBeGreaterThan(0);
expect(await suite.dropdown.locator('.choices__item--choice[data-group-id]').count()).toEqual(1);
expect(await suite.dropdown.locator('.choices__item--choice:not([data-group-id])').count()).toBeGreaterThan(
1,
);
});
});
});
Expand Down

0 comments on commit 8a12d5c

Please sign in to comment.