示例#1
0
        public void SearchTicketsWithoutDestinationInput()
        {
            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity("Minsk")
                                      .EnterDepartDate("28 December, Sa")
                                      .Enter();

            Assert.AreEqual("Select destination", flightsPage.GetDestinationErrorMessage());
        }
示例#2
0
        public void NonEnterDestinationAirport()
        {
            Logger.Log.Info("NonEnterDestinationAirport() unit test starts.");
            FlightsPage flightsPage = new FlightsPage(webDriver)
                                      .EnterCityToAirportField("Warsaw Modlin", "Departure Airport")
                                      .ClickButtonContinue();

            Assert.AreEqual("You have not selected a destination airport.Please tell us where you want to go.", flightsPage.GetErrorDestinationTooltip());
        }
示例#3
0
        public void SearchTicketsWithoutDateInput()
        {
            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity("Minsk")
                                      .EnterDestinationCity("Moscow")
                                      .Enter();

            Assert.AreEqual("Pick a date", flightsPage.GetDepartDateErrorMessage());
        }
示例#4
0
        public void SearchTicketsWithoutDestinationInput()
        {
            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity("Vilnius")
                                      .EnterDepartDate("22 December")
                                      .Enter();

            Assert.AreEqual("Select destination", flightsPage.GetDestinationErrorMessage());

            Logger.Log.Info(" Search Tickets Without Destination Input Test");
        }
示例#5
0
        public void SearchTicketsWithoutDateInput()
        {
            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity("Vilnius")
                                      .EnterDestinationCity("Vena")
                                      .Enter();

            Assert.AreEqual("You shouls pick a date", flightsPage.GetDepartDateErrorMessage());

            Logger.Log.Info("Search tickets without date test");
        }
示例#6
0
        public void EnterCountOfTicketsMoreThanPlaneCapacity()
        {
            Logger.Log.Info("EnterCountOfTicketsMoreThanPlaneCapacity() unit test starts.");

            FlightsPage flightsPage = new FlightsPage(webDriver)
                                      .EnterCityToAirportField("Warsaw Modlin", "Departure Airport")
                                      .EnterCityToAirportField("Kyiv", "Destination Airport")
                                      .ClickButtonContinue()
                                      .ClickDropdown();

            Assert.AreEqual("The maximum number of passengers is 25. If there are more than 25 passengers please use our group booking form.", flightsPage.GetErrorIncrementTooltip());
        }
示例#7
0
        public void EnterEqualDepartureAndDestinationCity()
        {
            string city = "Minsk National Airport";

            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity(city)
                                      .EnterDestinationCity(city)
                                      .EnterDepartDate("28 December, Sa")
                                      .Enter();

            Assert.AreEqual("Origin and destination cannot be the same", flightsPage.GetDestinationErrorMessage());
        }
示例#8
0
        public void EnterCombinationNotMatchFilters()
        {
            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity("Minsk")
                                      .EnterDestinationCity("Moscow")
                                      .EnterDepartDate("28 December, Sa")
                                      .Enter()
                                      .ClickPaymentMethods()
                                      .UncheckAllCheckbutton();

            Assert.AreEqual("We found  flights, but none of them match your filters.", flightsPage.GetMessageFlightsPage());
        }
示例#9
0
        public void EnterEqualDepartureAndDestinationAirport()
        {
            Logger.Log.Info("EnterEqualDepartureAndDestinationAirport() unit test starts.");

            string city = "Warsaw Modlin";

            FlightsPage flightsPage = new FlightsPage(webDriver)
                                      .EnterCityToAirportField(city, "Departure Airport")
                                      .EnterCityToAirportField(city, "Destination Airport")
                                      .ClickButtonContinue();

            Assert.AreEqual("Please enter a valid airport.", flightsPage.ErrorTooltipFromFlightsPage());
        }
示例#10
0
        public void EnterEqualDepartureAndDestinationCity()
        {
            string city = "Vena";

            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity(city)
                                      .EnterDestinationCity(city)
                                      .EnterDepartDate("22 December")
                                      .Enter();

            Assert.AreEqual("Origin and destination cannot be the same", flightsPage.GetDestinationErrorMessage());

            Logger.Log.Info(" Enter Equal Departure And Destination City Test");
        }
