Skip to content

Commit

Permalink
Renamed RunningApp to App to easily reenable ported tests from Xamari…
Browse files Browse the repository at this point in the history
…n.UITest (dotnet#25522)
  • Loading branch information
jsuarezruiz authored Oct 25, 2024
1 parent d541b54 commit ab4a200
Show file tree
Hide file tree
Showing 192 changed files with 1,513 additions and 1,513 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public Bugzilla36955(TestDevice testDevice) : base(testDevice)
// [Test]
// public void Bugzilla36955Test()
// {
// AppResult[] buttonFalse = RunningApp.Query(q => q.Button().Text("False"));
// AppResult[] buttonFalse = App.Query(q => q.Button().Text("False"));
// Assert.AreEqual(buttonFalse.Length == 1, true);
// RunningApp.Tap(q => q.Class("Switch"));
// AppResult[] buttonTrue = RunningApp.Query(q => q.Button().Text("True"));
// App.Tap(q => q.Class("Switch"));
// AppResult[] buttonTrue = App.Query(q => q.Button().Text("True"));
// Assert.AreEqual(buttonTrue.Length == 1, true);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public Bugzilla45926(TestDevice testDevice) : base(testDevice)
// [FailsOnAndroidWhenRunningOnXamarinUITest]
// public void Issue45926Test()
// {
// RunningApp.WaitForElement(q => q.Marked("New Page"));
// App.WaitForElement(q => q.Marked("New Page"));

// RunningApp.Tap(q => q.Marked("New Page"));
// RunningApp.WaitForElement(q => q.Marked("Second Page #1"));
// RunningApp.Back();
// RunningApp.WaitForElement(q => q.Marked("Intermediate Page"));
// RunningApp.Back();
// RunningApp.Tap(q => q.Marked("Do GC"));
// RunningApp.Tap(q => q.Marked("Do GC"));
// RunningApp.Tap(q => q.Marked("Send Message"));
// RunningApp.Tap(q => q.Marked("Do GC"));
// App.Tap(q => q.Marked("New Page"));
// App.WaitForElement(q => q.Marked("Second Page #1"));
// App.Back();
// App.WaitForElement(q => q.Marked("Intermediate Page"));
// App.Back();
// App.Tap(q => q.Marked("Do GC"));
// App.Tap(q => q.Marked("Do GC"));
// App.Tap(q => q.Marked("Send Message"));
// App.Tap(q => q.Marked("Do GC"));

// RunningApp.WaitForElement(q => q.Marked("Instances: 0"));
// RunningApp.WaitForElement(q => q.Marked("Messages: 0"));
// App.WaitForElement(q => q.Marked("Instances: 0"));
// App.WaitForElement(q => q.Marked("Messages: 0"));
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ public Bugzilla46363(TestDevice testDevice) : base(testDevice)
// [Test]
// public void _46363_Tap_Succeeds()
// {
// RunningApp.WaitForElement(Testing);
// RunningApp.Tap(Target);
// RunningApp.WaitForElement(TapSuccess);
// App.WaitForElement(Testing);
// App.Tap(Target);
// App.WaitForElement(TapSuccess);

// // First run at fixing this caused the context menu to open on a regular tap
// // So this check is to ensure that doesn't happen again
// RunningApp.WaitForNoElement(ContextAction);
// App.WaitForNoElement(ContextAction);
// }

// [FailsOnAndroidWhenRunningOnXamarinUITest]
// [FailsOnIOSWhenRunningOnXamarinUITest]
// [Test]
// public void _46363_ContextAction_Succeeds()
// {
// RunningApp.WaitForElement(Testing);
// RunningApp.ActivateContextMenu(Target);
// RunningApp.WaitForElement(ContextAction);
// RunningApp.Tap(ContextAction);
// RunningApp.WaitForElement(ContextSuccess);
// App.WaitForElement(Testing);
// App.ActivateContextMenu(Target);
// App.WaitForElement(ContextAction);
// App.Tap(ContextAction);
// App.WaitForElement(ContextSuccess);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ public Bugzilla46363_2(TestDevice testDevice) : base(testDevice)
// [Test]
// public void _46363_2_Tap_Succeeds()
// {
// RunningApp.WaitForElement(Testing);
// RunningApp.Tap(Target);
// RunningApp.WaitForElement(TapSuccess);
// App.WaitForElement(Testing);
// App.Tap(Target);
// App.WaitForElement(TapSuccess);

// // Verify that we aren't also opening the context menu
// RunningApp.WaitForNoElement(ContextAction);
// App.WaitForNoElement(ContextAction);
// }

// [FailsOnAndroidWhenRunningOnXamarinUITest]
// [FailsOnIOSWhenRunningOnXamarinUITest]
// [Test]
// public void _46363_2_ContextAction_Succeeds()
// {
// RunningApp.WaitForElement(Testing);
// RunningApp.ActivateContextMenu(Target);
// RunningApp.WaitForElement(ContextAction);
// RunningApp.Tap(ContextAction);
// RunningApp.WaitForElement(ContextSuccess);
// App.WaitForElement(Testing);
// App.ActivateContextMenu(Target);
// App.WaitForElement(ContextAction);
// App.Tap(ContextAction);
// App.WaitForElement(ContextSuccess);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public Bugzilla47923(TestDevice testDevice) : base(testDevice)
// {
// foreach (var testString in new[] { "AspectFit", "AspectFill", "Fill", "Test cell views" })
// {
// RunningApp.WaitForElement(q => q.Marked(testString));
// RunningApp.Tap(q => q.Marked(testString));
// RunningApp.Back();
// App.WaitForElement(q => q.Marked(testString));
// App.Tap(q => q.Marked(testString));
// App.Back();
// }
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public Bugzilla52419(TestDevice testDevice) : base(testDevice)
// [FailsOnAndroidWhenRunningOnXamarinUITest]
// public void Bugzilla52419Test()
// {
// RunningApp.WaitForElement(q => q.Marked("Push new page"));
// RunningApp.Tap(q => q.Marked("Push new page"));
// RunningApp.WaitForElement(q => q.Marked("Push new page"));
// RunningApp.Tap(q => q.Marked("Push new page"));
// RunningApp.WaitForElement(q => q.Marked("Push new page"));
// RunningApp.Tap(q => q.Marked("Push new page"));
// RunningApp.Tap(q => q.Marked("Tab Page 2"));
// RunningApp.Tap(q => q.Marked("Tab Page 1"));
// RunningApp.Tap(q => q.Marked("Tab Page 2"));
// RunningApp.Tap(q => q.Marked("Tab Page 1"));
// RunningApp.Back();
// RunningApp.WaitForElement(q => q.Marked("AppearanceLabel"));
// var label = RunningApp.Query(q => q.Marked("AppearanceLabel"))[0];
// App.WaitForElement(q => q.Marked("Push new page"));
// App.Tap(q => q.Marked("Push new page"));
// App.WaitForElement(q => q.Marked("Push new page"));
// App.Tap(q => q.Marked("Push new page"));
// App.WaitForElement(q => q.Marked("Push new page"));
// App.Tap(q => q.Marked("Push new page"));
// App.Tap(q => q.Marked("Tab Page 2"));
// App.Tap(q => q.Marked("Tab Page 1"));
// App.Tap(q => q.Marked("Tab Page 2"));
// App.Tap(q => q.Marked("Tab Page 1"));
// App.Back();
// App.WaitForElement(q => q.Marked("AppearanceLabel"));
// var label = App.Query(q => q.Marked("AppearanceLabel"))[0];
// Assert.AreEqual("Times Appeared: 2", label.Text);
// }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public Bugzilla53179_1(TestDevice testDevice) : base(testDevice)
// [Category(UITestCategories.Navigation)]
// public void PopAsyncAfterRemovePageDoesNotCrash()
// {
// RunningApp.WaitForElement(StartTest);
// RunningApp.Tap(StartTest);
// RunningApp.WaitForElement(RootLabel);
// App.WaitForElement(StartTest);
// App.Tap(StartTest);
// App.WaitForElement(RootLabel);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public Bugzilla53179_2(TestDevice testDevice) : base(testDevice)
// [FailsOnAndroidWhenRunningOnXamarinUITest]
// public void RemovePageOnAppearingDoesNotCrash()
// {
// RunningApp.WaitForElement(Success);
// App.WaitForElement(Success);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public Bugzilla57317(TestDevice testDevice) : base(testDevice)
// [FailsOnIOS]
// public void Bugzilla57317Test()
// {
// RunningApp.WaitForFirstElement("Cell");
// App.WaitForFirstElement("Cell");

// RunningApp.ActivateContextMenu("Cell");
// App.ActivateContextMenu("Cell");

// RunningApp.WaitForFirstElement("Self-Deleting item");
// RunningApp.Tap(c => c.Marked("Self-Deleting item"));
// App.WaitForFirstElement("Self-Deleting item");
// App.Tap(c => c.Marked("Self-Deleting item"));
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public Bugzilla57515(TestDevice testDevice) : base(testDevice)
// [FailsOnIOSWhenRunningOnXamarinUITest]
// public void Bugzilla57515Test()
// {
// RunningApp.WaitForElement(ZoomContainer);
// RunningApp.WaitForElement("1");
// RunningApp.PinchToZoomIn(ZoomContainer);
// RunningApp.WaitForNoElement("1"); // The scale should have changed during the zoom
// App.WaitForElement(ZoomContainer);
// App.WaitForElement("1");
// App.PinchToZoomIn(ZoomContainer);
// App.WaitForNoElement("1"); // The scale should have changed during the zoom
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public Bugzilla57749(TestDevice testDevice) : base(testDevice)
// public async Task Bugzilla57749Test()
// {
// await Task.Delay(500);
// RunningApp.Tap(c => c.Marked("btnClick"));
// RunningApp.WaitForElement (q => q.Marked ("Button was clicked"));
// RunningApp.Tap("Ok");
// App.Tap(c => c.Marked("btnClick"));
// App.WaitForElement (q => q.Marked ("Button was clicked"));
// App.Tap("Ok");
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public Bugzilla58779(TestDevice testDevice) : base(testDevice)
// [FailsOnIOSWhenRunningOnXamarinUITest]
// public void Bugzilla58779Test()
// {
// RunningApp.WaitForElement(q => q.Marked(ButtonId));
// RunningApp.Tap(q => q.Marked(ButtonId));
// RunningApp.Screenshot("Check list fits on screen");
// RunningApp.WaitForElement(q => q.Marked(CancelId));
// RunningApp.Tap(q => q.Marked(CancelId));
// App.WaitForElement(q => q.Marked(ButtonId));
// App.Tap(q => q.Marked(ButtonId));
// App.Screenshot("Check list fits on screen");
// App.WaitForElement(q => q.Marked(CancelId));
// App.Tap(q => q.Marked(CancelId));
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@ public Bugzilla58833(TestDevice testDevice) : base(testDevice)
// public void Bugzilla58833Test()
// {
// // Item #1 should not have a tap gesture, so it should be selectable
// RunningApp.WaitForElement(q => q.Marked("Item #1"));
// RunningApp.Tap(q => q.Marked("Item #1"));
// RunningApp.WaitForElement(q => q.Marked(ItemSelectedSuccess));
// App.WaitForElement(q => q.Marked("Item #1"));
// App.Tap(q => q.Marked("Item #1"));
// App.WaitForElement(q => q.Marked(ItemSelectedSuccess));

// // Item #2 should have a tap gesture
// RunningApp.WaitForElement(q => q.Marked("Item #2"));
// RunningApp.Tap(q => q.Marked("Item #2"));
// RunningApp.WaitForElement(q => q.Marked(TapGestureSucess));
// App.WaitForElement(q => q.Marked("Item #2"));
// App.Tap(q => q.Marked("Item #2"));
// App.WaitForElement(q => q.Marked(TapGestureSucess));

// // Both items should allow access to the context menu
// RunningApp.ActivateContextMenu("Item #2");
// RunningApp.WaitForElement("2 Action");
// App.ActivateContextMenu("Item #2");
// App.WaitForElement("2 Action");
// #if __ANDROID__
// RunningApp.Back();
// App.Back();
// #else
// RunningApp.Tap(q => q.Marked("Item #3"));
// App.Tap(q => q.Marked("Item #3"));


// RunningApp.ActivateContextMenu("Item #1");
// RunningApp.WaitForElement("1 Action");
// App.ActivateContextMenu("Item #1");
// App.WaitForElement("1 Action");
// #if __ANDROID__
// RunningApp.Back();
// App.Back();
// #else
// RunningApp.Tap(q => q.Marked("Item #3"));
// App.Tap(q => q.Marked("Item #3"));
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ public Bugzilla58875(TestDevice testDevice) : base(testDevice)
// [Category(UITestCategories.ContextActions)]
// public void Bugzilla58875Test()
// {
// RunningApp.WaitForElement(q => q.Marked(Button1Id));
// RunningApp.Tap(q => q.Marked(Button1Id));
// RunningApp.WaitForElement(q => q.Marked(Target));
// RunningApp.ActivateContextMenu(Target);
// RunningApp.WaitForElement(q => q.Marked(ContextAction));
// RunningApp.Back();
// App.WaitForElement(q => q.Marked(Button1Id));
// App.Tap(q => q.Marked(Button1Id));
// App.WaitForElement(q => q.Marked(Target));
// App.ActivateContextMenu(Target);
// App.WaitForElement(q => q.Marked(ContextAction));
// App.Back();

// #if ANDROID
// RunningApp.Back(); // back button dismisses the ContextAction first, so we need to hit back one more time to get to previous page
// App.Back(); // back button dismisses the ContextAction first, so we need to hit back one more time to get to previous page
// #endif

// RunningApp.WaitForElement(q => q.Marked(Button1Id));
// RunningApp.Tap(q => q.Marked(Button1Id));
// RunningApp.WaitForElement(q => q.Marked(Target));
// RunningApp.ActivateContextMenu(Target);
// RunningApp.WaitForElement(q => q.Marked(ContextAction));
// App.WaitForElement(q => q.Marked(Button1Id));
// App.Tap(q => q.Marked(Button1Id));
// App.WaitForElement(q => q.Marked(Target));
// App.ActivateContextMenu(Target);
// App.WaitForElement(q => q.Marked(ContextAction));
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public Bugzilla59580(TestDevice testDevice) : base(testDevice)
// [FailsOnIOSWhenRunningOnXamarinUITest]
// public void RaisingCommandCanExecuteChangedCausesCrashOnAndroid()
// {
// RunningApp.WaitForElement(c => c.Marked("Cell"));
// App.WaitForElement(c => c.Marked("Cell"));

// RunningApp.ActivateContextMenu("Cell");
// App.ActivateContextMenu("Cell");

// RunningApp.WaitForElement(c => c.Marked("Fire CanExecuteChanged"));
// RunningApp.Tap(c => c.Marked("Fire CanExecuteChanged"));
// RunningApp.WaitForElement("Cell");
// App.WaitForElement(c => c.Marked("Fire CanExecuteChanged"));
// App.Tap(c => c.Marked("Fire CanExecuteChanged"));
// App.WaitForElement("Cell");
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public Bugzilla59718(TestDevice testDevice) : base(testDevice)
// [FailsOnIOSWhenRunningOnXamarinUITest]
// public void Bugzilla59718Test()
// {
// RunningApp.WaitForElement(q => q.Marked(Target1));
// RunningApp.Tap(q => q.Marked(Target1));
// App.WaitForElement(q => q.Marked(Target1));
// App.Tap(q => q.Marked(Target1));

// RunningApp.WaitForElement(q => q.Marked(Target1b));
// App.WaitForElement(q => q.Marked(Target1b));

// RunningApp.WaitForElement(q => q.Marked(Target2));
// RunningApp.Tap(q => q.Marked(Target2));
// App.WaitForElement(q => q.Marked(Target2));
// App.Tap(q => q.Marked(Target2));

// RunningApp.WaitForElement(q => q.Marked(Target3));
// App.WaitForElement(q => q.Marked(Target3));

// RunningApp.WaitForElement(q => q.Marked(GoBackButtonId));
// RunningApp.Tap(q => q.Marked(GoBackButtonId));
// App.WaitForElement(q => q.Marked(GoBackButtonId));
// App.Tap(q => q.Marked(GoBackButtonId));

// RunningApp.WaitForElement(q => q.Marked(Target1));
// App.WaitForElement(q => q.Marked(Target1));
// }
}
Loading

0 comments on commit ab4a200

Please sign in to comment.