Skip to content

Commit

Permalink
Reenabled ReturnsNonEmptyNativeBoundingBox tests on Windows (#20238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz authored Apr 26, 2024
1 parent 409c620 commit 70c2903
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,7 @@ public async Task ReturnsNonEmptyPlatformViewBounds(int size)
Assert.NotEqual(platformViewBounds, new Graphics.Rect());
}

[Theory(DisplayName = "Native View Bounding Box is not empty"
#if WINDOWS
, Skip = "https://github.com/dotnet/maui/issues/9054"
#endif
)]
[Theory(DisplayName = "Native View Bounding Box is not empty")]
[InlineData(1)]
[InlineData(100)]
[InlineData(1000)]
Expand Down Expand Up @@ -306,6 +302,12 @@ public virtual async Task ReturnsNonEmptyNativeBoundingBox(int size)
{
// https://github.com/dotnet/maui/issues/11020
}
#endif
#if WINDOWS
else if (view is IContentView)
{
// https://github.com/dotnet/maui/issues/20228
}
#endif
else if (view is IProgress)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ namespace Microsoft.Maui.DeviceTests
{
public partial class DatePickerHandlerTests
{
[Theory(DisplayName = "Native View Bounding Box is not empty")]
[InlineData(1)]
[InlineData(100)]
[InlineData(1000)]
public override async Task ReturnsNonEmptyNativeBoundingBox(int size)
{
var datePicker = new DatePickerStub()
{
Height = size,
Width = size,
Date = DateTime.Today,
MinimumDate = DateTime.Today.AddDays(-1),
MaximumDate = DateTime.Today.AddDays(1)
};

var nativeBoundingBox = await GetValueAsync(datePicker, handler => GetBoundingBox(handler));
Assert.NotEqual(nativeBoundingBox, Rect.Zero);

var expectedSize = new Size(size, size);
AssertWithinTolerance(expectedSize, nativeBoundingBox.Size);
}

[Fact]
public override async Task DisconnectHandlerDoesntCrash()
{
Expand Down

0 comments on commit 70c2903

Please sign in to comment.