Example #1
0
        public void ModuleBookingTest()
        {
            TestPage          testPage          = new TestPage();
            AccommodationPage accomodiationPage = new AccommodationPage();

            accomodiationPage.StepEnterDestination("Istanbul");
            accomodiationPage.StepChoosePopularDestination();
            accomodiationPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepClickOnSearch();
            accomodiationPage.StepSelectAccomodiation();
            testPage.StepHandleNewTab();

            ReservationPage reservationPage = new ReservationPage();

            reservationPage.StepClickOnReserve();

            BookingPage bookingPage = new BookingPage();

            bookingPage.StepClickOnCloseAlmostYoursPopUp();
            bookingPage.StepChooseTravelingForWork();
            bookingPage.StepSelectTitle();
            bookingPage.StepEnterFirstName("Amila");
            bookingPage.StepEnterLastName("Zimic");
            bookingPage.StepEnterEmail("*****@*****.**");
            bookingPage.StepConfirmEmail("*****@*****.**");
            bookingPage.StepChooseBookingFor();
            bookingPage.StepEnterFullGuestName();
            bookingPage.StepClickOnFinal();
        }
Example #2
0
 public void Can_Delete_a_Booking()
 {
     //Go to Bookings Page
     BookingPage.GoTo();
     //delete the first booking from the list
     BookingPage.DeleteFirstBooking()
     .Delete();
     //verify that the booking id is successfully deleted
     Assert.AreSame(BookingPage.ConfirmDeletionMessage(), "Not Found", "delete was unsuccessful");
 }
Example #3
0
        public void SetPassangerData(int num, char gender, string lastName, string name, string date, string expdate, string passport)
        {
            BookingPage bookingPage = new BookingPage(driver);

            bookingPage.SetGender(num, (gender == 'm') ? 0 : 1);
            bookingPage.SetLastName(num, lastName);
            bookingPage.SetName(num, name);
            bookingPage.SetBDay(num, date);
            bookingPage.SetExpireDate(num, expdate);
            bookingPage.SetPassport(num, passport);
        }
 public void Can_Create_a_Booking_Using_BookingCreator()
 {
     //Go to Bookings Page,get the bookings count and store
     BookingPage.GoTo();
     BookingPage.StoreCount();
     //create a new booking and save
     BookingCreator.CreateBooking();
     //Go to Bookings Page,get the new bookings count (should be greater)
     BookingPage.GoTo();
     Assert.AreEqual(BookingPage.PreviousBookingsCount + 1, BookingPage.CurrentBookingsCount, "Count of bookings did not increase");
 }
 public void Can_Create_a_Booking()
 {
     //Go to Bookings Page,get the bookings count and store
     BookingPage.GoTo();
     BookingPage.StoreCount();
     //create a new booking and save
     BookingPage.CreateBooking("TestFN", "TestSN")
     .WithDetails("152.23", "true", "2018-11-07", "2018-11-09")
     .Save();
     //Go to Bookings Page,get the new bookings count (should be greater)
     BookingPage.GoTo();
     Assert.AreEqual(BookingPage.PreviousBookingsCount + 1, BookingPage.CurrentBookingsCount, "Count of bookings did not increase");
 }
Example #6
0
        public void TestConfirmFlight()
        {
            SearchPage searchPage = new SearchPage(Driver);

            searchPage.Open();
            searchPage.SelectFlightFrom("Gatwick");
            searchPage.SelectFlightTo("Bordeaux");
            searchPage.SetOneWayJourney();
            searchPage.SetOutBoundDate("1", "3", "2017");
            searchPage.SelectAdultsNum("1").SelectChildrenNum("0").SelectInfantsNum("0");

            BookingPage bookingPage = searchPage.ClickShowFlights();

            bookingPage.SelectJourney();
            Assert.IsTrue(bookingPage.GetJourneyPrice().Contains("£41.49"), "Cost of the flight is not true");
        }
