feat(cv): prioritize ATS template choices

This commit is contained in:
cesnimda
2026-09-01 09:08:16 +02:00
parent 928822d73b
commit 694fdb870a
9 changed files with 95 additions and 31 deletions
+11 -1
View File
@@ -1,4 +1,4 @@
import { applyCvTheme, getCvPageCount, getCvPageMetrics, getCvPreviewFitZoom, moveItem, normalizeCvLanguage, wrapSelection } from "./cvBuilder";
import { applyCvTheme, getCvPageCount, getCvPageMetrics, getCvPreviewFitZoom, getVisibleCvThemes, moveItem, normalizeCvLanguage, wrapSelection } from "./cvBuilder";
describe("moveItem", () => {
test("moves an item forward", () => {
@@ -96,4 +96,14 @@ describe("CV template selection", () => {
sections: [{ key: "experience", title: "Career" }],
});
});
test("shows ATS templates first and keeps an active non-ATS template visible", () => {
const themes = [
{ id: "creative", atsFriendly: false },
{ id: "classic", atsFriendly: true },
{ id: "minimal", atsFriendly: true },
] as never[];
expect(getVisibleCvThemes(themes, true, "creative").map((theme) => theme.id)).toEqual(["classic", "minimal", "creative"]);
expect(getVisibleCvThemes(themes, true).map((theme) => theme.id)).toEqual(["classic", "minimal"]);
});
});