Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,76 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buttonAdapterNames, buttonAdapters } from "@toolctrl/ui/buttons";
|
||||
import { layoutAdapterNames, layoutAdapters } from "@toolctrl/ui/layout";
|
||||
import { navigationAdapterNames, navigationAdapters } from "@toolctrl/ui/navigation";
|
||||
|
||||
describe("@toolctrl/ui button adapter contract", () => {
|
||||
it("exposes the first available button adapter targets without importing React components", () => {
|
||||
expect(buttonAdapterNames).toEqual(["Button", "buttonVariants"]);
|
||||
expect(buttonAdapters).toEqual([
|
||||
expect.objectContaining({
|
||||
category: "buttons",
|
||||
name: "Button",
|
||||
status: "available",
|
||||
source: "apps/web/app/components/ui/button.tsx",
|
||||
implementation: "shadcn/radix",
|
||||
packageExport: "@toolctrl/ui/buttons",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
category: "buttons",
|
||||
name: "buttonVariants",
|
||||
status: "available",
|
||||
source: "apps/web/app/components/ui/button.tsx",
|
||||
implementation: "shadcn/radix",
|
||||
packageExport: "@toolctrl/ui/buttons",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("@toolctrl/ui shell and navigation adapter contracts", () => {
|
||||
it("exposes available layout adapter targets without importing React components", () => {
|
||||
expect(layoutAdapterNames).toEqual(["ShadcnSidebarLayout", "UiRegistry"]);
|
||||
expect(layoutAdapters).toEqual([
|
||||
expect.objectContaining({
|
||||
category: "layout",
|
||||
name: "ShadcnSidebarLayout",
|
||||
status: "available",
|
||||
source: "apps/web/app/components/layouts/sidebars/shadcn/ShadcnSidebarLayout.tsx",
|
||||
implementation: "shell-layout",
|
||||
packageExport: "@toolctrl/ui/layout",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
category: "layout",
|
||||
name: "UiRegistry",
|
||||
status: "available",
|
||||
source: "apps/web/app/application/ui/uiRegistry.ts",
|
||||
implementation: "agent-registry",
|
||||
packageExport: "@toolctrl/ui/layout",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it("exposes available navigation adapter targets without importing React components", () => {
|
||||
expect(navigationAdapterNames).toEqual([
|
||||
"AppSidebar",
|
||||
"AdminSidebar",
|
||||
"DocsSidebar",
|
||||
"NavMain",
|
||||
"NavSecondary",
|
||||
"NavQuickLinks",
|
||||
"NavActions",
|
||||
"SidebarPrimitives",
|
||||
]);
|
||||
expect(navigationAdapters).toEqual([
|
||||
expect.objectContaining({ name: "AppSidebar", source: "apps/web/app/application/sidebar/AppSidebar.tsx" }),
|
||||
expect.objectContaining({ name: "AdminSidebar", source: "apps/web/app/application/sidebar/AdminSidebar.tsx" }),
|
||||
expect.objectContaining({ name: "DocsSidebar", source: "apps/web/app/application/sidebar/DocsSidebar.ts" }),
|
||||
expect.objectContaining({ name: "NavMain", source: "apps/web/app/components/layouts/sidebars/shadcn/nav-main.tsx" }),
|
||||
expect.objectContaining({ name: "NavSecondary", source: "apps/web/app/components/layouts/sidebars/shadcn/nav-secondary.tsx" }),
|
||||
expect.objectContaining({ name: "NavQuickLinks", source: "apps/web/app/components/layouts/sidebars/shadcn/nav-quick-links.tsx" }),
|
||||
expect.objectContaining({ name: "NavActions", source: "apps/web/app/components/layouts/sidebars/shadcn/nav-actions.tsx" }),
|
||||
expect.objectContaining({ name: "SidebarPrimitives", source: "apps/web/app/components/ui/sidebar.tsx" }),
|
||||
]);
|
||||
expect(navigationAdapters.every((adapter) => adapter.status === "available" && adapter.packageExport === "@toolctrl/ui/navigation")).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user