feat: add semantic CSS stylesheets (#3274)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
Amruth Pillai
2026-07-30 12:39:15 +02:00
committed by GitHub
co-authored by Cursor Agent
parent 4ac19f81b3
commit d2ffbf9618
320 changed files with 78393 additions and 2915 deletions
+46
View File
@@ -0,0 +1,46 @@
import type { Page } from "@playwright/test";
import { describe, expect, it, vi } from "vitest";
import { activePreviewPageSelector } from "./preview";
import { switchTemplate } from "./semantic-css";
vi.mock("@playwright/test", () => {
const expect = Object.assign(() => ({ toBeVisible: async () => {} }), {
poll: (read: () => Promise<unknown>) => ({
toBe: async () => {
await read();
await read();
},
}),
});
return { expect };
});
vi.mock("./resume", () => ({
createSampleResumeFromDashboard: vi.fn(),
openSidebarSection: vi.fn(),
}));
describe("switchTemplate", () => {
it("waits for the requested active preview when the template is already selected", async () => {
let selectedPreview = "";
const locator = {
filter: () => locator,
first: () => locator,
};
const section = {
getByRole: () => ({ isVisible: async () => true }),
};
const page = {
evaluate: async () => "same-bitmap",
getByRole: (role: string) => (role === "region" ? section : locator),
locator: (selector: string) => {
selectedPreview = selector;
return locator;
},
} as unknown as Page;
await switchTemplate(page, "Glalie");
expect(selectedPreview).toBe(activePreviewPageSelector("glalie"));
});
});