feat(FN-4153): complete Step 6 — add general ephemeral agents toggle
Fusion-Task-Id: FN-4153 Fusion-Task-Lineage: 6ec09467-c7a0-4a9d-9a09-16d5ef6f7a86
This commit is contained in:
@@ -184,6 +184,7 @@ const defaultSettings = {
|
||||
verificationFixRetries: 2,
|
||||
workflowRevisionForkOnScopeMismatch: true,
|
||||
recycleWorktrees: false,
|
||||
ephemeralAgentsEnabled: true,
|
||||
executorAllowSiblingBranchRename: false,
|
||||
worktreeNaming: "random",
|
||||
includeTaskIdInCommit: true,
|
||||
@@ -717,6 +718,24 @@ describe("SettingsModal", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("saves ephemeral agent toggle in project settings payload", async () => {
|
||||
renderModal({ initialSection: "general" });
|
||||
await waitForSettingsModalReady();
|
||||
|
||||
const ephemeralToggle = screen.getByLabelText("Use ephemeral task-worker agents") as HTMLInputElement;
|
||||
expect(ephemeralToggle.checked).toBe(true);
|
||||
|
||||
await userEvent.click(ephemeralToggle);
|
||||
await userEvent.click(screen.getByRole("button", { name: "Save" }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockUpdateSettings).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
const payload = mockUpdateSettings.mock.calls[0][0] as Record<string, unknown>;
|
||||
expect(payload.ephemeralAgentsEnabled).toBe(false);
|
||||
});
|
||||
|
||||
it("renders and saves GitHub tracking controls in the General section", async () => {
|
||||
renderModal({ initialSection: "general" });
|
||||
await waitForSettingsModalReady();
|
||||
|
||||
Reference in New Issue
Block a user