Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03d2fe7

Browse files
committed
🤖 tests: provide policy context for task settings controls
Wrap the TasksSection test harness in the real PolicyProvider. The upstream routing hook now reads policy, so isolated task-settings rendering otherwise fails before exercising any assertions. Reproduced 28 failing cases before the wrapper; all 28 now pass, along with related policy/routing tests and static checks. No production or mobile UI changes. --- _Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$476.90`_ <!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=476.90 -->
1 parent e61d2ec commit 03d2fe7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/browser/features/Settings/Sections/TasksSection.ui.test.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ void mock.module("@/browser/components/SelectPrimitive/SelectPrimitive", () => (
100100
SelectValue: () => null,
101101
}));
102102

103+
import { PolicyProvider } from "@/browser/contexts/PolicyContext";
103104
import { TasksSection } from "./TasksSection";
104105

105106
interface RenderTasksSectionOptions {
@@ -127,7 +128,12 @@ function renderTasksSection(options: RenderTasksSectionOptions = {}) {
127128
// Discovery only runs for a selected workspace's project.
128129
selectedWorkspaceMock = options.agents ? { projectPath: "/proj", workspaceId: "ws-1" } : null;
129130

130-
const view = render(<TasksSection />);
131+
// Thinking controls resolve routes through the app's policy context.
132+
const view = render(
133+
<PolicyProvider>
134+
<TasksSection />
135+
</PolicyProvider>
136+
);
131137
return { ...view, getConfig, saveConfig };
132138
}
133139

0 commit comments

Comments
 (0)