Use each catalog article’s Figma body ornaments instead of one shared pair.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -242,6 +242,29 @@ describe("BlogPostPage", () => {
|
||||
expect(shapes[1]).toHaveClass("object-contain");
|
||||
});
|
||||
|
||||
it("uses per-article body ornaments for catalog posts", async () => {
|
||||
const { getBlogPostBySlug } = await import("../../lib/content");
|
||||
vi.mocked(getBlogPostBySlug).mockReturnValue({
|
||||
...mockPost,
|
||||
slug: "resolving-active-conflicts",
|
||||
});
|
||||
|
||||
const BlogPostPageComponent = await BlogPostPage({
|
||||
params: { slug: "resolving-active-conflicts" },
|
||||
});
|
||||
render(BlogPostPageComponent);
|
||||
|
||||
const shapes = screen.getAllByAltText("");
|
||||
expect(shapes[0]).toHaveAttribute(
|
||||
"src",
|
||||
"/content/blog/resolving-active-conflicts-ornament-right.png",
|
||||
);
|
||||
expect(shapes[1]).toHaveAttribute(
|
||||
"src",
|
||||
"/content/blog/resolving-active-conflicts-ornament-left.png",
|
||||
);
|
||||
});
|
||||
|
||||
it("applies correct styling to article content", async () => {
|
||||
const BlogPostPageComponent = await BlogPostPage({
|
||||
params: { slug: "test-article" },
|
||||
|
||||
Reference in New Issue
Block a user