feat: add AI settings controls
This commit is contained in:
38
tests/ui-shell-contract.test.ts
Normal file
38
tests/ui-shell-contract.test.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import {
|
||||
APP_HEADER_SURFACE_CLASSES,
|
||||
APP_NAV_SURFACE_CLASSES,
|
||||
APP_SECTION_SURFACE_CLASSES,
|
||||
getConnectionBadgeClasses,
|
||||
} from "@/lib/ui-shell-contract";
|
||||
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("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");
|
||||
});
|
||||
});
|
||||
|
||||
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/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("connection badge", () => {
|
||||
test("online-ready badge gets a success treatment while offline stays neutral", () => {
|
||||
const onlineClasses = getConnectionBadgeClasses(true);
|
||||
const offlineClasses = getConnectionBadgeClasses(false);
|
||||
|
||||
expect(onlineClasses).toMatch(/emerald/);
|
||||
expect(offlineClasses).not.toMatch(/emerald/);
|
||||
expect(offlineClasses).toContain("text-muted-foreground");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user