feat(cv): expand builder studio tools

This commit is contained in:
cesnimda
2026-08-29 01:45:30 +02:00
parent f794265e3e
commit 0f17d95c57
10 changed files with 434 additions and 47 deletions
+22
View File
@@ -296,6 +296,28 @@ public sealed class CvBuilderTests
Assert.Contains(".page{width:auto;min-height:0;margin:0;}", html);
}
[Fact]
public void Section_presentation_is_normalized_and_shared_by_preview_and_pdf_renderer()
{
var settings = CvVariantSettingsJson.Normalize(new CvVariantSettings
{
ThemeId = "modern",
Sections =
{
new CvSectionSetting { Key = "experience", Presentation = "grid", Columns = 2 },
new CvSectionSetting { Key = "skills", Presentation = "bubble", Columns = 99 },
},
});
var model = CvVariantResolver.Build(Rich(), settings, "F", null);
var html = new ThemedCvRenderer().Render(model, CvThemeCatalog.Resolve("modern"), settings).Html;
Assert.Equal(2, settings.Sections[0].Columns);
Assert.Null(settings.Sections[1].Columns);
Assert.Contains("section-experience section-presentation-grid", html);
Assert.Contains("--cv-section-columns:2", html);
Assert.Contains("section-skills section-presentation-bubble", html);
}
[Fact]
public void Norwegian_variant_localizes_default_labels_dates_and_keeps_custom_links_clickable()
{