Exemple #1
0
        public virtual void TestSetup()
        {
            App = AppInitializer.StartApp(Platform);

            WeatherPage  = new WeatherPage(App, Platform);
            ForecastPage = new ForecastPage(App, Platform);
        }
Exemple #2
0
        public void TapFeedbackButton()
        {
            //Arrange

            //Act
            WeatherPage.TapFeedbackButton();

            //Assert
            Assert.IsTrue(WeatherPage.IsFeedbackPageOpen());
        }
Exemple #3
0
        public void TapCrashButton()
        {
            //Arrange

            //Act
            WeatherPage.TapForecastTab();
            ForecastPage.TapCrashButton();

            //Assert
        }
Exemple #4
0
        void ToggleScreens(bool isToggleScreensEnabled)
        {
            if (!isToggleScreensEnabled)
            {
                return;
            }

            if (WeatherPage.IsWeatherPageVisible())
            {
                WeatherPage.TapForecastTab();
                ForecastPage.TapWeatherTab();
            }
            else
            {
                ForecastPage.TapWeatherTab();
                WeatherPage.TapForecastTab();
            }
        }
Exemple #5
0
        public void GetWeatherUsingGPS(bool toggleScreensBeforeTest)
        {
            //Arrange
            string actualTemperatureLabelText, actualConditionLabelText;

            //Act
            ToggleScreens(toggleScreensBeforeTest);

            WeatherPage.ToggleGPSSwitch();
            WeatherPage.TapGetWeatherButton();

            Thread.Sleep(2000);

            WeatherPage.WaitForNoActivityIndicator();

            //Assert
            actualConditionLabelText   = WeatherPage.GetConditionText();
            actualTemperatureLabelText = WeatherPage.GetTemperatureText();
            Assert.IsNotEmpty(actualConditionLabelText, "Condition Text Is Empty");
            Assert.IsNotEmpty(actualTemperatureLabelText, "Temperature Text Is Empty");
        }
Exemple #6
0
        public void GetWeatherUsingText(string location, bool toggleScreensBeforeTest)
        {
            //Arrange
            string expectedConditionCityText = ParseConditionCityFromString(location, ',');
            string actualTemperatureLabelText, actualConditionCityText;

            //Act
            ToggleScreens(toggleScreensBeforeTest);

            WeatherPage.EnterLocation(location);
            WeatherPage.TapGetWeatherButton();

            Thread.Sleep(2000);

            WeatherPage.WaitForNoActivityIndicator();

            //Assert
            actualConditionCityText    = ParseConditionCityFromString(WeatherPage.GetConditionText(), ':');
            actualTemperatureLabelText = WeatherPage.GetTemperatureText();
            Assert.AreEqual(expectedConditionCityText, actualConditionCityText, "Exptected Condition City Does Not Match Actual Condition City");
            Assert.IsNotEmpty(actualTemperatureLabelText, "Temperature Text Is Empty");
        }
Exemple #7
0
 public override void TestSetup()
 {
     base.TestSetup();
     WeatherPage.WaitForPageToLoad();
     App.Screenshot("App Launched");
 }