Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

486 B
Raw Blame
import { screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { expect } from "vitest";

export async function selectOption(labelText: string, optionText: string) {
  const user = userEvent.setup({ delay: null });
  await user.click(screen.getByLabelText(labelText));

  const option = (await screen.findAllByRole("option")).find((el) => el.textContent?.includes(optionText));
  expect(option).toBeTruthy();
  await user.click(option!);
}