Skip to content

Commit 9206477

Browse files
committed
chore: moar testing
The story so far: `Given_ContentDialog.When_SimpleContentDialog()` is failing, e.g. ImageAssert.AreEqual @ line 45 pixelTolerance: Color Cumulative tolerance of 20 | Location PerRange tolerance of 0,0 pixels. expected: When_Dialog_Before (When_SimpleContentDialogSimpleDialogCodebehindButton_0_False_When_Dialog_Before.png {Width=1024, Height=768}) in {X=0,Y=0,Width=1024,Height=768} actual : When_Dialog_Closed (When_SimpleContentDialogSimpleDialogCodebehindButton_0_False_When_Dialog_Closed.png {Width=1024, Height=768}) in {X=0,Y=0,Width=1024,Height=768} When_Dialog_Before: 564,688: expected: [564,688] FFF4F4EA | actual: [564,688] FFEDEDF3 a tolerance of 23 [Cumulative] would be required for this test to pass. Current: Color Cumulative tolerance of 20 | Location PerRange tolerance of 0,0 pixels. With expectedRect: {X=0,Y=0,Width=2147483647,Height=2147483647} With actualRect: {X=0,Y=0,Width=2147483647,Height=2147483647} With expectedToActualScale: 1 With local manual testing, our conjecture is that the color change is due to the "pointer over" effect: 1. When taking the "Before" picture, the **Content Dialogs** button is *yellow*, as per 08accad. 2. Meanwhile, the "After" pictures are *not* yellow. Thus, we believe that: 1. App is launched 2. **Test Harness** > **Dialogs** is clicked. 3. **Content Dialogs** (bottom of the screen* is clicked.) This is the effective beginning of the `When_SimpleContentDialog()` test. 4. The "mouse" cursor *remains* over **Content Dialogs** at this point, conferring the "pointer over" effect. 5. The "When_Dialog_Before" screenshot is taken. 6. The unit test does "stuff" 7. The "When_Dialog_Closed" screenshot is taken. 8. (5) and (7) are compared. However, as the mouse cursor *isn't* over **Content Dialog** when (7) occurs, the images *differ*. As an attempted workaround, "move the mouse" between (3) and (4) by "tapping" the **Message Dialog Tests** (`DialogsContentDialogsPage`) *header*. This isn't a button, clicking it does *nothing*, but clicking it should "move" the mouse away from `ContentDialogsButton`. This should improve the "Before" image, fixing the image comparison.
1 parent ac47351 commit 9206477

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

testing/TestHarness/TestHarness.UITest/Ext/Navigation/Dialogs/Given_ContentDialog.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public async Task When_SimpleContentDialog(string dialogButton, int delayInSecon
1313
App.WaitThenTap("ContentDialogsButton");
1414

1515
App.WaitElement("DialogsContentDialogsPage");
16+
App.Tap("DialogsContentDialogsPage");
1617
App.Wait(TimeSpan.FromSeconds(1));
1718
var screenBefore = TakeScreenshot("When_Dialog_Before");
1819
App.FastTap(dialogButton);

0 commit comments

Comments
 (0)