Skip to content

Commit

Permalink
fix: Make ImageStretch_None wait for images to actually load
Browse files Browse the repository at this point in the history
Images displayed on the ImageStretch_None page are coming from the uno-assets.platform.uno site, and may not have loaded yet when the sample runs
  • Loading branch information
MartinZikmund committed Dec 6, 2024
1 parent 4dabe7d commit 8e6894b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public void ImageStretch_None()
void HasValidSize(string name)
{
var rect = _app.Query(q => q.All().Marked(name)).First().Rect;
Assert.That(rect.Width != 0);
Assert.That(rect.Height != 0);
_app.WaitFor(() => rect.Width != 0 && rect.Height != 0, timeout: TimeSpan.FromSeconds(2));
}

HasValidSize("image01");
Expand Down

0 comments on commit 8e6894b

Please sign in to comment.