Пример #1
0
        public void ShouldMakeFlightOnlyBookingWithRandomData()
        {
            //Enter Hotel only search data
            HomePage.SearchFor().FlightOnly().ToDestination("Malaga").FromCheckIn(Calendar.PickRandomCheckInDate())
            .ToCheckOut(Calendar.PickRandomCheckOutDate()).FromDepartureAirport("Dublin, Republic Of Ireland (DUB)")
            .ForAdults(2).WithChildren(2).OfAges(2, 4).Search();

            //Check if result page is displayed within 60 sec
            Assert.That(FlightResultsPage.IsDisplayed(), "Flight Search Result Page isn't displayed within 60 sec");

            //Check if any hote results are displayed for the search
            Assert.That(FlightResultsPage.AreResultsDisplayed(), "No Results are available for the flight search");

            //Search for supplier TP
            //Assert.That(FlightResultsPage.ContainsFlightFromSupplier("TP"), "TP supplier is not displayed on first result page");

            //Select first room option of the first hotel displayed on the very first result page
            //FlightResultsPage.SelectFlight().ByFirstSupplier("TP").ContinueAndCapture();

            //Check if the extra page is displayed
            //Assert.That(ExtrasPage.IsDisplayed(), "Extras page is not displayed within 60 sec");
            FlightResultsPage.SelectFlight().ByFlightNumber(1).ContinueAndCapture();

            Assert.That(HotelResultsPage.IsDisplayed(), "Hotel Result page is not displayed");

            Assert.That(HotelResultsPage.AreResultsDisplayed(), "No hotel results are available");

            HotelResultsPage.SelectRoom().ByHotelNumber(1).ForRoomNumber(1).WithAvailableRoom(1).Continue();


            // save flight information on extra page
            ExtrasPage.Save(Information.Flight);

            ExtrasPage.Confirm(Information.Flight);

            //Click Booknow button
            ExtrasPage.BookFlight().Continue();

            //Check Payment Page is displayed
            Assert.That(PaymentPage.IsDisplayed(), "Payment page is not displayed");
        }