bUnit icon indicating copy to clipboard operation
bUnit copied to clipboard

Add experimental support for Mobile Blazor Bindings

Open egil opened this issue 5 years ago • 4 comments

With #5 / #75 / beta-7, it should be possible to reuse the core parts of the library to add support for Mobile Blazor Bindings, including support for "razor based tests". The initial aim should be to render MBB-based components and do basics assertions against the rendered components.

Related:

  • See discussion here for more details: https://github.com/xamarin/MobileBlazorBindings/issues/42
  • @Kahbazi has a prototype that also enables something like this: https://github.com/Kahbazi/MobileBlazorBindings.Tests

Future investigations could include looking at how Xamarin apps are tested natively. Are their existing testing libs that can be reused, especially around the assertion parts.

egil avatar Apr 03 '20 09:04 egil

Hi @Eilon, at some point I would like to discuss this with you. My initial investigations showed that this could work well within the bUnit testing infrastructure in bunit.core, but it does require some changes (making things protected/virtual IIRC) to NativeComponentRenderer and/or MobileBlazorBindingsRenderer for me to hook into renderer and give bUnit the control it needs for testing.

egil avatar Aug 15 '20 12:08 egil

@egil that could be quite reasonable. Can you send a PR to Mobile Blazor Bindings to propose those changes? I tried to find the right balance for the design of the components, but the testing scenario isn't one that I have explored much yet, so I'm not surprised if there are a few things missing that would help this scenario.

Eilon avatar Aug 17 '20 17:08 Eilon

@Eilon, great. I will get back to this later then other more pressing issues are out of the way.

egil avatar Aug 17 '20 19:08 egil

Sounds good, I look forward to seeing what changes we should make!

Eilon avatar Aug 17 '20 21:08 Eilon