bUnit - Testing dialog content in MudBlazor #3604
Unanswered
nealrobben
asked this question in
Q&A
Replies: 1 comment
-
|
Facing a similar issue here |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking to experiment with bUnit in my blazor project, but I am having trouble with the following:
In my project I use MudBlazor components.
I have a popup dialog in my application that displays the details for a certain record and I would like to test that it is rendered correctly.
The problem I have is that in my unit test, after rendering the component the markup is empty.
In the component I am rendering I have all the content enclosed in tags. Everything inside these tags is NOT rendered and just translated into empty markup.
If I put content outside the MudDialog-tags it is picked up as markup.
So my question is now why the content of my dialog is not rendering in the unit test. I do not get any errors so there is no real indication of anything going wrong. It's just that the content is empty.
I have tried taking all the content inside the MudDialog tags and placing it outside these tags. This does give me correctly rendered content in my test. However, this won't display correctly when actually using the application.
Because of this I do believe I have all my dependencies set up correctly, since this would not render otherwise.
I am not sure what I am doing wrong and I hope someone can give me a clue on how to proceed.
Beta Was this translation helpful? Give feedback.
All reactions