reboot alterflixhub
This commit is contained in:
commit
1e84023a44
188 files changed
+31629
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { LOGO_SPEC } from "@/lib/design-tokens";
|
||||
import { logoClasses } from "@/components/site/Logo";
|
||||
|
||||
/**
|
||||
* กันการเผลอเปลี่ยนโลโก้: สเปกใน DESIGN.md ถูกตรึงไว้ที่นี่
|
||||
* ถ้าเทสต์นี้พัง แปลว่ามีคนแก้สเปกโลโก้ — ต้องขออนุมัติก่อน
|
||||
*/
|
||||
describe("โลโก้ AlterFlixHub (สเปกที่ห้ามเปลี่ยน)", () => {
|
||||
it("ใช้คำว่า AlterFlixHub เท่านั้น", () => {
|
||||
expect(LOGO_SPEC.wordmark).toBe("AlterFlixHub");
|
||||
});
|
||||
|
||||
it("ฟอนต์ต้องเป็น Jersey 15", () => {
|
||||
expect(LOGO_SPEC.fontFamily).toContain("Jersey 15");
|
||||
expect(logoClasses("md")).toContain("font-['Jersey_15']");
|
||||
expect(logoClasses("sm")).toContain("font-['Jersey_15']");
|
||||
});
|
||||
|
||||
it("สีต้องเป็นแดงแบรนด์ #8F0808", () => {
|
||||
expect(LOGO_SPEC.color).toBe("#8F0808");
|
||||
});
|
||||
|
||||
it("header 36px (md) และ footer 24px (sm) เท่านั้น", () => {
|
||||
expect(LOGO_SPEC.sizes.md).toBe("text-4xl");
|
||||
expect(LOGO_SPEC.sizes.sm).toBe("text-2xl");
|
||||
expect(logoClasses("md")).toContain("text-4xl");
|
||||
expect(logoClasses("sm")).toContain("text-2xl");
|
||||
});
|
||||
|
||||
it("ไม่มีตัวเลือกขนาดอื่นนอกเหนือจาก sm/md", () => {
|
||||
expect(Object.keys(LOGO_SPEC.sizes).sort()).toEqual(["md", "sm"]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user