getByRole is slow on large trees, use getByText (#29331)

This commit is contained in:
David Langley
2025-02-21 13:45:52 +00:00
committed by GitHub
parent 22943ee06a
commit d8904a6e56

View File

@@ -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" });
@@ -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" });