Beispiel #1
0
        public void SearchTripsWithReturnOption()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            TripInfo      trip          = TripInfoCreator.SetAllProperties();
            OrderTripPage orderTripPage = new MainPage(Driver)
                                          .InputTripInfo(trip)
                                          .InputReturnDate(trip)
                                          .ClickSendRequestButton();

            Assert.AreEqual(orderTripPage.CountOfRoutes(), 2);
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #2
0
        public void FalsePassengerInfo()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            CarriagePage travelerInfoPage = new MainPage(Driver)
                                            .InputTripInfo(TripInfoCreator.SetAllProperties())
                                            .CancelReturnTrip()
                                            .ClickSendRequestButton()
                                            .ClickSelectCarriageButton();

            Assert.IsTrue(travelerInfoPage.State());
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #3
0
        public void SearchTrips()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            TripInfo      trip          = TripInfoCreator.SetAllProperties();
            OrderTripPage orderTripPage = new MainPage(Driver)
                                          .InputTripInfo(trip)
                                          .CancelReturnTrip()
                                          .ClickSendRequestButton();

            Assert.AreEqual(trip.DepartureStation, orderTripPage.DepartureStationInfo());
            Assert.AreEqual(trip.ArrivalStation, orderTripPage.ArrivalStationInfo());
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #4
0
        public void ChooseReservedSeat()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            TripInfo     trip         = TripInfoCreator.SetAllProperties();
            CarriagePage carriagePage = new MainPage(Driver)
                                        .InputTripInfo(trip)
                                        .InputReturnDate(trip)
                                        .ClickSendRequestButton()
                                        .ClickSelectCarriageButton();

            Assert.IsFalse(carriagePage.ChooseReservedSeat());
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #5
0
        public void CheckSumOfTickets()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            TravelerInfoPage travelerInfoPage = new MainPage(Driver)
                                                .InputTripInfo(TripInfoCreator.SetAllProperties())
                                                .CancelReturnTrip()
                                                .ClickSendRequestButton()
                                                .ClickSelectCarriageButton()
                                                .SelectWagonAndSeat()
                                                .ChangePassenger()
                                                .SelectWagonAndSeat()
                                                .ClickConfirmButton();

            Assert.IsTrue(travelerInfoPage.ArePricesEqual());
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #6
0
        public void FalsePassengerInfo()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            TravelerInfoPage travelerInfoPage = new MainPage(Driver)
                                                .InputTripInfo(TripInfoCreator.SetAllProperties())
                                                .CancelReturnTrip()
                                                .ClickSendRequestButton()
                                                .ClickSelectCarriageButton()
                                                .SelectWagonAndSeat()
                                                .ClickConfirmButton()
                                                .InputPassengerInfo(PassengerInfoCreator.SetInvalidInfo())
                                                .ClickHotelsButton();

            Assert.IsTrue(travelerInfoPage.ErrorTooltip.Displayed);
            Logger.Log.Info("Test complete successfully");
        }
Beispiel #7
0
        public void SuccessBookingTest()
        {
            Logger.InitLogger();
            Driver.Navigate().GoToUrl(URL);
            Logger.Log.Info("Go to " + URL);
            BookingPage bookingPage = new MainPage(Driver)
                                      .InputTripInfo(TripInfoCreator.SetAllProperties())
                                      .CancelReturnTrip()
                                      .ClickSendRequestButton()
                                      .ClickSelectCarriageButton()
                                      .SelectWagonAndSeat()
                                      .ClickConfirmButton()
                                      .InputPassengerInfo(PassengerInfoCreator.SetNormalInfo())
                                      .ClickBookingButton();

            Assert.AreEqual(bookingPage.GetReviewOrder(), ReviewOrder);
            Logger.Log.Info("Test complete successfully");
        }