Skip to content

Commit

Permalink
chore: Fix few more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored and MartinZikmund committed Apr 22, 2024
1 parent febdc1c commit 282761e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task When_Detached_From_Window_While_Theme_Changed()
WindowHelper.WindowContent = SUT;
await WindowHelper.WaitForLoaded(SUT);

Assert.AreEqual(Colors.Black, (SUT.Foreground as SolidColorBrush)?.Color);
Assert.AreEqual(Color.FromArgb(0xE4, 0, 0, 0), (SUT.Foreground as SolidColorBrush)?.Color);

WindowHelper.WindowContent = null;
await WindowHelper.WaitForIdle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1984,10 +1984,10 @@ string RandomString(int length)
// since this is originally a virtualization issue and references
// could be to different things than those shown on the screen.
var si = await UITestHelper.ScreenShot(list, true);
ImageAssert.HasColorAt(si, 70, 65, Colors.FromARGB("#66AEE7")); // selected
ImageAssert.HasColorAt(si, 70, 65, Colors.FromARGB("#1A69A6")); // selected

// check starting from below the second item that nothing looks selected or hovered
ImageAssert.DoesNotHaveColorInRectangle(si, new Rectangle(100, 110, si.Width - 100, si.Height - 110), Colors.FromARGB("#66AEE7")); // selected
ImageAssert.DoesNotHaveColorInRectangle(si, new Rectangle(100, 110, si.Width - 100, si.Height - 110), Colors.FromARGB("#1A69A6")); // selected
ImageAssert.DoesNotHaveColorInRectangle(si, new Rectangle(100, 110, si.Width - 100, si.Height - 110), Colors.FromARGB("#FFE6E6E6")); // hovered
}

Expand Down

0 comments on commit 282761e

Please sign in to comment.