Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

test(brand): read the repository address from the branding constants (#556)

Ruben Lütke439de71ff4e6
diff --git a/jarvis/ui/web/frontend/src/components/board/ShareDialog.test.tsx b/jarvis/ui/web/frontend/src/components/board/ShareDialog.test.tsx
index e11e95aeb2..336cb93ffb 100644
--- a/jarvis/ui/web/frontend/src/components/board/ShareDialog.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/board/ShareDialog.test.tsx
@@ -19,7 +19,7 @@ import {
} from "@testing-library/react";
import { ShareDialog } from "@/components/board/ShareDialog";
-import { shareToX } from "@/lib/shareImage";
+import { REPO_LABEL, shareToX } from "@/lib/shareImage";
import { toBlob } from "html-to-image";
vi.mock("html-to-image", () => ({
@@ -86,7 +86,7 @@ describe("ShareDialog", () => {
expect(screen.getByTestId("share-x")).toBeDefined();
// The repo URL is baked into the card (preview + capture copies).
expect(
- screen.getAllByText(/github\.com\/PersonalJarvis\/PersonalJarvis/).length,
+ screen.getAllByText((text) => text.includes(REPO_LABEL)).length,
).toBeGreaterThan(0);
// Hero number rendered (locale-agnostic — matches whatever separator
// toLocaleString uses in the test environment).
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx
index cfaf1c7628..3d5f4d945e 100644
--- a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx
@@ -3,6 +3,7 @@ import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/re
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { DocsOverview } from "./DocsOverview";
+import { OFFICIAL_REPO_URL } from "@/lib/branding";
import * as openExternal from "@/lib/openExternal";
function renderOverview() {
@@ -80,6 +81,6 @@ describe("DocsOverview", () => {
expect(selected).toEqual(["architecture-overview"]);
fireEvent.click(screen.getByRole("link", { name: /view on github/i }));
- expect(openSpy).toHaveBeenCalledWith("https://github.com/PersonalJarvis/PersonalJarvis/tree/main/docs");
+ expect(openSpy).toHaveBeenCalledWith(`${OFFICIAL_REPO_URL}/tree/main/docs`);
});
});