public void EditReservationWithValidData(int userId) { //Get user e-mail needed for Reservation button locator var currentUser = _userRepository.GetUserById(userId); _userEmail = currentUser.Email.ToString(); EditUserReservationButton.Click(); //Get screening id for current user's reservation for Date drop-down menu locator var currentScreening = _screeningRepository.GetScreeningById(_returnedScreeningId); _userScreeningDate = currentScreening.DateTime.ToString("dd.MM.yyyy"); DateDropDownMenu.Click(); //Set time for Time drop-down menu locator _userScreeningTime = currentScreening.DateTime.ToString("HH:mm:ss"); TimeDropDownMenu.Click(); //Enough Seats Number Check bool screeningCheck = _screeningRepository.EnoughtSeatsNumberCheck(_returnedScreeningId); if (screeningCheck == false) { _screeningRepository.CreateMoreSeatsForThisScreening(_returnedScreeningId); } NumberOfPeopleDropDownMenu.Click(); SaveButton.Click(); }
public void CheckNumberOfSeatsLeft(int userId) { //Get user e-mail needed for Reservation button locator var currentUser = _userRepository.GetUserById(userId); _userEmail = currentUser.Email.ToString(); EditUserReservationButton.Click(); //Get screening id for current user's reservation for Date drop-down menu locator var currentScreening = _screeningRepository.GetScreeningById(_returnedScreeningId); _userScreeningDate = currentScreening.DateTime.ToString("dd.MM.yyyy"); DateDropDownMenu.Click(); //Set time for Time drop-down menu locator _userScreeningTime = currentScreening.DateTime.ToString("HH:mm:ss"); TimeDropDownMenu.Click(); _seatsLeft = NumberOfSeats.Count; }
public void EditReservationSelecting3Seats(int userId) { //Get user e-mail needed for Reservation button locator var currentUser = _userRepository.GetUserById(userId); _userEmail = currentUser.Email.ToString(); Navigate(); EditUserReservationButton.Click(); //Get screening id for current user's reservation for Date drop-down menu locator var currentScreening = _screeningRepository.GetScreeningById(_returnedScreeningId); _userScreeningDate = currentScreening.DateTime.ToString("dd.MM.yyyy"); DateDropDownMenu.Click(); //Set time for Time drop-down menu locator _userScreeningTime = currentScreening.DateTime.ToString("HH:mm:ss"); TimeDropDownMenu.Click(); Select3Seats.Click(); SaveButton.Click(); }