Skip to content

Commit

Permalink
getByRole is slow on large trees, use getByText (#29331)
Browse files Browse the repository at this point in the history
  • Loading branch information
langleyd authored Feb 21, 2025
1 parent 22943ee commit d8904a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe("AddRemoveThreepids", () => {

const countryDropdown = await screen.findByRole("button", { name: /Country Dropdown/ });
await userEvent.click(countryDropdown);
const gbOption = screen.getByRole("option", { name: "🇬🇧 United Kingdom (+44)" });
const gbOption = screen.getByText("United Kingdom (+44)");
await userEvent.click(gbOption);

const input = screen.getByRole("textbox", { name: "Phone Number" });
Expand Down Expand Up @@ -511,7 +511,7 @@ describe("AddRemoveThreepids", () => {

const countryDropdown = screen.getByRole("button", { name: /Country Dropdown/ });
await userEvent.click(countryDropdown);
const gbOption = screen.getByRole("option", { name: "🇬🇧 United Kingdom (+44)" });
const gbOption = screen.getByText("United Kingdom (+44)");
await userEvent.click(gbOption);

const input = screen.getByRole("textbox", { name: "Phone Number" });
Expand Down

0 comments on commit d8904a6

Please sign in to comment.