Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void AutorisationAccept()
        {
            #region TestData
            const string ERA = "Мой билет";
            #endregion

            Autorisation autorisation = AutorisationCreator.RightParameters();
            MainPage     mainPage     = new MainPage(Driver);
            mainPage
            .MyTicket()
            .AutorisationFields(autorisation);

            Assert.AreEqual(mainPage.CheckLogOutText(), ERA);
        }
Exemplo n.º 3
0
        public void AutorisationFail()
        {
            #region TestData
            const string ERA = "Вам не удалось авторизоваться. Для ознакомления с возможными причинами, перейдите по ссылке";
            #endregion

            Autorisation autorisation = AutorisationCreator.WrongEmail();
            MainPage     mainPage     = new MainPage(Driver);
            mainPage
            .MyTicket()
            .AutorisationFields(autorisation);

            Assert.AreEqual(mainPage.AutorisationErrorCheck(), ERA);
        }