mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-16 06:39:01 +02:00
fix(tests): update agent fixtures for access fields
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -91,6 +91,7 @@ function items(qc: QueryClient, query = ""): SlashCommandItem[] {
|
||||
return config.items!({
|
||||
query,
|
||||
editor: {} as never,
|
||||
signal: new AbortController().signal,
|
||||
}) as SlashCommandItem[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user