Skip to content

Commit

Permalink
Resolve issues with the Switch Track Color tests on Windows (dotnet#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz authored Jan 31, 2024
1 parent 987fd81 commit a01e1ee
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/Core/tests/DeviceTests/Handlers/Switch/SwitchHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ public async Task IsToggledDoesNotSetSameValue()
Assert.Equal(0, fireCount);
}

[Theory(DisplayName = "Track Color Initializes Correctly"
#if WINDOWS
, Skip = "There seems to be an issue, so disable for now: https://github.com/dotnet/maui/issues/9113"
#endif
)]
[Theory(DisplayName = "Track Color Initializes Correctly")]
[InlineData(true)]
//[InlineData(false)] // Track color is not always visible when off
public async Task TrackColorInitializesCorrectly(bool isToggled)
Expand All @@ -52,22 +48,23 @@ public async Task TrackColorInitializesCorrectly(bool isToggled)
TrackColor = Colors.Red
};

await ValidateTrackColor(switchStub, Colors.Red);
await AttachAndRun(switchStub, async (handler) =>
{
await ValidateTrackColor(switchStub, Colors.Red);
});
}

[Fact(DisplayName = "Track Color Updates Correctly"
#if WINDOWS
, Skip = "There seems to be an issue, so disable for now: https://github.com/dotnet/maui/issues/9113"
#endif
)]
[Fact(DisplayName = "Track Color Updates Correctly")]
public async Task TrackColorUpdatesCorrectly()
{
var switchStub = new SwitchStub()
{
IsOn = true
};

await ValidateTrackColor(switchStub, Colors.Red, () => switchStub.TrackColor = Colors.Red);
await AttachAndRun(switchStub, async (handler) =>
{
await ValidateTrackColor(switchStub, Colors.Red, () => switchStub.TrackColor = Colors.Red);
});
}

[Fact(DisplayName = "ThumbColor Initializes Correctly", Skip = "There seems to be an issue, so disable for now: https://github.com/dotnet/maui/issues/1275")]
Expand Down

0 comments on commit a01e1ee

Please sign in to comment.