import React from "react"; import { render, waitFor } from "@testing-library/react"; import CvTemplateThumbnail from "./components/CvTemplateThumbnail"; import { cvBuilderApi, CvTheme } from "./cvBuilder"; import { I18nProvider } from "./i18n/I18nProvider"; const theme = (id: string, layout: CvTheme["layout"], swatches: string[]): CvTheme => ({ id, name: id, category: "Test", description: "", layout, accent: swatches[0], photoShape: "none", supportsIcons: false, atsFriendly: true, requiresPro: false, available: true, swatches, }); test("template thumbnails retain distinct server-rendered samples in noninteractive sandboxed frames", async () => { const preview = jest.spyOn(cvBuilderApi, "themePreview").mockImplementation(async id => ({ html: `
${id} synthetic sample` } as any)); const minimal = render(