Keep space under the guide logo and align header and body.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -179,15 +179,44 @@ describe("ContentBanner", () => {
|
||||
expect(screen.getByText("Test description")).toBeInTheDocument();
|
||||
expect(screen.queryByText("Test Author")).not.toBeInTheDocument();
|
||||
|
||||
const copyColumn = container.querySelector('[data-node-id="19189:9171"]');
|
||||
expect(copyColumn).toHaveClass(
|
||||
"md:max-w-[280px]",
|
||||
"lg:max-w-[365px]",
|
||||
"xl:max-w-[623px]",
|
||||
);
|
||||
expect(copyColumn).not.toHaveClass("max-w-[365px]");
|
||||
|
||||
const bannerRow = container.querySelector('[data-node-id="19189:9358"]');
|
||||
expect(bannerRow).toHaveClass("md:flex-row");
|
||||
expect(bannerRow?.className).toMatch(/xl:max-w-\[1312px\]/);
|
||||
|
||||
const logoMark = container.querySelector(
|
||||
'[data-node-id="22078:806960"] img',
|
||||
const logoMarkWrap = container.querySelector(
|
||||
'[data-node-id="22078:806960"]',
|
||||
);
|
||||
expect(logoMarkWrap?.className).toMatch(
|
||||
/max-sm:pb-\[var\(--spacing-scale-024\)\]/,
|
||||
);
|
||||
expect(logoMarkWrap).toHaveClass("md:justify-end");
|
||||
const logoMark = logoMarkWrap?.querySelector("img");
|
||||
expect(logoMark).toHaveAttribute(
|
||||
"src",
|
||||
expect.stringContaining("guide-banner-logo-arrow.svg"),
|
||||
);
|
||||
});
|
||||
|
||||
it("renders guide metadata under the title when updatedLabel is set", () => {
|
||||
render(
|
||||
<ContentBanner
|
||||
post={mockPost}
|
||||
variant="guide"
|
||||
updatedLabel="Last updated August 15, 2026."
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("Test Author")).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText("Last updated August 15, 2026."),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user