private void VerifyTheParticipantDetails() { var hearings = GetHearings(); var hearing = GetTheFirstHearing(hearings); foreach (var participant in hearing.Participants) { if (participant.UserRoleName.Equals("Judge")) { VerifyJudgeDetails(participant); } else { VerifyParticipant(participant); } if (!OnlyDisplayEmailAndUsernameIfCurrentUserMadeTheBooking()) { continue; } if (participant.HearingRoleName.ToLower() == "judge" && GetJudgeEmail(hearing) == null) { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantEmail(participant.Id)).Should().Be("TBC"); } else { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantEmail(participant.Id)).Should().Be(participant.ContactEmail); } _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantUsername(participant.Id)).Should().Be(participant.Username); } }
private void VerifyParticipant(ParticipantResponse participant) { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantName(participant.Id)).Should().Contain($"{_c.Test.TestData.AddParticipant.Participant.Title} {participant.FirstName} {participant.LastName}"); if (participant.UserRoleName.Equals("Representative")) { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantRepresentee(participant.Id)).Should().Be(participant.Representee); } else { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantRole(participant.Id)).Should().Be(participant.HearingRoleName); } _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantPhone(participant.Id)).Should().Be(participant.TelephoneNumber); }
private void VerifyTheBookingDetails() { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CaseNumberTitle).Should().Be(_c.Test.HearingDetails.CaseNumber); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CreatedBy).Should().Be(_c.Test.CreatedBy); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CreatedDate).Should().NotBeNullOrWhiteSpace(); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CaseNumber).Should().Be(_c.Test.HearingDetails.CaseNumber); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CaseName).Should().Contain(_c.Test.HearingDetails.CaseName); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CaseType).Should().Be(_c.Test.HearingDetails.CaseType.Name); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.HearingType).Should().Be(_c.Test.HearingDetails.HearingType.Name); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.CourtroomAddress).Should().Be($"{_c.Test.HearingSchedule.HearingVenue}, {_c.Test.HearingSchedule.Room}"); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.AudioRecorded).Should().Be("Yes"); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.OtherInformation).Should().Be(OtherInformationSteps.GetOtherInfo(_c.Test.TestData.OtherInformationDetails.OtherInformation)); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.VideoAccessPoints(0)).Should().Be(_c.Test.VideoAccessPoints.DisplayName); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.HearingStartDate).ToLower().Should().Be(_c.Test.HearingSchedule.ScheduledDate.ToLocalTime().ToString(DateFormats.HearingSummaryDate).ToLower()); var expectedDuration = _c.Test.HearingSchedule.MultiDays ? "listed for 8 hours" : $"listed for {_c.Test.HearingSchedule.DurationMinutes} minutes"; _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.Duration).Should().Contain(expectedDuration); }
private void VerifyJudgeInParticipantsList() { var hearings = GetHearings(); var hearing = GetTheFirstHearing(hearings); var hearingJudge = hearing.Participants.First(x => x.UserRoleName.Equals("Judge")); var judge = UserManager.GetJudgeUser(_c.Test.HearingParticipants); _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.JudgeName).Should().Contain(judge.DisplayName); if (!OnlyDisplayEmailAndUsernameIfCurrentUserMadeTheBooking()) { return; } if (GetJudgeEmail(hearing) != null) { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantEmail(hearingJudge.Id)).Should().Be(judge.AlternativeEmail); } else { _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantEmail(hearingJudge.Id)).Should().Be("TBC"); } _browsers[_c.CurrentUser].TextOf(BookingDetailsPage.ParticipantUsername(hearingJudge.Id)).Should().Be(judge.Username); }
public FindCustomerStepDefs(IWebDriver driver, ILog log) : base(driver, log) { _findCustomer = new FindCustomerPage(driver, log); _bookingDetails = new BookingDetailsPage(driver, log); }
public CustomerDetailsStepDefs(IWebDriver driver, ILog log) : base(driver, log) { _bookingDetails = new BookingDetailsPage(driver, log); }
public BookingDetailsPropertyDetailsStepDefs(IWebDriver driver, ILog log) : base(driver, log) { _bookingDetails = new BookingDetailsPage(driver, log); }
public BookingDetailsExcursionsStepDefs(IWebDriver driver, ILog log) : base(driver, log) { _bookingDetails = new BookingDetailsPage(driver, log); }