import { describe, it, expect } from "vitest";
import { siteConfig, products, navLinks } from "@/lib/site-config";

describe("site-config", () => {
  it("has a brand name and tagline", () => {
    expect(siteConfig.name).toBe("OrthoGlobe");
    expect(siteConfig.tagline).toMatch(/International Orthopaedic Research Collaborative/i);
  });

  it("lists the six umbrella products", () => {
    expect(products).toHaveLength(6);
    expect(products.map((p) => p.slug)).toEqual([
      "atlas",
      "consentiq",
      "orthoprep",
      "academy",
      "store",
      "research",
    ]);
  });

  it("every product has the required fields", () => {
    for (const p of products) {
      expect(p.slug).toBeTruthy();
      expect(p.name).toBeTruthy();
      expect(p.tagline).toBeTruthy();
      expect(p.description).toBeTruthy();
      expect(p.status).toMatch(/coming-soon|live/);
      expect(p.href).toBe(`/products/${p.slug}`);
    }
  });

  it("nav links include all top-level pages", () => {
    const hrefs = navLinks.map((l) => l.href);
    expect(hrefs).toContain("/");
    expect(hrefs).toContain("/about");
    expect(hrefs).toContain("/products/atlas");
    expect(hrefs).toContain("/contact");
  });
});
