@@ -1,5 +1,6 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import {
|
||||
APP_ACTION_BAR_CLASSES,
|
||||
APP_HEADER_SURFACE_CLASSES,
|
||||
APP_NAV_SURFACE_CLASSES,
|
||||
APP_SECTION_SURFACE_CLASSES,
|
||||
@@ -8,31 +9,36 @@ import {
|
||||
import { EVENT_CARD_SURFACE_CLASSES } from "@/components/event-card";
|
||||
|
||||
describe("app shell surfaces", () => {
|
||||
test("header, primary sections, and bottom navigation all use shared glass utilities", () => {
|
||||
expect(APP_HEADER_SURFACE_CLASSES).toMatch(/glass-surface/);
|
||||
expect(APP_SECTION_SURFACE_CLASSES).toMatch(/glass-panel/);
|
||||
expect(APP_NAV_SURFACE_CLASSES).toMatch(/glass-surface/);
|
||||
test("header surface is a thin structural bar instead of a glass panel", () => {
|
||||
expect(APP_HEADER_SURFACE_CLASSES).toContain("min-h-14");
|
||||
expect(APP_HEADER_SURFACE_CLASSES).toContain("border-b");
|
||||
expect(APP_HEADER_SURFACE_CLASSES).not.toContain("glass-surface");
|
||||
});
|
||||
|
||||
test("section surface keeps responsive padding for mobile and larger breakpoints", () => {
|
||||
expect(APP_SECTION_SURFACE_CLASSES).toContain("p-4");
|
||||
expect(APP_SECTION_SURFACE_CLASSES).toContain("sm:p-5");
|
||||
test("section and action surfaces use tokenized shell classes instead of glass helpers", () => {
|
||||
expect(APP_SECTION_SURFACE_CLASSES).not.toContain("glass-panel");
|
||||
expect(APP_ACTION_BAR_CLASSES).not.toContain("glass-subtle");
|
||||
expect(APP_NAV_SURFACE_CLASSES).not.toContain("glass-surface");
|
||||
});
|
||||
});
|
||||
|
||||
describe("event cards", () => {
|
||||
test("event cards use the shared glass card treatment instead of a one-off surface", () => {
|
||||
expect(EVENT_CARD_SURFACE_CLASSES).toMatch(/glass-card/);
|
||||
test("event cards use the redesigned console card treatment", () => {
|
||||
expect(EVENT_CARD_SURFACE_CLASSES).toContain("rounded-[10px]");
|
||||
expect(EVENT_CARD_SURFACE_CLASSES).toContain(
|
||||
"shadow-[0_0_0_1px_rgba(0,0,0,0.08)",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("connection badge", () => {
|
||||
test("online-ready badge gets a success treatment while offline stays neutral", () => {
|
||||
test("online-ready badge uses the console utility blue while offline stays neutral", () => {
|
||||
const onlineClasses = getConnectionBadgeClasses(true);
|
||||
const offlineClasses = getConnectionBadgeClasses(false);
|
||||
|
||||
expect(onlineClasses).toMatch(/emerald/);
|
||||
expect(offlineClasses).not.toMatch(/emerald/);
|
||||
expect(onlineClasses).toContain("bg-[#ebf5ff]");
|
||||
expect(onlineClasses).toContain("text-[#0068d6]");
|
||||
expect(offlineClasses).not.toContain("bg-[#ebf5ff]");
|
||||
expect(offlineClasses).toContain("text-muted-foreground");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user