test(ui): characterize shared migration surfaces

This commit is contained in:
Yuneng Jiang 2026-08-12 13:52:14 -07:00
parent 0e9da56f89
commit 2569c27a91
No known key found for this signature in database

View file

@ -1,7 +1,6 @@
import { screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, it, vi, MockedFunction } from "vitest";
import { renderWithProviders } from "../../../tests/test-utils";
import { renderWithProviders, screen, waitFor, within } from "../../../tests/test-utils";
import { TeamVirtualKeysTable } from "./TeamVirtualKeysTable";
import { KeysResponse, useKeys } from "@/app/(dashboard)/hooks/keys/useKeys";
import { KeyResponse } from "../key_team_helpers/key_list";
@ -264,7 +263,7 @@ describe("TeamVirtualKeysTable", () => {
await user.click(await screen.findByTestId("datatable-filters-trigger"));
const drawerBody = await screen.findByTestId("filter-drawer-body");
const userInput = drawerBody.querySelector("input") as HTMLElement;
const userInput = within(drawerBody).getByPlaceholderText("Filter by user ID…");
await user.type(userInput, "user-42");
await user.click(screen.getByTestId("filter-drawer-apply"));