Ejemplo n.º 1
0
        public void TicketBookingForPassengerWhoIsLessThanTwelveYearsOld()
        {
            RouteCreator         routeCreator         = new RouteCreator();
            PassengerCreator     passengerCreator     = new PassengerCreator();
            HomePage             homePage             = new HomePage(driver);
            PassengerDetailsPage passengerDetailsPage = homePage
                                                        .AcceptCookie()
                                                        .EnterDepartureCity(routeCreator.WithAllProperties())
                                                        .EnterArrivalCity(routeCreator.WithAllProperties())
                                                        .SelectOneWayRoute()
                                                        .EnterOneWayLeaveDate(routeCreator.WithAllProperties())
                                                        .ClickTicketsSearchButton()
                                                        .SelectFlight()
                                                        .ClickContinueButton()
                                                        .ChooseTitle()
                                                        .EnterFirstName(passengerCreator.WithAllProperties())
                                                        .EnterFamilyName(passengerCreator.WithAllProperties())
                                                        .ChooseDayOfBirth(passengerCreator.WithAllProperties())
                                                        .ChooseMonthOfBirth(passengerCreator.WithAllProperties())
                                                        .ChooseYearOfBirth(passengerCreator.WithInvalidYearOfBirth())
                                                        .ChooseLandline(passengerCreator.WithAllProperties())
                                                        .EnterMobilePhone(passengerCreator.WithAllProperties())
                                                        .EnterEmail(passengerCreator.WithAllProperties())
                                                        .ChooseCountry(passengerCreator.WithAllProperties())
                                                        .ClickContinueButton();

            Assert.AreEqual(ERROR_TEXT_WHEN_PASSENGER_IS_LESS_THAN_TWELVE_YEARS_OLD,
                            passengerDetailsPage.GetDateOfBirthErrorMessageText());
        }
Ejemplo n.º 2
0
        public void TicketBookingForPassengerWithInvalidEmail()
        {
            RouteCreator         routeCreator         = new RouteCreator();
            PassengerCreator     passengerCreator     = new PassengerCreator();
            HomePage             homePage             = new HomePage(driver);
            PassengerDetailsPage passengerDetailsPage = homePage
                                                        .AcceptCookie()
                                                        .EnterDepartureCity(routeCreator.WithAllProperties())
                                                        .EnterArrivalCity(routeCreator.WithAllProperties())
                                                        .SelectOneWayRoute()
                                                        .EnterOneWayLeaveDate(routeCreator.WithAllProperties())
                                                        .ClickTicketsSearchButton()
                                                        .SelectFlight()
                                                        .ClickContinueButton()
                                                        .ChooseTitle()
                                                        .EnterFirstName(passengerCreator.WithAllProperties())
                                                        .EnterFamilyName(passengerCreator.WithAllProperties())
                                                        .ChooseDayOfBirth(passengerCreator.WithAllProperties())
                                                        .ChooseMonthOfBirth(passengerCreator.WithAllProperties())
                                                        .ChooseYearOfBirth(passengerCreator.WithAllProperties())
                                                        .ChooseLandline(passengerCreator.WithAllProperties())
                                                        .EnterMobilePhone(passengerCreator.WithAllProperties())
                                                        .EnterEmail(passengerCreator.WithInvalidEmail())
                                                        .ChooseCountry(passengerCreator.WithAllProperties())
                                                        .ClickContinueButton();

            Assert.AreEqual(ERROR_TEXT_WHEN_INVALID_EMAIL,
                            passengerDetailsPage.GetEmailErrorMessageText());
        }
Ejemplo n.º 3
0
        public void SearchWithoutEnteringInformationTest()
        {
            HomePage         homePage          = new HomePage(driver);
            SelectFlightPage selectFlightsPage = homePage
                                                 .AcceptCookie()
                                                 .ClickTicketsSearchButton();

            Assert.AreEqual(homePage.GetToErrorMessageText(), ERROR_TEXT_IF_ENTERED_INCORRECTLY);
        }
Ejemplo n.º 4
0
        public void SearchForTicketFromUnspecifiedTheDateOfDeparture()
        {
            RouteCreator     routeCreator     = new RouteCreator();
            HomePage         homePage         = new HomePage(driver);
            SelectFlightPage selectFlightPage = homePage
                                                .AcceptCookie()
                                                .EnterDepartureCity(routeCreator.WithAllProperties())
                                                .EnterArrivalCity(routeCreator.WithAllProperties())
                                                .SelectOneWayRoute()
                                                .EnterOneWayLeaveDate(routeCreator.WithEmptyLeaveData())
                                                .ClickTicketsSearchButton();

            Assert.AreEqual(ERROR_TEXT_IF_ENTERED_INCORRECTLY,
                            homePage.GetLeaveDateErrorMessageText());
        }
Ejemplo n.º 5
0
        public void SearchingTicketForOneAdultAndTwoInfants()
        {
            RouteCreator     routeCreator     = new RouteCreator();
            HomePage         homePage         = new HomePage(driver);
            SelectFlightPage selectFlightPage = homePage
                                                .AcceptCookie()
                                                .EnterDepartureCity(routeCreator.WithAllProperties())
                                                .EnterArrivalCity(routeCreator.WithAllProperties())
                                                .SelectOneWayRoute()
                                                .EnterOneWayLeaveDate(routeCreator.WithAllProperties())
                                                .ClickAddInfantsButton(2)
                                                .ClickTicketsSearchButton();

            Assert.AreEqual(ERROR_TEXT_WHEN_SEARCHING_TICKET_FOR_ONE_ADULT_AND_TWO_INFANTS,
                            homePage.GetPaxCountsErrorMessageText());
        }