Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frontend/src/pages/EnvironmentOverviewPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ describe("EnvironmentOverviewPage", () => {
mockState = { status: empty, statusState: "success", statusError: "" };
renderPage();
expect(screen.getByText("尚未安装任何 Agent")).toBeTruthy();
fireEvent.click(screen.getByRole("button", { name: "安装命令行 Agent" }));
// The header's "安装命令行 Agent" is deliberately absent here: with nothing
// installed the empty state owns the call to action, as its own primary
// button, rather than repeating it in the toolbar.
expect(screen.queryByRole("button", { name: "安装命令行 Agent" })).toBeNull();
fireEvent.click(screen.getByRole("button", { name: "安装 Agent" }));
expect(await screen.findByRole("heading", { name: "onboarding" })).toBeTruthy();
// A second run must not inherit the previous Agent, model or log.
expect(dispatch).toHaveBeenCalledWith({ type: "START_SETUP" });
Expand Down