예제 #1
0
        public void Selenium_SubmitSurvey_WithValidData_GoToResultPage()
        {
            SurveyPage entryPage = new SurveyPage(driver);

            entryPage.Navigate();

            SurveyResultPage resultPage = entryPage.FillOutForm("Cuyahoga Valley National Park", "*****@*****.**", "Ohio", "Extremely Active");

            Assert.AreEqual("Cuyahoga Valley National Park", resultPage.ParkName.Text);
            //Assert.AreEqual("6", resultPage.NumberOfVotes.Text);
            //Assert.AreEqual("*****@*****.**", resultPage.Email.Text);
            //Assert.AreEqual("Ohio", resultPage.State.Text);
            //Assert.AreEqual("ExtremlyActive", resultPage.SatisfactionScore.Text);
        }
예제 #2
0
 /// <summary>
 /// User wants to see a survey
 /// </summary>
 void SurveyList_ItemTapped(object sender, ItemTappedEventArgs e)
 {
     // Use Tapped instead of selected to allow the re-selection of the item without crashing Android
     SurveyCellViewModel cell = (SurveyCellViewModel)e.Item;
     cell.BackgroundColor = Color.FromHex ("#FF4F45");
     Survey item = cell.Survey;
     Page sp;
     if (App.isAdmin())
     {
         if (Device.OS == TargetPlatform.WinPhone)
         {
             Device.BeginInvokeOnMainThread(() => DisplayAlert("Not supported", "Due to technical reasons, this Action is not supported on WindowsPhone at the moment.", "OK"));
             return;
         }
         sp = new SurveyResultPage(item);
     }
     else
     {
         sp = new SurveyPage(item);
     }
     cell.BackgroundColor = this.BackgroundColor;
     Navigation.PushAsync (sp);
 }