Esempio n. 1
0
        public void BuyTicketWithoutAllData()
        {
            #region TestData
            const string ERA = "Это поле необходимо заполнить";
            #endregion

            Route           route          = RouteCreator.WithAllPropertiesJitomir();
            MainPage        fillFormsRoute = new MainPage(Driver);
            SelectTrainPage selectOther    = new SelectTrainPage(Driver);
            fillFormsRoute
            .FillFieldFrom(route)
            .SelectTodayDate()
            .Submit();
            selectOther
            .FillForm()
            .BuyTicket();

            Assert.AreEqual(selectOther.CheckError(), ERA);
        }
Esempio n. 2
0
        public void BuyTicketWithIncorrectEmail()
        {
            #region TestData
            const string ERA = "Пожалуйста, введите корректный адрес электронной почты";
            #endregion

            Route           route          = RouteCreator.WithAllPropertiesJitomir();
            User            user           = UserCreator.WrongEmail();
            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);
        }
Esempio n. 3
0
        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);
        }