Keep listed published rules public and guest-claim rules unlisted, with semantic document markup and share chrome that stays clickable.
Guest publishes remain share-by-link but stay out of the catalog and sitemap, and their pages send noindex until claimed. The published-rule view now uses heading and list markup matching Markdown export, and top banners sit below the header so Share is not covered. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
77b0ec8ad8
commit
1445cb7e1e
27 files changed
+524
-86
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { describe } from "vitest";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import {
|
||||
componentTestSuite,
|
||||
type ComponentTestSuiteConfig,
|
||||
@@ -15,7 +16,10 @@ const config: ComponentTestSuiteConfig<Props> = {
|
||||
categoryName: "Decision making",
|
||||
showRail: true,
|
||||
children: (
|
||||
<TextBlock title="How proposals pass" body="Important decisions require alignment." />
|
||||
<TextBlock
|
||||
title="How proposals pass"
|
||||
body="Important decisions require alignment."
|
||||
/>
|
||||
),
|
||||
} as Props,
|
||||
requiredProps: ["categoryName", "children"],
|
||||
@@ -27,4 +31,21 @@ const config: ComponentTestSuiteConfig<Props> = {
|
||||
|
||||
describe("Section", () => {
|
||||
componentTestSuite<Props>(config);
|
||||
|
||||
it("renders the category as a level-2 heading inside a section", () => {
|
||||
render(
|
||||
<Section categoryName="Decision making">
|
||||
<TextBlock
|
||||
title="How proposals pass"
|
||||
body="Important decisions require alignment."
|
||||
/>
|
||||
</Section>,
|
||||
);
|
||||
expect(
|
||||
screen.getByRole("heading", { level: 2, name: "Decision making" }),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole("heading", { level: 3, name: "How proposals pass" }),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user