mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Moves the file explorer styling and layout into the bundled themes
This commit is contained in:
1 parent
3f69693332
commit
a32f80337b
72 files changed
+1577
-1682
No files matched your search
+19
@@ -23,6 +23,7 @@ public class ThemeTemplateEngineTests
|
||||
private readonly ThemeNavMenuDtoFixture _themeNavMenuDtoFixture = new();
|
||||
private readonly ThemeNavSectionDtoFixture _themeNavSectionDtoFixture = new();
|
||||
private readonly ThemeNavEntryDtoFixture _themeNavEntryDtoFixture = new();
|
||||
private readonly ThemeFileSystemBrowserDtoFixture _themeFileSystemBrowserDtoFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ThemeTemplateEngineTests"/> class.
|
||||
@@ -158,6 +159,24 @@ public class ThemeTemplateEngineTests
|
||||
Assert.Equal("Tools:[Language]English,Francais,Settings", result.Value.Content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RenderPage_WhenFileSystemBrowserModelUsed_ShouldResolveStringsAndInlineRawSubTemplates()
|
||||
{
|
||||
// Arrange
|
||||
ThemeFileSystemBrowserDto model = _themeFileSystemBrowserDtoFixture.Create(
|
||||
assetBase: "/theme-assets/editorial/assets",
|
||||
treeNodeTemplate: "<div class=\"tree-node\" data-path=\"{{path}}\">{{name}}</div>",
|
||||
strings: new Dictionary<string, object?> { ["cancel"] = "Annuler" });
|
||||
string template = "{{assetBase}}|{{strings.cancel}}|<template id=\"fsb-template-tree-node\">{{{treeNodeTemplate}}}</template>";
|
||||
|
||||
// Act
|
||||
Result<ThemePageRenderResultDto> result = _sut.RenderPage(template, model);
|
||||
|
||||
// Assert
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.Equal("/theme-assets/editorial/assets|Annuler|<template id=\"fsb-template-tree-node\"><div class=\"tree-node\" data-path=\"{{path}}\">{{name}}</div></template>", result.Value.Content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RenderPage_WhenSectionIsTruthy_ShouldRenderChildren()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user