diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 13:02:25 -0700 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-03-22 16:13:41 -0700 |
commit | 17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch) | |
tree | b5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs | |
download | xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2 xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip |
Initial import
Diffstat (limited to 'Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs')
-rw-r--r-- | Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs b/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs new file mode 100644 index 00000000..a468e310 --- /dev/null +++ b/Xamarin.Forms.Core.iOS.UITests/Tests/Legacy-StepperUITests.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NUnit.Framework; +using System.Diagnostics; + +namespace Xamarin.Forms.Core.UITests +{ + [TestFixture] + [Category ("Stepper")] + internal class StepperGalleryTests : BaseTestFixture + { + // TODO: Checking enabled / disabled states + // TODO: Port to new conventions + + public StepperGalleryTests () + { + ShouldResetPerFixture = false; + } + + protected override void NavigateToGallery () + { + App.NavigateToGallery (GalleryQueries.StepperGalleryLegacy); + } + + [Test] + [Description ("Check all elements exist")] + public void StepperGalleryAllElementsPresent () + { +// App.WaitForElement (PlatformQueries.LabelWithText ("0")); +// var labels = App.Query (PlatformQueries.LabelWithText ("0")); +// Assert.AreEqual (2, labels.Length); + +// var steppers = App.Query (PlatformQueries.Steppers); +// Assert.AreEqual (2, steppers.Length); + +// App.Screenshot ("All elements exist"); + } + +// [Test] +// [Description ("Check that value changed event fires")] +// public void StepperGalleryValueChangedEventTest () +// { +// StepperGalleryAllElementsPresent (); +// var labelText = ""; +// for (int i = 1; i <= 5; i++) { +// App.Tap (PlatformQueries.StepperWithIndex (0)); +// App.Screenshot (string.Format ("Tapped first stepper {0} times", i)); +// App.WaitForElement (PlatformQueries.LabelWithText ((i*10).ToString ())); +// labelText = App.GetTextForQuery (PlatformQueries.LabelWithText ((i*10).ToString ())); +// Assert.AreEqual ((i*10).ToString (), labelText); +// } + +// for (int i = 1; i <= 5; i++) { +// App.Tap (PlatformQueries.StepperWithIndex (1)); +// App.Screenshot (string.Format ("Tapped second stepper {0} times", i)); +// App.WaitForElement (PlatformQueries.LabelWithText ((i*.05).ToString ())); +// labelText = App.GetTextForQuery (PlatformQueries.LabelWithText ((i*.05).ToString ())); +// Assert.AreEqual ((i*.05).ToString (), labelText); +// } +// } + +///*******************************************************/ +///**************** Landscape tests **********************/ +///*******************************************************/ + +// [Test] +// [Description ("Check all elements exist - Landscape")] +// public void StepperGalleryAllElementsPresetLandscape () +// { +// App.SetOrientationLandscape (); +// App.Screenshot ("Rotated to Landscape"); +// StepperGalleryAllElementsPresent (); +// App.SetOrientationPortrait (); +// App.Screenshot ("Rotated to Portrait"); +// } + +// [Test] +// [Description ("Check that events fire - Landscape")] +//// [Category ("Single")] +// public void StepperGalleryEventTestLandscape () +// { +// App.SetOrientationLandscape (); +// App.Screenshot ("Rotated to Landscape"); +// StepperGalleryValueChangedEventTest (); +// App.SetOrientationPortrait (); +// App.Screenshot ("Rotated to Portrait"); +// } + + } +} |