feat(web): update button in Settings (#15)
Shows the installed commit, checks for new commits, starts the update after a confirmation and follows its output through the service restart.
This commit is contained in:
@@ -67,10 +67,19 @@ it("renders system/session/Claude information and opens the terminal", async ()
|
||||
version: "Claude 1",
|
||||
loginAppearsPresent: true,
|
||||
});
|
||||
vi.spyOn(settingsApi, "updateStatus").mockResolvedValue({
|
||||
available: true,
|
||||
state: "idle",
|
||||
current: "abc1234",
|
||||
startedAt: null,
|
||||
finishedAt: null,
|
||||
log: "",
|
||||
});
|
||||
const revoke = vi.spyOn(settingsApi, "revoke").mockResolvedValue();
|
||||
const open = vi.fn();
|
||||
render(<SettingsPage openTerminal={open} />);
|
||||
expect(await screen.findByText("/workspace")).toBeInTheDocument();
|
||||
expect(await screen.findByRole("button", { name: "Update now" })).toBeInTheDocument();
|
||||
expect(screen.getByText(/86400 seconds/)).toBeInTheDocument();
|
||||
expect(screen.getByText("Available: Claude 1")).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByText("Open terminal to log in"));
|
||||
|
||||
Reference in New Issue
Block a user