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"); }
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"); }