Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
if (Editable && richTextField.OpeningChrome != null)
{
html += _chromeRenderer.Render(richTextField.OpeningChrome);
html += "<div>";
html += "<span>";
Comment thread
robearlam marked this conversation as resolved.
}

bool outputEditableMarkup = Editable && !string.IsNullOrEmpty(richTextField.EditableMarkup);
Expand All @@ -65,7 +65,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)

if (Editable && richTextField.ClosingChrome != null)
{
html += "</div>";
html += "</span>";
html += _chromeRenderer.Render(richTextField.ClosingChrome);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
if (Editable && field.OpeningChrome != null)
{
html += _chromeRenderer.Render(field.OpeningChrome);
html += "<div>";
html += "<span>";
Comment thread
robearlam marked this conversation as resolved.
isHtml = true;
}

Expand All @@ -67,7 +67,7 @@ public override void Process(TagHelperContext context, TagHelperOutput output)

if (Editable && field.ClosingChrome != null)
{
html += "</div>";
html += "</span>";
html += _chromeRenderer.Render(field.ClosingChrome);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Diagnostics.CodeAnalysis;
Comment thread
robearlam marked this conversation as resolved.
using System.Globalization;
using AutoFixture;
using AutoFixture;
using AutoFixture.Idioms;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc.ModelBinding;
Expand All @@ -14,6 +12,9 @@
using Sitecore.AspNetCore.SDK.LayoutService.Client.Response.Model.Fields;
using Sitecore.AspNetCore.SDK.RenderingEngine.Rendering;
using Sitecore.AspNetCore.SDK.RenderingEngine.TagHelpers.Fields;
using System.Diagnostics.CodeAnalysis;

Check warning on line 15 in tests/Sitecore.AspNetCore.SDK.RenderingEngine.Tests/TagHelpers/Fields/RichTextTagHelperFixture.cs

View workflow job for this annotation

GitHub Actions / build / build

Using directive for 'System.Diagnostics.CodeAnalysis' should appear before directive for 'Sitecore.AspNetCore.SDK.RenderingEngine.TagHelpers.Fields' (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md)
using System.Globalization;

Check warning on line 16 in tests/Sitecore.AspNetCore.SDK.RenderingEngine.Tests/TagHelpers/Fields/RichTextTagHelperFixture.cs

View workflow job for this annotation

GitHub Actions / build / build

Using directive for 'System.Globalization' should appear before directive for 'Sitecore.AspNetCore.SDK.RenderingEngine.TagHelpers.Fields' (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md)
using System.Text.Encodings.Web;

Check warning on line 17 in tests/Sitecore.AspNetCore.SDK.RenderingEngine.Tests/TagHelpers/Fields/RichTextTagHelperFixture.cs

View workflow job for this annotation

GitHub Actions / build / build

Using directive for 'System.Text.Encodings.Web' should appear before directive for 'Sitecore.AspNetCore.SDK.RenderingEngine.TagHelpers.Fields' (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md)
using Xunit;

namespace Sitecore.AspNetCore.SDK.RenderingEngine.Tests.TagHelpers.Fields;
Expand Down Expand Up @@ -733,6 +734,7 @@
// Assert
chromeRenderer.Received().Render(openingChrome);
chromeRenderer.Received().Render(closingChrome);
tagHelperOutput.Content.GetContent().Should().Be($"{chromeRenderer.Render(openingChrome)}<span>{TestHtml}</span>{chromeRenderer.Render(closingChrome)}");
}

private static ModelExpression GetModelExpression(Field model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public void Process_RenderingChromesAreNotNull_ChromesAreOutput(
// Assert
chromeRenderer.Received().Render(openingChrome);
chromeRenderer.Received().Render(closingChrome);
tagHelperOutput.Content.GetContent().Should().Be($"{chromeRenderer.Render(openingChrome)}<span>{TestText}</span>{chromeRenderer.Render(closingChrome)}");
}

private static IEnumerable<object[]> GetModelExpressionTestData()
Expand Down
Loading