Example #7
0
        public void TestAbleToFlyOnFridays()
        {
            SearchPage searchPage = new SearchPage(Driver);

            searchPage.Open();
            searchPage.SelectFlightFrom("Luton");
            searchPage.SelectFlightTo("Porto");
            searchPage.SetOneWayJourney();
            var date = DataTimeHelper.GetFridayDate();

            searchPage.SetOutBoundDate(date.Day.ToString(), date.Month.ToString(), date.Year.ToString());
            searchPage.SelectAdultsNum("1").SelectChildrenNum("0").SelectInfantsNum("0");

            BookingPage bookingPage = searchPage.ClickShowFlights();

            Assert.IsFalse(bookingPage.HasFlights(), "You can not fly on Friday");
        }
Example #8
0
        public void TestAbleToFlightFor2AdultsAnd1Children()
        {
            SearchPage searchPage = new SearchPage(Driver);

            searchPage.Open();
            searchPage.SelectFlightFrom("Luton");
            searchPage.SelectFlightTo("Barcelona");
            var fromDate = DataTimeHelper.AddDaysToCurrentDate(3);

            searchPage.SetOutBoundDate(fromDate.Day.ToString(), fromDate.Month.ToString(), fromDate.Year.ToString());

            var toDate = fromDate.AddDays(5);

            searchPage.SetReturnDate(toDate.Day.ToString(), toDate.Month.ToString(), toDate.Year.ToString());

            searchPage.SelectAdultsNum("2").SelectChildrenNum("1").SelectInfantsNum("0");
            BookingPage bookingPage = searchPage.ClickShowFlights();

            Assert.IsTrue(bookingPage.HasFlights(), "You can not fly with such preferences");
        }
Example #9
0
        public void TestConfirmFlightWithLuggage()
        {
            SearchPage searchPage = new SearchPage(Driver);

            searchPage.Open();
            searchPage.SelectFlightFrom("Gatwick");
            searchPage.SelectFlightTo("Bordeaux");
            searchPage.SetOneWayJourney();
            searchPage.SetOutBoundDate("1", "3", "2017");
            searchPage.SelectAdultsNum("1").SelectChildrenNum("0").SelectInfantsNum("0");

            BookingPage bookingPage = searchPage.ClickShowFlights();

            bookingPage.SelectJourney();
            var price = bookingPage.GetJourneyPrice();
            BookingStep2Page bookingStep2Page = bookingPage.ClickContinue();

            bookingStep2Page.AddHoldBag("23");
            var priceWithLuggage = bookingStep2Page.GetFinalPrice();

            Assert.IsTrue(ConvertValue.GetDoubleValue(priceWithLuggage) > ConvertValue.GetDoubleValue(price), "Cost of the flight has not increased with adding luggage");
        }
Example #10
0
        public bool CheckCountPassangers(int count)
        {
            BookingPage bookingPage = new BookingPage(driver);

            return(bookingPage.CheckCountPassengers(count));
        }
