public void ThenTheVideoHearingsOfficerUserShouldSeeAnAlert(string notification, string alertType)
        {
            _browsers[_c.CurrentUser].Refresh();
            _browsers[_c.CurrentUser].Driver.WaitForAngular();
            Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
            _browsers[_c.CurrentUser].TextOf(VhoHearingListPage.StatusBadge(_c.Test.Conference.Id)).Should().Be(notification.Equals("Suspended") ? notification : "Not Started");
            _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
            Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
            _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
            _browsers[_c.CurrentUser].TextOf(AdminPanelPage.TaskDetails(_c.Test.TaskId)).Should().Be(alertType);

            var timeOfAlert             = _c.TimeZone.Adjust(_c.Test.AlertTime).ToString(DateFormats.AlertMessageTimestamp);
            var timeOfAlertMinusAMinute = _c.TimeZone.Adjust(_c.Test.AlertTime).AddMinutes(-1).ToString(DateFormats.AlertMessageTimestamp);
            var timeOfAlertPlusAMinute  = _c.TimeZone.Adjust(_c.Test.AlertTime).AddMinutes(1).ToString(DateFormats.AlertMessageTimestamp);

            _browsers[_c.CurrentUser].Driver.WaitUntilElementExists(AdminPanelPage.TaskCheckbox(_c.Test.TaskId)).Selected.Should().BeFalse();
            _browsers[_c.CurrentUser].Driver.WaitUntilElementExists(AdminPanelPage.TaskCheckbox(_c.Test.TaskId)).Enabled.Should().BeTrue();

            var timestamp = _browsers[_c.CurrentUser].TextOf(AdminPanelPage.TaskCreatedDate(_c.Test.TaskId));

            timestamp.Should().BeOneOf(timeOfAlert, timeOfAlertMinusAMinute, timeOfAlertPlusAMinute);

            if (alertType.ToLower().Contains("failed self-test") || alertType.ToLower().Equals("disconnected"))
            {
                _browsers[_c.CurrentUser].TextOf(AdminPanelPage.TaskFromUser(_c.Test.TaskId)).Should().Be(_c.Test.Participant.Name);
            }
        }
 public void ThenTheVideoHearingsOfficerUserShouldNotSeeAnAlert()
 {
     _browsers[_c.CurrentUser].Refresh();
     Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
     _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
     Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
     Tasks.TasksListShouldBeEmpty(_c);
 }
 public void ProgressToNextPage()
 {
     Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
     _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
     Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
     _browsers[_c.CurrentUser].Click(VhoHearingListPage.HearingsTabButton);
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
 }
Ejemplo n.º 4
0
        public void ThenTheParticipantsStatusesAre(string text, string participantStatus)
        {
            Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
            _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
            Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
            _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
            var participants = text.Equals("participants") ? _c.Test.ConferenceParticipants.Where(x => x.UserRole != UserRole.Judge) : ParticipantsManager.GetParticipantsFromRole(_c.Test.ConferenceParticipants, text);

            CheckParticipantStatus(participantStatus, participants);
        }
Ejemplo n.º 5
0
 public void WhenTheVideoHearingsOfficerStartsACallWithIndividual(string text)
 {
     Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
     _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
     Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
     _browsers[_c.CurrentUser].Driver.SwitchTo().Frame(AdminPanelPage.AdminIframeId);
     Thread.Sleep(TimeSpan.FromSeconds(SecondsDelayBeforeCallingTheParticipant));
     _browsers[_c.CurrentUser].Click(AdminPanelPage.ParticipantInIframe(GetParticipantDisplayName(text)));
     Thread.Sleep(TimeSpan.FromSeconds(SecondsDelayBeforeCallingTheParticipant));
     _browsers[_c.CurrentUser].Click(AdminPanelPage.VhoPrivateConsultationLink);
     _browsers[_c.CurrentUser].LastWindowName = _browsers[_c.CurrentUser].SwitchTab("Private Consultation");
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.CloseButton).Displayed.Should().BeTrue();
 }
