Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+9
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Walking-Skeleton (R-P1c) — gemeinsame Konstante für Route, Sidebar-Registrierung und appData-Gating.
|
||||
*
|
||||
* Bewusst KEIN Entitlement-`featureKey` aus `@toolctrl/entitlements`: das Skeleton ist die
|
||||
* exemplarische Konnektor-Demo. Da das Modul in keinem Produkt-Blueprint liegt, liefert
|
||||
* `tenantHasModule()` für reale Tenants `false` (Zustand „hidden"/„locked"), bis es bewusst
|
||||
* einem Blueprint zugeordnet wird.
|
||||
*/
|
||||
export const WALKING_SKELETON_MODULE_KEY = "walking-skeleton";
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { createMockPage, generateMockArtifacts } from "@toolctrl/ui-mock";
|
||||
import { buildWalkingSkeletonVM } from "@toolctrl/view-models";
|
||||
import { WALKING_SKELETON_MODULE_KEY } from "./constants";
|
||||
|
||||
/**
|
||||
* Hot-Swap-/ui-mock-Smoke (R-P1c): das Walking-Skeleton-VM muss sich ohne Logik-Bruch gegen
|
||||
* `packages/ui-mock` als Drop-in rendern lassen. Beweist, dass der Loader-Output (VM) die
|
||||
* Hot-Swap-Konvention erfüllt (serialisierbar, i18n-Keys statt Klartext).
|
||||
*/
|
||||
describe("walking-skeleton renders as a ui-mock drop-in", () => {
|
||||
it("produces hot-swap module + html + snapshot for the active VM", () => {
|
||||
const vm = buildWalkingSkeletonVM({ tenantId: "t1", moduleKey: WALKING_SKELETON_MODULE_KEY, connectorState: "active" });
|
||||
const page = createMockPage({
|
||||
id: "walking-skeleton",
|
||||
route: "/app/:tenant/walking-skeleton",
|
||||
titleKey: "walkingSkeleton.title",
|
||||
state: vm,
|
||||
});
|
||||
|
||||
const artifacts = generateMockArtifacts(page);
|
||||
|
||||
expect(artifacts.module).toContain("export const mockPage");
|
||||
expect(artifacts.html).toContain("walking-skeleton");
|
||||
expect(artifacts.snapshot.status).toBe("ready");
|
||||
expect(artifacts.snapshot.route).toBe("/app/:tenant/walking-skeleton");
|
||||
expect(artifacts.snapshot.htmlHash).toMatch(/^[0-9a-f]+$/);
|
||||
});
|
||||
|
||||
it("keeps the locked VM swappable (graceful upsell state)", () => {
|
||||
const vm = buildWalkingSkeletonVM({ tenantId: "t1", moduleKey: WALKING_SKELETON_MODULE_KEY, connectorState: "locked" });
|
||||
const page = createMockPage({ id: "walking-skeleton-locked", route: "/app/:tenant/walking-skeleton", state: vm });
|
||||
|
||||
const artifacts = generateMockArtifacts(page);
|
||||
|
||||
expect(artifacts.snapshot.status).toBe("ready");
|
||||
expect(artifacts.module).toContain("export const mockPage");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user