public void ThenTheParticipantCanSeeAListOfParticipantsAndTheirRepresentatives() { var panelMembers = _c.Test.ConferenceParticipants.FindAll(x => x.Last_name.ToLower().Contains("panelmember")); var individuals = _c.Test.ConferenceParticipants.FindAll(x => x.Last_name.ToLower().Contains("individual")); var representatives = _c.Test.ConferenceParticipants.FindAll(x => x.Last_name.ToLower().Contains("representative")); var observers = _c.Test.ConferenceParticipants.FindAll(x => x.Last_name.ToLower().Contains("observer")); (panelMembers.Count + individuals.Count + representatives.Count + observers.Count).Should().BeGreaterThan(0); foreach (var panelMember in panelMembers) { _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.PanelMemberName(panelMember.Id)).Text.Trim().Should().Be(panelMember.Name); } foreach (var individual in individuals) { _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ParticipantName(individual.Id)).Text.Trim().Should().Be(individual.Name); _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ParticipantHearingRole(individual.Id)).Text.Trim().Should().Be(individual.Hearing_role); if (!individual.Case_type_group.ToLower().Equals("none")) { _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ParticipantCaseTypeGroup(individual.Id)).Text.Trim().Should().Be(individual.Case_type_group); } } foreach (var representative in representatives) { _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ParticipantName(representative.Id)).Text.Trim().Should().Be(representative.Name); if (representative.Case_type_group.ToLower().Equals("none")) { continue; } _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ParticipantCaseTypeGroup(representative.Id)).Text.Trim().Should().Be(representative.Case_type_group); _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.RepresentativeRepresentee(representative.Id)).Text.Trim().Should().Be($"Representative for {representative.Representee}"); } foreach (var observer in observers) { _browsers[_c.CurrentUser].Driver.WaitUntilVisible(ParticipantListPanel.ObserverName(observer.Id)).Text.Trim().Should().Be(observer.Name); } }
private static By GetParticipantCaseType(string user, Guid id) { return(user == "Participant" ? ParticipantListPanel.ParticipantCaseTypeGroup(id) : JudgeParticipantPanel.ParticipantCaseType(id)); }