Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
897 B
Raw Blame
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import { describe, expect, test } from "bun:test";

const sidebarPath = fileURLToPath(
  new URL("../src/react-app/domains/session/sidebar/app-sidebar.tsx", import.meta.url),
);

describe("managed brand header", () => {
  test("shows a wordmark when supplied and a branded fallback otherwise", () => {
    const source = readFileSync(sidebarPath, "utf8");

    expect(source).toMatch(/\{brandLogoUrl \? \([\s\S]*?data-testid="brand-logo"[\s\S]*?<img/);
    expect(source).toContain("useBrandAppName");
    expect(source).toContain("data-sidebar-brand");
    expect(source).toContain("title={brandAppName}>{brandAppName}</span>");
    expect(source).toMatch(/className="flex h-14 shrink-0 items-center/);
    expect(source).toMatch(/className="max-h-9 w-auto max-w-\[140px\] object-contain object-left"/);
  });
});