Issue with template params #1044
Closed
MartinSoka
started this conversation in
General
Replies: 2 comments
-
Hey @MartinSoka. simply speaking your HTML is invalid that is why it isn't working (in bUnit or in a browser). For example under a <table class="mud-table-root">
<colgroup></colgroup>
<thead class="mud-table-head">
<tr class="mud-table-row"></tr>
</thead>
<tbody class="mud-table-body">
<tr class="mud-table-row cursor-pointer" style="">
<td><div>Foo</div></td>
</tr>
<tr class="mud-table-row cursor-pointer" style="">
<td><div>Bar</div></td>
</tr>
<tr class="mud-table-row cursor-pointer" style="">
<td><div>Baz</div></td>
</tr>
</tbody>
</table> And the following selector |
Beta Was this translation helpful? Give feedback.
0 replies
-
thank you so much @linkdotnet! In my code i pass MudTd, hence i didn't notice the simple test actually invalidates the html table as the tds are missing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a component that contains the following params
When testing the component similar as in the following example https://github.com/bUnit-dev/bUnit/search?q=Template+Params.
I can see the divs in the Markup property of component under test, but when using MarkupMatches it always fails because it can't find the divs within my table. Any ideas why?
This is how the content of Markup prop looks like:
var divs = cut.FindAll("table>tbody>tr>div");
finds 0 Elements.Beta Was this translation helpful? Give feedback.
All reactions