fix(tests): update agent fixtures for access fields

This commit is contained in:
yushen
2026-07-03 14:10:49 +08:00
parent a7390c80d0
commit 05fbd9bd3b
3 changed files with 5 additions and 2 deletions

View File

@@ -65,6 +65,8 @@ export const mockAgents: Agent[] = [
runtime_config: {},
custom_args: [],
visibility: "workspace",
permission_mode: "public_to",
invocation_targets: [{ target_type: "workspace", target_id: null }],
max_concurrent_tasks: 3,
model: "",
owner_id: null,

View File

@@ -88,7 +88,7 @@ describe("AccessPicker owner-only editing (MUL-3963)", () => {
fireEvent.click(screen.getByRole("button"));
// Checkbox order in the open popover: [0] workspace, [1] Alice, [2] Bob.
const boxes = screen.getAllByRole("checkbox");
fireEvent.click(boxes[1]);
fireEvent.click(boxes[1]!);
expect(onChange).toHaveBeenCalledWith({
permission_mode: "public_to",
invocation_targets: [{ target_type: "member", target_id: "u1" }],
@@ -107,7 +107,7 @@ describe("AccessPicker owner-only editing (MUL-3963)", () => {
fireEvent.click(screen.getByRole("button"));
const boxes = screen.getAllByRole("checkbox");
// [0] is the "Everyone in workspace" toggle.
fireEvent.click(boxes[0]);
fireEvent.click(boxes[0]!);
expect(onChange).toHaveBeenCalledWith({
permission_mode: "public_to",
invocation_targets: [

View File

@@ -91,6 +91,7 @@ function items(qc: QueryClient, query = ""): SlashCommandItem[] {
return config.items!({
query,
editor: {} as never,
signal: new AbortController().signal,
}) as SlashCommandItem[];
}