示例#11
0
        public void ChangeDepartureAndDestination()
        {
            string      expextedDepartureCity   = "Vilnius";
            string      expectedDestinationCity = "Vena";
            string      expectedDepartDate      = "22 December";
            FlightsPage flightsPage             = new FlightsPage()
                                                  .EnterDepartureCity(expextedDepartureCity)
                                                  .EnterDestinationCity(expectedDestinationCity)
                                                  .EnterDepartDate(expectedDepartDate)
                                                  .ClickChangeButton();

            Assert.AreEqual("Vena", flightsPage.GetDepartureCity);

            Logger.Log.Info(" Change departure and destination Test");
        }
示例#12
0
        public void AreAqualHotelCityAndDestinationCity()
        {
            string expectedDestinationCity = "Moscow";
            string expectedDepartDate      = "28 December, Sa";

            HotelPage hotelPage = new FlightsPage()
                                  .EnterDepartureCity("Minsk")
                                  .EnterDestinationCity(expectedDestinationCity)
                                  .EnterDepartDate(expectedDepartDate)
                                  .ClickHotelButton();

            string[] expectedList = { expectedDestinationCity, expectedDepartDate };
            string[] actualList   = { hotelPage.GetDestinationCity(), hotelPage.GetDepartDate() };

            Assert.AreEqual(expectedList, actualList);
        }
示例#13
0
        public void SetFourInfant()
        {
            string      expextedDepartureCity   = "Vilnius";
            string      expectedDestinationCity = "Vena";
            string      expectedDepartDate      = "22 December";
            FlightsPage flightsPage             = new FlightsPage()
                                                  .EnterDepartureCity(expextedDepartureCity)
                                                  .EnterDestinationCity(expectedDestinationCity)
                                                  .EnterDepartDate(expectedDepartDate)
                                                  .InfantIncrement(4)
                                                  .AdultDecrement()
                                                  .Enter();

            Assert.AreEqual("", flightsPage.GetErrorTooltip().Text);

            Logger.Log.Info(" Set Four Infant Test");
        }
示例#14
0
        public void AreEqualInputInfoAndInfoInSearchPage()
        {
            string expextedDepartureCity   = "Minsk";
            string expectedDestinationCity = "Moscow";
            string expectedDepartDate      = "28 December, Sa";

            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity(expextedDepartureCity)
                                      .EnterDestinationCity(expectedDestinationCity)
                                      .EnterDepartDate(expectedDepartDate)
                                      .Enter();

            string[] expectedList = { expextedDepartureCity, expectedDestinationCity, expectedDepartDate };
            string[] actualList   = { flightsPage.GetDepartureCity(), flightsPage.GetDestinationCity(), flightsPage.GetDepartDate() };

            Assert.AreEqual(expectedList, actualList);
        }
示例#15
0
        public void AreEqualInputInfoAndInfoInSearchPage()
        {
            string expextedDepartureCity   = "Vilnius";
            string expectedDestinationCity = "Vena";
            string expectedDepartDate      = "22 December";

            FlightsPage flightsPage = new FlightsPage()
                                      .EnterDepartureCity(expextedDepartureCity)
                                      .EnterDestinationCity(expectedDestinationCity)
                                      .EnterDepartDate(expectedDepartDate)
                                      .Enter();

            string[] expectedList = { expextedDepartureCity, expectedDestinationCity, expectedDepartDate };
            string[] actualList   = { flightsPage.GetDepartureCity(), flightsPage.GetDestinationCity(), flightsPage.GetDepartDate() };

            Assert.AreEqual(expectedList, actualList);
            Logger.Log.Info(" Are Equal Input Info And Info In Search Page Test");
        }
示例#16
0
        public void AreAqualHotelCityAndDestinationCity()
        {
            string expectedDestinationCity = "Vilnius";
            string expectedDepartDate      = "22" +
                                             " December";

            HotelPage hotelPage = new FlightsPage()
                                  .EnterDepartureCity("Vena")
                                  .EnterDestinationCity(expectedDestinationCity)
                                  .EnterDepartDate(expectedDepartDate)
                                  .ClickHotelButton();

            string[] expectedList = { expectedDestinationCity, expectedDepartDate };
            string[] actualList   = { hotelPage.GetDestinationCity(), hotelPage.GetDepartDate() };

            Assert.AreEqual(expectedList, actualList);

            Logger.Log.Info(" Are aqual hotel city and destination Test");
        }