bUnit icon indicating copy to clipboard operation
bUnit copied to clipboard

RenderedFragmentInvokeAsyncExtensions.InvokeAsync causes target Fragment to be disposed

Open chadmobrien opened this issue 1 year ago • 3 comments

Upgrading bUnit from 1.3.42 -> 1.9.8, I observed that a unit test calling RenderedFragmentInvokeAsyncExtensions.InvokeAsync(() => targetFragment.InvokeAsync()), causes the targetFragment to become disposed.

The targetFragment is within a ParentFragment rendered in "RenderComponentInTelerikRoot". The ParentFragment is still rendered and available. The code also remained unchanged with the exception of upgrading the Nuget packages required for the bUnit upgrade.

chadmobrien avatar Jul 28 '22 15:07 chadmobrien

Hey @chadmobrien,

by any chance do you have a small and reproducable example (component under test as well as the test itself)? That would be very awesome and handy.

linkdotnet avatar Jul 28 '22 16:07 linkdotnet

Unfortunately, the development source is on an internal network enclave, I cannot provide the source. I'll see if I can recreate a similar behavior outside of the project I work on. Is there any additional information I might be able to provide you?

chadmobrien avatar Jul 28 '22 17:07 chadmobrien

A small reproducible example is all we need :) Thanks for your effort’s

linkdotnet avatar Jul 28 '22 17:07 linkdotnet

Closing this due to inactivity. Feel free to post here again if you find a way to reproduce @chadmobrien.

egil avatar Oct 21 '22 10:10 egil