Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Tests: the Helpers job list has the reasoning effort switch, off until chosen

milind-soni0416ca132c73
diff --git a/src/components/DecisionModelSettings.test.ts b/src/components/DecisionModelSettings.test.ts
index da4d74f6b2..5c1a275a5a 100644
--- a/src/components/DecisionModelSettings.test.ts
+++ b/src/components/DecisionModelSettings.test.ts
@@ -146,7 +146,17 @@ describe("DecisionModelSettings", () => {
it("lists only the jobs that work: no coming-soon rows", () => {
const view = render();
for (const label of ["Browser clicks", "Tool selection", "Where work runs", "Coming soon"]) expect(view.html).not.toContain(label);
- expect(view.switches).toHaveLength(2);
+ expect(view.switches).toHaveLength(3);
+ });
+
+ it("offers the per-message reasoning effort job, off until switched on, and saves only that job", async () => {
+ const view = render();
+ const effort = view.switches.find((node) => node.props["data-testid"] === "decider-job-turnEffort")!;
+ expect(effort.props.checked).toBe(false);
+ fixture.api.mockResolvedValue(fixture.config);
+ effort.props.onClick();
+ await flush();
+ expect(fixture.api).toHaveBeenCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ decider: { jobs: { turnEffort: true } } }) });
});
it("every button shows a pointer cursor", () => {