Beispiel #1
0
        public void MovieCoverRedirectsToCorrespondingPage()
        {
            _homePage.Navigate();
            ReservationPage reservationPage = _homePage.Cover_NavigatesToReservationPage();

            reservationPage.MovieCoverRedirectionAssertion();
        }
Beispiel #2
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();
        }
Beispiel #3
0
        public void WatchButtonRedirectsToCorrespondingPage()
        {
            _homePage.Navigate();
            ReservationPage reservationPage = _homePage.Button_NavigatesToReservationPage();

            reservationPage.WatchButtonRedirectionAssertion();
        }
        public void ReservationLoginRedir()
        {
            _reservationPage.Navigate();
            _reservationPage.ClickOnReserve();
            ReservationPage reservationPage = _reservationPage.NavigateToLoginPage();

            reservationPage.AssertErrorMessageRedirectLog("Login");
        }
        public void ReservationRegRedir()
        {
            _reservationPage.Navigate();
            _reservationPage.ClickOnReserve();
            ReservationPage reservationPage = _reservationPage.NavigateToRegisterPage();

            reservationPage.AssertErrorMessageRedirect("Register");
        }
Beispiel #6
0
 public void NoConditions()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"NoConditions\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnSubmitButton()
                               .SwitchToAlert(Driver);
         Assert.AreEqual("Примите наши условия, пожалуйста", reservationPage.Text);
     });
 }
Beispiel #7
0
 public void IncorrectEmail()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"IncorrectEmail\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnConditionsCheckBox()
                               .FillUserData(UserDataCreator.FillUser())
                               .ClickOnSubmitButton();
         Assert.AreEqual("Введите правильный электронный адрес, пожалуйста", reservationPage.GetEmailError().Text);
     });
 }
Beispiel #8
0
 public void DontChooseSurname()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"DontChooseSurname\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnConditionsCheckBox()
                               .FillUserData(UserDataCreator.FillUser())
                               .ClickOnSubmitButton();
         Assert.AreEqual("Введите фамилию, пожалуйста", reservationPage.GetSurnameError().Text);
     });
 }
Beispiel #9
0
 public void DontChooseGender()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"DontChooseGender\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnConditionsCheckBox()
                               .FillUserData(UserDataCreator.FillUser())
                               .ClickOnSubmitButton();
         Assert.AreEqual("Пожалуйста, выберите", reservationPage.GetGenderError().Text);
     });
 }
Beispiel #10
0
        public void Create_Verify_DeletionBookings()
        {
            ReservationPage reservationPage = new ReservationPage(driver);

            PageFactory.InitElements(driver, reservationPage);

            //Local Variables
            string firstNameText = "first_" + DateTime.Now.ToString("hh_mm_ss").ToString();
            string lastNameText  = "last_" + DateTime.Now.ToString("hh_mm_ss").ToString();
            string priceText     = "150";
            string depositStatus = "true";
            string checkInDate   = DateTime.Now.ToString("yyyy-MM-dd");
            string checkoutDate  = DateTime.Now.AddDays(3).ToString("yyyy-MM-dd");

            try
            {
                //Booking Creation - Start
                reservationPage.pageHeaderDisplayed();

                reservationPage.enterFirstName(firstNameText);

                reservationPage.enterLastname(lastNameText);

                reservationPage.enterTotalPrice(priceText);

                reservationPage.selectDepositPaid(depositStatus);

                reservationPage.enterCheckInDate(checkInDate);

                reservationPage.enterCheckOutDate(checkoutDate);

                reservationPage.clickCreateBooking();

                //Booking Creation - End

                //Verify booking is created - Begin

                Assert.IsTrue(reservationPage.firstNameDisplay(firstNameText).Displayed);

                string bookingId = reservationPage.bookingIdCreated(firstNameText);
                Assert.IsNotNull(bookingId);

                //Verify booking is created - End

                // Delete the booking

                reservationPage.clickDeleteButton(bookingId);
            }
            catch (Exception expection)
            {
                Console.WriteLine(expection.StackTrace);
            }
        }
Beispiel #11
0
 public void TooLongSurname()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"TooLongSurname\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnConditionsCheckBox()
                               .FillUserData(UserDataCreator.FillUserForTooLongCategory())
                               .ClickOnSubmitButton();
         Assert.AreEqual("Слишком длинное имя/фамилия. Свяжитесь с нами по телефону", reservationPage.GetSurnameError().Text);
     });
 }
Beispiel #12
0
 public void TooLongName()
 {
     SaveScreenshotOnTestFailure(() =>
     {
         Logger.Log.Info("Start \"TooLongName\" test");
         var reservationPage = new ReservationPage(Driver)
                               .ClickOnConditionsCheckBox()
                               .FillUserData(UserDataCreator.FillUserForTooLongCategory())
                               .ClickOnSubmitButton();
         Assert.AreEqual("Пожалуйста, введите правильное имя", reservationPage.GetNameError().Text);
     });
 }
Beispiel #13
0
        public void NoConditions()
        {
            var reservationPage = new ReservationPage(driver);

            reservationPage.submitButton.Click();

            IAlert alert = reservationPage.SwitchToAlert(driver);

            var isErrorMessageCorrect = alert.Text.Equals("Примите наши условия, пожалуйста");

            Assert.IsTrue(isErrorMessageCorrect);
        }
Beispiel #14
0
        public ActionResult Index()
        {
            var bundles = _context.EquipmentBundles.OrderBy(x => x.Title).ToList();

            var viewModel = new ReservationPage
            {
                EquipmentBundles = bundles,
                Reservation      = new Reservation(),
                Reservations     = _context.Reservations.ToList(),
            };

            return(View(viewModel));
        }
Beispiel #15
0
        public void RussianWordInNameInput()
        {
            var reservationPage = new ReservationPage(driver);

            reservationPage.conditionsCheckBox.Click();

            reservationPage.nameInput.SendKeys("Чикибряк");
            reservationPage.submitButton.Click();

            var isErrorMessageCorrect = reservationPage.GetNameError().Equals("Пожалуйста, введите правильное имя");
            var a = reservationPage.GetNameError();

            Assert.IsTrue(isErrorMessageCorrect);
        }
Beispiel #16
0
        public void ModuleReservationTest()
        {
            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();
        }
        public void FooterIsVisible_OnReservationPage()
        {
            ReservationPage reservationPage = _footer.On_ReservationPage();

            reservationPage.FooterIsVisible_Assertion();
        }
        public void NavigationBarIsVisible_OnReservationPage()
        {
            ReservationPage reservationPage = _navigationBar.On_ReservationPage();

            reservationPage.NavigationBarIsVisible_Assertion();
        }
 public void SetUp()
 {
     _reservationPage = new ReservationPage(Driver);
 }
        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
        }