Skip to content

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

Train fixes: tests follow the merged code

milind-soni616db2b2446d
diff --git a/electron/cloud-home.node-test.mjs b/electron/cloud-home.node-test.mjs
index a7d493a0cc..5ef3de7d55 100644
--- a/electron/cloud-home.node-test.mjs
+++ b/electron/cloud-home.node-test.mjs
@@ -445,7 +445,7 @@ test("the Server menu opens My Cloud through the Cloud's own connection, never a
navigateMainWindow: url => calls.push(`navigate:${url}`), activeOrigin: () => context.environmentsState.environments.find(e => e.id === context.environmentsState.activeId)?.origin,
homeWindow: { cloudOrigin: () => null, asking: () => false, cancel: () => {} }, cleanWorkspace: { profile: () => null }, showHome: async (options) => { calls.push(options ? `home:${JSON.stringify(options)}` : "home"); },
homePlaces: { remember: (place) => calls.push(`remember:${JSON.stringify(place)}`) },
- runningDataDir: "/data", desktopDataDir: () => "/data",
+ runningDataDir: "/data", desktopDataDir: () => "/data", placeSwitch: { replacing: () => false, before: () => null },
handSaved, serverOpens: async (place) => { calls.push(`look:${place.id}`); return answers; }, session: { defaultSession: { fetch: async () => null } }, dialog: {},
});
let answers = true;
diff --git a/electron/server-supervisor.node-test.mjs b/electron/server-supervisor.node-test.mjs
index dfebd03181..fba7384efc 100644
--- a/electron/server-supervisor.node-test.mjs
+++ b/electron/server-supervisor.node-test.mjs
@@ -366,6 +366,7 @@ function switchFixture(t, { startResults = [], releaseLeaseThrows = false, stopU
withActive: env.withActive,
persistEnvironments: (next) => { context.environmentsState = next; },
navigateMainWindow: () => {},
+ placeSwitch: { turn: () => 0 },
rendererOrigin: () => "http://127.0.0.1:8799",
dialog: { showErrorBox: () => {} },
slog: () => {},
diff --git a/src/components/ChatView.controls.test.ts b/src/components/ChatView.controls.test.ts
index bd24940773..b12d4a06fe 100644
--- a/src/components/ChatView.controls.test.ts
+++ b/src/components/ChatView.controls.test.ts
@@ -105,7 +105,7 @@ describe("the header's right side", () => {
expect(markup).toContain('data-tour="computer"');
expect(markup).toContain('data-testid="chat-more"');
const more = fixture.menus.find((menu) => menu.ariaLabel === "More")!;
- expect(more.items.map((item) => item.key)).toEqual(["find", "new-thread", "copy", "download"]);
+ expect(more.items.map((item) => item.key)).toEqual(["find", "new-thread", "start-fresh", "copy", "download"]);
} finally {
delete window.ogb;
fixture.advanced = true;
@@ -140,7 +140,7 @@ describe("the header's right side", () => {
expect(markup).toContain('data-tour="computer"');
expect(markup).toContain('data-testid="chat-more"');
const more = fixture.menus.find((menu) => menu.ariaLabel === "More")!;
- expect(more.items.map((item) => item.key)).toEqual(["find", "copy", "download", "activity", "inspector"]);
+ expect(more.items.map((item) => item.key)).toEqual(["find", "start-fresh", "copy", "download", "activity", "inspector"]);
const inspector = more.items.find((item) => item.key === "inspector")!;
expect(inspector.disabled).toBeFalsy();
expect(inspector.heading).toBeUndefined();
diff --git a/src/components/PluginsPanel.navigation.test.ts b/src/components/PluginsPanel.navigation.test.ts
index 61e8584eb3..06f3cebd44 100644
--- a/src/components/PluginsPanel.navigation.test.ts
+++ b/src/components/PluginsPanel.navigation.test.ts
@@ -572,7 +572,7 @@ describe("Apps pop-up", () => {
expect(fixture.overrides.get(20)).toBe("Productivity");
});
- const MCP_SERVERS = 24, SUGGESTIONS = 25;
+ const MCP_SERVERS = 24, SUGGESTIONS = 28;
const headings = (html: string) => [...html.matchAll(/<h3 id="[^"]*"[^>]*>([^<]*)/g)].map((match) => match[1]);
const tiles = (html: string) => [...html.matchAll(/data-app-tile="([^"]*)"/g)].map((match) => match[1]).filter((slug) => !HOSTED_MCP_APPS.some((app) => app.id === slug));
const server = (name: string, extra: Record<string, unknown> = {}) => ({ name, type: "http", url: `https://${name}.example/mcp`, headerKeys: [], enabled: true, ...extra });