public void BuyTicketWithNoCVVCode() { #region TestData const string ERA = "Введите корректные данные."; #endregion Route route = RouteCreator.WithAllPropertiesJitomir(); User user = UserCreator.CorrectParameters(); MainPage fillFormsRoute = new MainPage(Driver); Autorisation autorisation = AutorisationCreator.RightParameters(); SelectTrainPage selectOther = new SelectTrainPage(Driver); Payment payment = PaymentCreator.AllCorrect(); PaymentPage paymentPage = new PaymentPage(Driver); MainPage mainPage = new MainPage(Driver); mainPage .MyTicket() .AutorisationFields(autorisation); fillFormsRoute .FillFieldFrom(route) .SelectTodayDate() .Submit(); selectOther .FillForm() .FillUserForm(user) .AcceptIATA() .BuyTicket() .BuyBuyTicket(); paymentPage .FillForm(payment) .CompleteOrder(); Assert.AreEqual(paymentPage.NoCVVErrorMessage(), ERA); }
public void BuyTicketWithoutTermsOfAnAgreement() { #region TestData const string ERA = "Нам нужно Ваше согласие с условиями договора"; #endregion Route route = RouteCreator.WithAllPropertiesJitomir(); User user = UserCreator.CorrectParameters(); MainPage fillFormsRoute = new MainPage(Driver); SelectTrainPage selectOther = new SelectTrainPage(Driver); fillFormsRoute .FillFieldFrom(route) .SelectTodayDate() .Submit(); selectOther .FillForm() .FillUserForm(user) .BuyTicket(); Assert.AreEqual(selectOther.CheckError(), ERA); }