Ejemplo n.º 6
0
        public void ThenTheOptionToCallIsNotVisible(string text)
        {
            Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);
            _browsers[_c.CurrentUser].Click(VhoHearingListPage.SelectHearingButton(_c.Test.Conference.Id));
            Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
            _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
            _browsers[_c.CurrentUser].Driver.SwitchTo().Frame(AdminPanelPage.AdminIframeId);
            var user        = Users.GetUserFromText(text, _c.Test.Users);
            var participant = _c.Test.ConferenceParticipants.Find(x => x.Username.ToLower().Contains(user.Username.ToLower()));

            Thread.Sleep(TimeSpan.FromSeconds(SecondsDelayBeforeCallingTheParticipant));
            _browsers[_c.CurrentUser].Click(AdminPanelPage.ParticipantInIframe(participant.DisplayName));
            Thread.Sleep(TimeSpan.FromSeconds(SecondsDelayBeforeCallingTheParticipant));
            _browsers[_c.CurrentUser].Driver.WaitUntilElementNotVisible(AdminPanelPage.VhoPrivateConsultationLink).Should().BeTrue();
        }
        public void ThenTheVhoCanSeeAListOfHearingsIncludingTheNewHearing()
        {
            Scrolling.ScrollToTheHearing(_browsers[_c.CurrentUser], _c.Test.Conference.Id);

            var hearingThatShouldBeVisible = _c.Test.Conferences.First();

            _browsers[_c.CurrentUser].Driver.WaitUntilVisible(VhoHearingListPage.CaseName(hearingThatShouldBeVisible.Id)).Displayed.Should().BeTrue();
            _browsers[_c.CurrentUser].Driver.WaitUntilVisible(VhoHearingListPage.CaseNumber(hearingThatShouldBeVisible.Id)).Displayed.Should().BeTrue();
            var timespan  = TimeSpan.FromMinutes(hearingThatShouldBeVisible.ScheduledDuration);
            var listedFor = DateTimeToString.GetListedForTimeAsString(timespan);

            _browsers[_c.CurrentUser].TextOf(VhoHearingListPage.HearingTime(hearingThatShouldBeVisible.Id))
            .Should().Be($"{_c.TimeZone.Adjust(hearingThatShouldBeVisible.ScheduledDateTime):HH:mm}");
            _browsers[_c.CurrentUser].TextOf(VhoHearingListPage.ListedFor(hearingThatShouldBeVisible.Id))
            .Should().Be($"{listedFor}");
            Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
        }
        public void ThenTheVhoShouldSeeTheParticipantContactDetails()
        {
            Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
            var hearingParticipants   = _c.Test.HearingParticipants.FindAll(x => x.UserRoleName.Equals("Individual") || x.UserRoleName.Equals("Representative"));
            var hearingParticipant    = hearingParticipants.First();
            var conferenceParticipant = _c.Test.ConferenceParticipants.Find(x => x.Name.Contains(hearingParticipant.LastName));
            var firstParticipantLink  = _browsers[_c.CurrentUser].Driver.WaitUntilVisible(VhoHearingListPage.ParticipantContactLink(conferenceParticipant.Id));

            firstParticipantLink.Displayed.Should().BeTrue();
            var action = new Actions(_browsers[_c.CurrentUser].Driver.WrappedDriver);

            action.MoveToElement(firstParticipantLink).Perform();
            if (_c.VideoWebConfig.TestConfig.TargetBrowser == TargetBrowser.Safari)
            {
                return;                                                                     // Latest version of Safari Driver will not hover over the correct element
            }
            TheToolTipDetailsAreDisplayed(conferenceParticipant, hearingParticipant);
        }
 public void ThenTheVhoCanSeeTheHearingView()
 {
     Scrolling.ScrollToTheTopOfThePage(_browsers[_c.CurrentUser]);
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(AdminPanelPage.ParticipantStatusTable, 60).Displayed.Should().BeTrue();
 }