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
In my Blazor App my components are written in a way that they can potentially run in 'InteractiveAuto' mode, i.e. be Server or wasm and talk to the back end via http clients.
While this works generally, I've found the reality to be that just because something is working on server, doesn't mean there aren't some quirks in behavior on wasm, particularly with some third party UI components that might for example, be doing a lot of JS interop. The kind of problem I might run into could be around async/await, where something will behave on server rendering, but in wasm mode, need a bit of a hacky 'await Task.Delay(5);' to kick along a bit of behavior not triggering (usually having spent too long trying variations of 'StateHasChanged()' here and there). I don't think I've found issue's in reverse, generally if it's working on wasm, it'll work on server.
Are there any recommendations on how to do automated e2e testing on Blazor with the likes of Playwright so that you know your auto components are working in both modes? And/or is there a way for a test run that you could tell the app to run all 'InteractiveAuto' components as wasm? I guess if you could do that, you could be reasonably confident(ish) that they'll behave in server mode.
In reality, I've stopped using 'InteractiveAuto' due to the above, I just run everything as 'InteractiveWebAssembly'.
I'd love to see real multi-threading on async/await with wasm, not particularly for performance reasons, but just to get more behavior parity between server and wasm.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
In my Blazor App my components are written in a way that they can potentially run in 'InteractiveAuto' mode, i.e. be Server or wasm and talk to the back end via http clients.
While this works generally, I've found the reality to be that just because something is working on server, doesn't mean there aren't some quirks in behavior on wasm, particularly with some third party UI components that might for example, be doing a lot of JS interop. The kind of problem I might run into could be around async/await, where something will behave on server rendering, but in wasm mode, need a bit of a hacky 'await Task.Delay(5);' to kick along a bit of behavior not triggering (usually having spent too long trying variations of 'StateHasChanged()' here and there). I don't think I've found issue's in reverse, generally if it's working on wasm, it'll work on server.
Are there any recommendations on how to do automated e2e testing on Blazor with the likes of Playwright so that you know your auto components are working in both modes? And/or is there a way for a test run that you could tell the app to run all 'InteractiveAuto' components as wasm? I guess if you could do that, you could be reasonably confident(ish) that they'll behave in server mode.
In reality, I've stopped using 'InteractiveAuto' due to the above, I just run everything as 'InteractiveWebAssembly'.
I'd love to see real multi-threading on async/await with wasm, not particularly for performance reasons, but just to get more behavior parity between server and wasm.
Beta Was this translation helpful? Give feedback.
All reactions