docs: expand full-width guides and package navigation

This commit is contained in:
2026-08-10 14:18:31 +05:30
parent 19b3c9a7cd
commit c767435cc0
94 changed files with 1442 additions and 236 deletions
+27
View File
@@ -219,6 +219,8 @@ test("guide pages expose section navigation, on-page navigation, and a complete
expect(authentication).toContain('class="on-this-page"');
expect(authentication).toContain("Configuration");
expect(authentication).toContain("Verification checklist");
expect(authentication).toContain("Practical example");
expect(authentication).toContain("requireSession");
const demo = readFileSync(
join(root, "app", "pages", "guides", "full-stack-auth-demo.wrn"),
@@ -230,6 +232,31 @@ test("guide pages expose section navigation, on-page navigation, and a complete
expect(demo).toContain("cross-tenant identifiers are rejected");
});
test("every technical guide teaches a practical configuration or workflow", () => {
for (const file of readdirSync(join(root, "app", "pages", "guides"))) {
if (!file.endsWith(".wrn")) continue;
const source = readFileSync(join(root, "app", "pages", "guides", file), "utf8");
expect(source).toContain("<pre><code>");
expect(source).toContain("Verification checklist");
}
const security = readFileSync(join(root, "app", "pages", "security.wrn"), "utf8");
expect(security).toContain("contentSecurityPolicy: true");
expect(security).toContain("What you can change");
expect(security).toContain("wrnexus security audit .");
});
test("documentation navigation exposes every package and uses the full-width shell", () => {
const core = readFileSync(join(root, "app", "pages", "packages", "core.wrn"), "utf8");
const index = readFileSync(join(root, "app", "pages", "packages.wrn"), "utf8");
for (const name of expected) {
expect(core).toContain(`href="/packages/${name}"`);
expect(index).toContain(`href="/packages/${name}"`);
}
expect(core).toContain("docs-layout--navigation");
expect(index).toContain("package-index-document");
});
test("package index includes searchable category filters", () => {
const source = readFileSync(join(root, "app", "pages", "packages.wrn"), "utf8");
expect(source).toContain('state category = "All"');