Replies: 1 comment 3 replies
-
Hey, without your test code it is really hard to tell. Could your provide that to have a better understanding? On top of my head you have an asynchronous action, so depending on the circumstances you have to await some state in the test. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a strange issue which seems to be occurring within bUnit tests, but which does not occur when running in Blazor.
I've got a Component whose Razor doesn't appear to update.
The (simplified) situation is this (in actuality, this Component is not the Subject Under Test, but actually one of the child components rendered as part of the Component Under Test).
Razor
Code-behind
When I run the test, then I use a
WaitForState()
call to check that the<p>
value updates, but it never updates; the HTML rendered is<p></p>
.But if I run in Blazor then it works fine.
However, if I make a change, and add a this property to the Razor and code behind
and change the
OnStateChanged
to set that value before theStateHasChanged
is triggered:Then it correctly renders!
Any ideas what could be happening here?
Beta Was this translation helpful? Give feedback.
All reactions