Skip to content

Commit

Permalink
fix(web): make a test pass
Browse files Browse the repository at this point in the history
By looking for a hidden element and adding a FIXME to see what is making
the component to be hidden for the a11y API.
  • Loading branch information
dgdavid committed Jan 21, 2025
1 parent 8de854d commit 4192638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/product/LicenseDialog.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ describe("LicenseDialog", () => {
within(languageButton).getByText("Español");
await user.click(languageButton);
expect(languageButton).toHaveAttribute("aria-expanded", "true");
const languageFrenchOption = screen.getByRole("option", { name: "Français" });
// FIXME: the selector should not be hidden for the Accessiblity API
const languageFrenchOption = screen.getByRole("option", { name: "Français", hidden: true });
await user.click(languageFrenchOption);
expect(mockFetchLicense).toHaveBeenCalledWith(sle.license, "fr-FR");
within(languageButton).getByText("Français");
Expand Down

0 comments on commit 4192638

Please sign in to comment.