feat(sign-in): make auth buttons responsive with icon-only mobile affordance
This commit is contained in:
12
tests/sign-in.test.ts
Normal file
12
tests/sign-in.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
describe("sign-in header affordance", () => {
|
||||
test("auth control switches to an icon-only mobile affordance via useIsMobile", () => {
|
||||
const source = readFileSync("src/components/sign-in.tsx", "utf8");
|
||||
|
||||
expect(source).toContain("useIsMobile");
|
||||
expect(source).toContain('size={isMobile ? "icon" : "sm"}');
|
||||
expect(source).toContain('aria-label={session?.user ? "Sign out" : "Sign in"}');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user