Skip to content

Commit

Permalink
Fixed Integration Test for Component and Route property binding
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanLieckens committed Aug 5, 2024
1 parent 871f753 commit c60a956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public async Task SitecoreLayoutModelBinders_BindDataCorrectly()
.Should().Be(TestConstants.SearchKeywords);

sectionNode.ChildNodes.First(n => n.Id.Equals("componentProperty", StringComparison.OrdinalIgnoreCase)).InnerText
.Should().BeEmpty("Complex-Component");
.Should().Be("Complex-Component");

sectionNode.ChildNodes.First(n => n.Id.Equals("routeProperty", StringComparison.OrdinalIgnoreCase)).InnerText.
Should().BeEmpty("styleguide");
Should().Be("styleguide");

sectionNode.ChildNodes.First(n => n.Id.Equals("fieldContent", StringComparison.OrdinalIgnoreCase)).InnerHtml.
Should().Be(TestConstants.RichTextFieldValue1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<section class="complex-component">
<h1 id="fieldHeader" asp-for="Header"></h1>
<h2 id="routeField" asp-for="PageTitle"></h2>
<h3 id="componentProperty" asp-for="ComponentName"></h3>
<p id="routeProperty" asp-for="RouteName"></p>
<h3 id="componentProperty">@Model.ComponentName</h3>
<p id="routeProperty">@Model.RouteName</p>
<p id="routeNestedField" asp-for="RouteFields!.SearchKeywords"></p>
<div id="fieldContent" asp-for="Content"></div>
<textarea id="contextProperty" asp-for="IsEditing"></textarea>
Expand Down

0 comments on commit c60a956

Please sign in to comment.