Example #11
0
 public BookingManagementSteps(BookingPage bookingPage)
 {
     this.bookingPage = bookingPage;
 }
 public void SetUpAttribute()
 {
     page = new BookingPage("chrome");
 }
        public void SmokeTest()
        {
            #region Instance of Classes
            TestPage          testPage          = new TestPage();
            SignInPage        signInPage        = new SignInPage();
            AccommodationPage accomodiationPage = new AccommodationPage();
            ReservationPage   reservationPage   = new ReservationPage();
            BookingPage       bookingPage       = new BookingPage();
            FlightsPage       flightsPage       = new FlightsPage();
            RentalCarsPage    rentalCarsPage    = new RentalCarsPage();
            AirportTaxisPage  airportTaxisPage  = new AirportTaxisPage();
            #endregion

            #region Test Steps
            /** Steps from Module SignIn */
            signInPage.StepClickOnSignIn();
            signInPage.StepEnterUsername("*****@*****.**");
            signInPage.StepEnterPassword("harisamila");
            signInPage.StepVerifyWelcomePopUp();
            signInPage.StepCloseWelcomePopup();

            /** Steps from Module Accomodiation */
            accomodiationPage.StepEnterDestination("Istanbul");
            accomodiationPage.StepChoosePopularDestination();
            accomodiationPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("yyyy/MM/dd").Replace("/", "-"));
            accomodiationPage.StepClickOnSearch();
            accomodiationPage.StepChooseStarRating("3");
            accomodiationPage.StepChooseOnlyAvailableProperties();
            accomodiationPage.StepChooseReviewScore("70");
            accomodiationPage.StepNavigateToTab("Distance From Downtown");
            accomodiationPage.StepNavigateToTab("Star rating and price");
            accomodiationPage.StepNavigateToTab("Stars");
            accomodiationPage.StepNavigateToTab("Review Score & Price");
            accomodiationPage.StepNavigateToTab("Price (lowest first)");
            accomodiationPage.StepNavigateToTab("Our Top Picks");
            accomodiationPage.StepSelectAccomodiation();
            testPage.StepHandleNewTab();

            /** Steps from Module Reservation */
            reservationPage.StepClickOnReserve();

            /** Steps from Module Booking */
            //bookingPage.StepClickOnCloseAlmostYoursPopUp();
            bookingPage.StepChooseTravelingForWork();
            bookingPage.StepSelectTitle();
            bookingPage.StepEnterFirstName("Amila");
            bookingPage.StepEnterLastName("Zimic");
            bookingPage.StepVerifyEmail("*****@*****.**");
            bookingPage.StepVerifyConfirmEmail("*****@*****.**");
            bookingPage.StepChooseBookingFor();
            bookingPage.StepEnterFullGuestName();
            bookingPage.StepClickOnFinal();
            testPage.StepCloseNewTab();
            signInPage.StepClickOnHomeButton();

            /** Steps from Module Flisghts */
            flightsPage.StepNavigateToFlightsTab();
            testPage.StepHandleNewTab();
            flightsPage.StepNavigateToOneWay();
            flightsPage.StepNavigateToMultiCity();
            flightsPage.StepNavigateToRoundTrip();
            flightsPage.StepEnterFromWhere("Sarajevo");
            flightsPage.StepChooseFromDestination();
            flightsPage.StepEnterToWhere("Istanbul");
            flightsPage.StepChooseToDestination();
            flightsPage.StepChooseFromDate(DateTime.Today.AddDays(7).ToString("MMMM dd"));
            flightsPage.StepChooseToDate(DateTime.Today.AddDays(14).ToString("MMMM dd"));
            flightsPage.StepClickOnSearch();
            testPage.StepHandleNewTab();
            testPage.StepCloseNewTab();

            /** Steps from Module AirportTaxis */
            airportTaxisPage.StepNavigateToAirportTaxisTab();
            testPage.StepHandleNewTab();
            airportTaxisPage.StepEnterPickUpLocation("Istanbul");
            airportTaxisPage.StepChoosePickUpLocation();
            airportTaxisPage.StepEnterDropOffLocation("Blue Mosque");
            airportTaxisPage.StepChooseDropOffLocation();
            airportTaxisPage.StepClickOnSearch();
            airportTaxisPage.StepClickOnBookTaxi();
            airportTaxisPage.StepSelectTitle();
            airportTaxisPage.StepEnterFirstName("Amila");
            airportTaxisPage.StepEnterLastName("Zimic");
            airportTaxisPage.StepEnterEmail("*****@*****.**");
            airportTaxisPage.StepConfirmEmail("*****@*****.**");
            airportTaxisPage.StepChooseCountry();
            airportTaxisPage.StepEnterMobileNumber("62253119");
            airportTaxisPage.StepClickOnContinueToBook();
            #endregion
        }
Example #14
0
 public BookingSteps()
 {
     _bookingPage = new BookingPage();
 }