feat(back-button): add dark variant and update tests for BackButton component
This commit is contained in:
@@ -13,6 +13,9 @@ describe("shared Tailwind components", () => {
|
||||
const actionHtml = renderToStaticMarkup(
|
||||
<BackButton onClick={() => undefined} variant="ghost" />,
|
||||
);
|
||||
const darkHtml = renderToStaticMarkup(
|
||||
<BackButton href="/splash" variant="dark" ariaLabel="Back to home" />,
|
||||
);
|
||||
|
||||
expect(linkHtml).toContain('href="/chat"');
|
||||
expect(linkHtml).toContain('aria-label="Back to chat"');
|
||||
@@ -22,6 +25,10 @@ describe("shared Tailwind components", () => {
|
||||
expect(actionHtml).toContain("<button");
|
||||
expect(actionHtml).toContain("size-8");
|
||||
expect(actionHtml).toContain("hover:opacity-70");
|
||||
expect(darkHtml).toContain('href="/splash"');
|
||||
expect(darkHtml).toContain('aria-label="Back to home"');
|
||||
expect(darkHtml).toContain("bg-[rgba(13,11,20,0.7)]");
|
||||
expect(darkHtml).toContain("text-white");
|
||||
});
|
||||
|
||||
it("renders CharacterAvatar with dynamic sizing and image utilities", () => {
|
||||
|
||||
Reference in New Issue
Block a user