Skip to content

Commit

Permalink
chore: Fix When_Image_Source_Nullify race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Oct 4, 2024
1 parent 696e3bc commit c0fe0c4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,20 @@ public async Task When_Image_Source_Nullify()
{
Width = 100,
Height = 100,
Source = new BitmapImage(new Uri("ms-appx:///Assets/square100.png")),
Stretch = Stretch.Fill
};

var imageOpened = false;
image.ImageOpened += (_, _) => imageOpened = true;

SUT.Source = new BitmapImage(new Uri("ms-appx:///Assets/square100.png"));

parent.Child = SUT;
WindowHelper.WindowContent = parent;
await WindowHelper.WaitForLoaded(parent);

await TestServices.WindowHelper.WaitFor(() => imageOpened, 3000);

var result = await TakeScreenshot(parent);

var sample = parent.GetRelativeCoords(SUT);
Expand Down

0 comments on commit c0fe0c4

Please sign in to comment.