docs: place Office warnings within feature sections (#1764)

* docs: place Office warnings within feature sections

* test(docs): cover substantive status sections

* docs: attach experimental badges to Office features

* test(docs): cover callouts without section headings
This commit is contained in:
José Almeida
2026-07-17 22:53:48 +01:00
committed by GitHub
parent 7d3cdbc99e
commit cc86b17c96
7 changed files with 124 additions and 27 deletions
+53
View File
@@ -322,6 +322,59 @@ test("accepts experimental page status frontmatter", async () => {
await assert.doesNotReject(validatePublicDocs(dir));
});
test("rejects an experimental callout with no substantive section content", async () => {
const dir = await createDocs(
{
"index.md": `${validPage}\n## Office dependencies\n\n> [!EXPERIMENTAL]\n> Office is disabled by default.\n`,
},
{ pages: ["index"] },
);
await assert.rejects(
validatePublicDocs(dir),
/index.md has an experimental callout without substantive section content: Office dependencies/,
);
});
test("accepts a feature-specific experimental section with substantive content", async () => {
const dir = await createDocs(
{
"index.md": `${validPage}\n## Office dependencies\n\n> [!EXPERIMENTAL]\n> Office is disabled by default.\n\nUse workflow approval steps for the supported human-gated path.\n`,
},
{ pages: ["index"] },
);
await assert.doesNotReject(validatePublicDocs(dir));
});
test("rejects an experimental callout dropped after unrelated section content", async () => {
const dir = await createDocs(
{
"index.md": `${validPage}\n## Configure workflows\n\nRegular workflows support human review gates.\n\n> [!EXPERIMENTAL]\n> Office is disabled by default.\n\nUse workflow approval steps for stable human gates.\n`,
},
{ pages: ["index"] },
);
await assert.rejects(
validatePublicDocs(dir),
/index.md experimental callouts must immediately follow a descriptive heading/,
);
});
test("rejects an experimental callout not under a descriptive section heading", async () => {
const dir = await createDocs(
{
"index.md": `${validPage}\n> [!EXPERIMENTAL]\n> Office is disabled by default.\n\nSome content.\n`,
},
{ pages: ["index"] },
);
await assert.rejects(
validatePublicDocs(dir),
/index.md experimental callouts must immediately follow a descriptive heading/,
);
});
test("rejects published pages without title and description frontmatter", async () => {
const dir = await createDocs(
{ "index.md": "# Kandev\n" },