You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed Integration Test for Component and Route property binding (#5)
<!-- Provide a general summary of your changes in the Title above -->
<!-- Apply the label "bug" or "enhacement" as applicable. -->
## Description / Motivation
<!-- Describe your changes in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here. -->
The integration test for Component and Route property binding mistakenly
had `BeEmpty()` instead of `Be()`. This incorrectly made the integration
test pass since the Razor View was invalid. It was using the `asp-for`
TagHelper attribute to attempt to render the values. However the Model's
properties are of type `string?` which do not have an OOTB TagHelper for
the `h3` or `p` tags. With the view fixed this test now properly passes
and behaves as expected.
## Testing
- [X] The Unit & Intergration tests are passing.
- [X] I have added the necesary tests to cover my changes.
## Terms
<!-- Place an X in the [] to check. -->
<!-- The Code of Conduct helps create a safe space for everyone. We
require that everyone agrees to it. -->
- [X] I agree to follow this project's [Code of
Conduct](CODE_OF_CONDUCT.md).
Co-authored-by: Ivan Lieckens <[email protected]>
Copy file name to clipboardExpand all lines: tests/Sitecore.AspNetCore.SDK.RenderingEngine.Integration.Tests/Fixtures/Binding/ComplexModelBindingFixture.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -76,10 +76,10 @@ public async Task SitecoreLayoutModelBinders_BindDataCorrectly()
Copy file name to clipboardExpand all lines: tests/Sitecore.AspNetCore.SDK.RenderingEngine.Integration.Tests/Views/Shared/Components/SitecoreComponent/ComplexComponent.cshtml
0 commit comments