feat(cv): prioritize ATS template choices
This commit is contained in:
@@ -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"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user