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
Thanks for creating this awesome library. I found a little issue:
I have a Component1 with a SfButton and a Component2 inside. I try to stub the Component2, but the button i would use, because i want to test some functionality with him. Therefore i have to call AddSyncfusionBlazor to register the services. If i do that the ComponentFactories.AddStub has no effect anymore....
Is there a work around to add the Syncfusion components and using the ComponentsFactroy together?
That interferes with how the ComponentFactories work:
// This is taken from the Bunit TestContextBase
Services.AddSingleton<IComponentActivator>(new BunitComponentActivator(ComponentFactories));
So essentially "our" activator gets replaced with SyncFusions one.
I am not sure why SyncFusion overrides the activator. But maybe something where we (@egil) have to add an extension point for 3rd party libraries so they can safely add their behavior without breaking the internals of bunit.
Ahh, yeah, remember thinking about this scenario of multiple IComponentActivator's competing.
We could change our implementation such that the BunitComponentActivator is instantiated in the TestRenderer and any other IComponentActivator registered in the service collection as input. It would then fall back to using that or to the default Blazor ComponnetActivator. That may be a good idea regardless, since the Blazor team may update theirs.
Hello
Thanks for creating this awesome library. I found a little issue:
I have a Component1 with a SfButton and a Component2 inside. I try to stub the Component2, but the button i would use, because i want to test some functionality with him. Therefore i have to call AddSyncfusionBlazor to register the services. If i do that the ComponentFactories.AddStub has no effect anymore....
Is there a work around to add the Syncfusion components and using the ComponentsFactroy together?
I have created a little project to demonstrate the issue in two tests:
TestBunitComponentFactories.zip
Regards
Benny
The text was updated successfully, but these errors were encountered: