-
When the following button is clicked, modal appears as display is set to block (style="display:block") bunit test: markup does not change here in the test, but in the application when it is running, display: block exists. Is it because jquery of bootstrap is not loaded for bunit? How can I resolve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @bikmis bUnit runs entirely in C#, so any JavaScript you have in your components are not executed, so if you change the DOM through JavaScript/jQuery, then it will not be visible with bUnit. Ps. Modifying the DOM through JavaScript in a Blazor app is generally not recommended, as it might conflict with how Blazor works. |
Beta Was this translation helpful? Give feedback.
Hi @bikmis
bUnit runs entirely in C#, so any JavaScript you have in your components are not executed, so if you change the DOM through JavaScript/jQuery, then it will not be visible with bUnit.
Ps. Modifying the DOM through JavaScript in a Blazor app is generally not recommended, as it might conflict with how Blazor works.