feat: rewrite review queue as dense table

This commit is contained in:
afei A
2026-03-28 00:18:50 +08:00
parent 025ae31f9f
commit f2deb54f3a
4 changed files with 276 additions and 91 deletions

View File

@@ -36,7 +36,7 @@ afterEach(() => {
vi.unstubAllGlobals();
});
test("renders medium-density list rows that link into independent review detail pages", async () => {
test("renders a compact review queue table with triage columns", async () => {
const fetchMock = vi.fn().mockResolvedValue(
new Response(JSON.stringify(createPendingPayload()), {
status: 200,
@@ -50,13 +50,14 @@ test("renders medium-density list rows that link into independent review detail
render(<ReviewWorkbenchListScreen />);
expect(await screen.findByText("审核目标 #101")).toBeInTheDocument();
expect(screen.getByText(/工作流 wf-101/)).toBeInTheDocument();
expect(screen.getByText("Mock 资产")).toBeInTheDocument();
expect(screen.getByText("失败 2")).toBeInTheDocument();
expect(screen.queryByText("审核动作面板")).not.toBeInTheDocument();
expect(screen.getByRole("link", { name: /审核目标 #101/ })).toHaveAttribute(
expect(await screen.findByRole("columnheader", { name: "订单号" })).toBeInTheDocument();
expect(screen.getByRole("columnheader", { name: "修订状态" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "刷新队列" })).toBeInTheDocument();
expect(screen.getByRole("link", { name: "进入详情" })).toHaveAttribute(
"href",
"/reviews/workbench/101",
);
expect(screen.getByText("Mock 资产")).toBeInTheDocument();
expect(screen.getByText("失败 2")).toBeInTheDocument();
expect(screen.queryByText("审核动作面板")).not.toBeInTheDocument();
});