Generic wrapper around testable component for required dependencies #1421
    Answered  by linkdotnet  
    danielchalmers   asked this question in Q&A 
 -
|   I'm testing a MudBlazor component that spawns another element using a  @* PopoverProviderWrapper *@ <MudPopoverProvider /> @ChildContent @code { [Parameter] public RenderFragment ChildContent { get; set; } }var child = RenderComponent<MyChildComponent>(p => p.Add(x => x.Xyz, xyz) ); var cut = RenderComponent<PopoverProviderWrapper>(p => p.AddChildContent(child) );Is this the canonical way of doing it? I need the child to be an IRenderedComponent to do the actual testing, how do I make that work? Thank you!  |  
Beta Was this translation helpful? Give feedback.
   Answered by  linkdotnet    Mar 20, 2024   
 Replies: 1 comment 8 replies
-
|   Hey @danielchalmers you might want to checkout the following discussion we had earlier: #663 (reply in thread) Does that fit your needs?  |  
Beta Was this translation helpful? Give feedback.
  8 replies  
  Answer selected by danielchalmers 
  Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment 
 
Hey @danielchalmers
you might want to checkout the following discussion we had earlier: #663 (reply in thread)
Does that fit your needs?