From 2bbaf74d8f05184b4d7873e526dc97935efd6096 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 4 Feb 2023 00:13:25 +0100 Subject: [PATCH] Fix integration tests on macOS. Seems that the version of macOS on the test runner applies some shading to the top of the window. Check the color of a pixel lower down. --- tests/Avalonia.IntegrationTests.Appium/WindowTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs b/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs index 3b74ed314b..7bb991aae6 100644 --- a/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs +++ b/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs @@ -202,7 +202,7 @@ namespace Avalonia.IntegrationTests.Appium window.Click(); var img = SixLabors.ImageSharp.Image.Load(screenshot.AsByteArray); - var topLeftColor = img[1, 1]; + var topLeftColor = img[10, 10]; var centerColor = img[img.Width / 2, img.Height / 2]; Assert.Equal(new Rgba32(0, 128, 0), topLeftColor); @@ -223,7 +223,7 @@ namespace Avalonia.IntegrationTests.Appium window.Click(); var img = SixLabors.ImageSharp.Image.Load(screenshot.AsByteArray); - var topLeftColor = img[1, 1]; + var topLeftColor = img[10, 10]; var centerColor = img[img.Width / 2, img.Height / 2]; Assert.Equal(new Rgba32(0, 128, 0), topLeftColor);