|
@@ -71,13 +71,13 @@ it("切换优先队列后可直接办理,返回时恢复队列筛选", async (
|
|
|
expect(screen.queryByRole("button", { name: "核对接入配置" })).toBeNull();
|
|
expect(screen.queryByRole("button", { name: "核对接入配置" })).toBeNull();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-it("在列表选中工单后更新预览,从详情返回时保留选中项", async () => {
|
|
|
|
|
|
|
+it("点击工单行的期限列可更新预览,从详情返回时保留选中项", async () => {
|
|
|
vi.mocked(ticketList).mockResolvedValue(results([fault, planned]));
|
|
vi.mocked(ticketList).mockResolvedValue(results([fault, planned]));
|
|
|
renderMine();
|
|
renderMine();
|
|
|
const other = await screen.findByRole("button", { name: "安排专线开通" });
|
|
const other = await screen.findByRole("button", { name: "安排专线开通" });
|
|
|
const preview = within(screen.getByRole("complementary", { name: "工单预览" }));
|
|
const preview = within(screen.getByRole("complementary", { name: "工单预览" }));
|
|
|
expect(preview.getByText("已超 1 天").closest("[data-late]")).toBeTruthy();
|
|
expect(preview.getByText("已超 1 天").closest("[data-late]")).toBeTruthy();
|
|
|
- fireEvent.click(other);
|
|
|
|
|
|
|
+ fireEvent.click(within(other.closest("tr")!).getByText("2026.12.02"));
|
|
|
expect(other.getAttribute("aria-pressed")).toBe("true");
|
|
expect(other.getAttribute("aria-pressed")).toBe("true");
|
|
|
expect(preview.getByRole("heading", { name: "安排专线开通" })).toBeTruthy();
|
|
expect(preview.getByRole("heading", { name: "安排专线开通" })).toBeTruthy();
|
|
|
expect(preview.getByText("未到执行日")).toBeTruthy();
|
|
expect(preview.getByText("未到执行日")).toBeTruthy();
|
|
@@ -95,9 +95,10 @@ it("待确认队列保留对家与催办,并在发送后刷新状态", async (
|
|
|
vi.mocked(ticketUrge).mockResolvedValue({ ticket_id: "W-3", created: true, reason: null, business_date: "2026-11-30", waiting: urged, next_step: "等待客户确认" });
|
|
vi.mocked(ticketUrge).mockResolvedValue({ ticket_id: "W-3", created: true, reason: null, business_date: "2026-11-30", waiting: urged, next_step: "等待客户确认" });
|
|
|
const queues = renderMine();
|
|
const queues = renderMine();
|
|
|
await screen.findByRole("table", { name: "我的待办工单" });
|
|
await screen.findByRole("table", { name: "我的待办工单" });
|
|
|
- fireEvent.click(queues.getByRole("link", { name: /待对方确认/ }));
|
|
|
|
|
- expect(within(screen.getByRole("table", { name: "我的待办工单" })).getByText("李经理")).toBeTruthy();
|
|
|
|
|
fireEvent.click(screen.getByRole("button", { name: "催办" }));
|
|
fireEvent.click(screen.getByRole("button", { name: "催办" }));
|
|
|
expect(await screen.findByText("今日已催")).toBeTruthy();
|
|
expect(await screen.findByText("今日已催")).toBeTruthy();
|
|
|
expect(ticketUrge).toHaveBeenCalledWith({ ticket_id: "W-3" });
|
|
expect(ticketUrge).toHaveBeenCalledWith({ ticket_id: "W-3" });
|
|
|
|
|
+ expect(screen.getByRole("button", { name: "排查线路掉包" }).getAttribute("aria-pressed")).toBe("true");
|
|
|
|
|
+ fireEvent.click(queues.getByRole("link", { name: /待对方确认/ }));
|
|
|
|
|
+ expect(within(screen.getByRole("table", { name: "我的待办工单" })).getByText("李经理")).toBeTruthy();
|
|
|
});
|
|
});
|