コード例 #1
0
 public RepresentativeQuestionnaireSteps(LoginSteps loginSteps, TestContext testContext, BrowserContext browserContext, ErrorMessage errorMessage, InformationSteps information, ScenarioContext scenarioContext) : base(testContext, browserContext, information, scenarioContext)
 {
     _information                 = information;
     _browserContext              = browserContext;
     _aboutVideoHearings          = new DecisionJourney(browserContext, RepresentativePageUrl.AboutVideoHearings);
     _aboutYouAndYouClient        = new DecisionJourney(browserContext, RepresentativePageUrl.AboutYouAndYourClient, RepresentativeQuestionKeys.AboutYourClient);
     _aboutYou                    = new DecisionJourney(browserContext, RepresentativePageUrl.AboutYou, RepresentativeQuestionKeys.AboutYou);
     _accessToRoom                = new DecisionJourney(browserContext, RepresentativePageUrl.AccessToRoom, RepresentativeQuestionKeys.AccessToRoom);
     _aboutYourClient             = new DecisionJourney(browserContext, RepresentativePageUrl.AboutYourClient, RepresentativeQuestionKeys.AboutYourClient);
     _clientAttendance            = new DecisionJourney(browserContext, RepresentativePageUrl.ClientAttendance, RepresentativeQuestionKeys.ClientAttendance);
     _hearingSuitability          = new DecisionJourney(browserContext, RepresentativePageUrl.HearingSuitability, RepresentativeQuestionKeys.HearingSuitability);
     _yourComputer                = new DecisionJourney(browserContext, RepresentativePageUrl.YourComputerRep, RepresentativeQuestionKeys.YourComputer);
     _aboutYourComputer           = new DecisionJourney(browserContext, RepresentativePageUrl.AboutYourComputerRep, RepresentativeQuestionKeys.AboutYourComputer);
     _questionnaireCompleted      = new DecisionJourney(browserContext, RepresentativePageUrl.QuestionnaireCompleted);
     _thankYou                    = new Page(browserContext, RepresentativePageUrl.ThankYouRep);
     _pleaseContactUs             = new Page(browserContext, RepresentativePageUrl.PleaseContactUs);
     _checkYourComputer           = new DecisionJourney(browserContext, PageUri.CheckYourComputer);
     _switchOnCameraAndMicrophone = new DecisionJourney(browserContext, PageUri.SwitchOnCameraAndMicrophone);
     _testYourEquipment           = new DecisionJourney(browserContext, PageUri.TestYourEquipment);
     _cameraWorking               = new DecisionJourney(browserContext, PageUri.CameraWorking);
     _microphoneWorking           = new DecisionJourney(browserContext, PageUri.MicrophoneWorking);
     _videoWorking                = new DecisionJourney(browserContext, PageUri.VideoWorking);
     _signInOnComputer            = new Page(browserContext, PageUri.SignInOncomputer);
     _signBackIn                  = new Page(browserContext, PageUri.SignBackIn);
     _equipmentBlocked            = new Page(browserContext, PageUri.EquipmentBlocked);
     _testContext                 = testContext;
     _representativeParticipantId = _testContext.RepresentativeParticipantId;
     _loginSteps                  = loginSteps;
 }
コード例 #2
0
 public void GivenIndividualParticipantIsOnPageHavingSubmittedQuestionnaire(string page)
 {
     SubmitQuestionnaireForPositivePath();
     _loginSteps.WhenParticipantLogsInWithValidCredentials("Individual");
     NavigateToDecisionPage(_checkYourComputer);
     _currentPage = _switchOnCameraAndMicrophone;
 }
コード例 #3
0
 protected override bool ShouldSelectYes(DecisionJourney decisionJourneyPage)
 {
     return(decisionJourneyPage == _yourComputer ||
            decisionJourneyPage == _aboutYourComputer ||
            decisionJourneyPage == _accessToRoom ||
            decisionJourneyPage == _checkYourComputer);
 }
コード例 #4
0
 protected override bool ShouldSelectYes(DecisionJourney decisionJourneyPage)
 {
     return(decisionJourneyPage == _yourComputer ||
            decisionJourneyPage == _aboutYourComputer ||
            decisionJourneyPage == _yourInternetConnection ||
            decisionJourneyPage == _consent ||
            decisionJourneyPage == _checkYourComputer);
 }
コード例 #5
0
 public QuestionnaireJourney(TestContext testContext, BrowserContext browserContext, InformationSteps information, ScenarioContext scenarioContext)
 {
     _information       = information;
     _errorMessage      = new ErrorMessage(browserContext);
     _thankYou          = new Page(browserContext, PageUri.ThankYouPage);
     _checkYourComputer = new DecisionJourney(browserContext, PageUri.CheckYourComputer);
     _scenarioContext   = scenarioContext;
     _testContext       = testContext;
 }
コード例 #6
0
 protected void NavigateToDecisionPage(DecisionJourney decisionJourneyPage)
 {
     decisionJourneyPage.Validate();
     if (ShouldSelectYes(decisionJourneyPage))
     {
         decisionJourneyPage.SelectYes();
     }
     else
     {
         decisionJourneyPage.SelectNo();
     }
     decisionJourneyPage.Continue();
 }
コード例 #7
0
        protected void SelectAnswer(DecisionJourney page, AnswerType answer)
        {
            switch (answer)
            {
            case AnswerType.Yes:
                page.SelectYes();
                break;

            case AnswerType.No:
                page.SelectNo();
                break;

            case AnswerType.NotSure:
                page.SelectNotSure();
                break;
            }
        }
コード例 #8
0
 public IndividualQuestionnaireSteps(LoginSteps loginSteps, TestContext testContext, BrowserContext browserContext, InformationSteps information, ScenarioContext scenarioContext) : base(testContext, browserContext, information, scenarioContext)
 {
     _aboutYou               = new DecisionJourney(browserContext, PageUri.AboutYouPage);
     _interpreter            = new DecisionJourney(browserContext, PageUri.InterpreterPage);
     _yourComputer           = new DecisionJourney(browserContext, PageUri.YourComputerPage);
     _aboutYourComputer      = new DecisionJourney(browserContext, PageUri.AboutYourComputerPage);
     _information            = information;
     _yourInternetConnection = new DecisionJourney(browserContext, PageUri.YourInternetConnectionPage);
     _accessToRoom           = new DecisionJourney(browserContext, PageUri.AccessToARoomPage);
     _consent                     = new DecisionJourney(browserContext, PageUri.ConsentPage);
     _checkYourComputer           = new DecisionJourney(browserContext, PageUri.CheckYourComputer);
     _switchOnCameraAndMicrophone = new DecisionJourney(browserContext, PageUri.SwitchOnCameraAndMicrophone);
     _testYourEquipment           = new DecisionJourney(browserContext, PageUri.TestYourEquipment);
     _cameraWorking               = new DecisionJourney(browserContext, PageUri.CameraWorking);
     _microphoneWorking           = new DecisionJourney(browserContext, PageUri.MicrophoneWorking);
     _videoWorking                = new DecisionJourney(browserContext, PageUri.VideoWorking);
     _signInOnComputer            = new DecisionJourney(browserContext, PageUri.SignInOncomputer);
     _signBackIn                  = new DecisionJourney(browserContext, PageUri.SignBackIn);
     _testContext                 = testContext;
     _individualParticipantId     = _testContext.IndividualParticipantId;
     _loginSteps                  = loginSteps;
 }
コード例 #9
0
 protected virtual bool ShouldSelectYes(DecisionJourney decisionJourneyPage)
 {
     return(true);
 }
コード例 #10
0
        public void InitiateJourneySteps(string page)
        {
            switch (page)
            {
            case IndividualPageNames.AboutYou:
                _aboutYou.Validate();
                _currentPage = _aboutYou;
                break;

            case IndividualPageNames.Interpreter:
                NavigateToDecisionPage(_aboutYou);
                _currentPage = _interpreter;
                break;

            case IndividualPageNames.YourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                _currentPage = _yourComputer;
                break;

            case IndividualPageNames.AboutYourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                _currentPage = _aboutYourComputer;
                break;

            case IndividualPageNames.YourInternetConnection:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                _currentPage = _yourInternetConnection;
                break;

            case IndividualPageNames.AccessToARoom:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                NavigateToDecisionPage(_yourInternetConnection);
                _currentPage = _accessToRoom;
                break;

            case IndividualPageNames.Consent:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                NavigateToDecisionPage(_yourInternetConnection);
                NavigateToDecisionPage(_accessToRoom);
                _currentPage = _consent;
                break;

            case SelfTestPageNames.CheckYourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                NavigateToDecisionPage(_yourInternetConnection);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_consent);
                _currentPage = _checkYourComputer;
                break;

            case SelfTestPageNames.SwitchOnCameraAndMicrophone:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_interpreter);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                NavigateToDecisionPage(_yourInternetConnection);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_consent);
                NavigateToDecisionPage(_checkYourComputer);
                _currentPage = _switchOnCameraAndMicrophone;
                break;
            }
            _scenarioContext.Set <DecisionJourney>(_currentPage, "CurrentPage");
        }
コード例 #11
0
        public void ThenParticipantShouldProceedToPage(string page)
        {
            switch (page)
            {
            case IndividualPageNames.AboutYou:
                _aboutYou.Validate();
                break;

            case IndividualPageNames.Interpreter:
                _interpreter.Validate();
                break;

            case IndividualPageNames.YourComputer:
                _yourComputer.Validate();
                break;

            case IndividualPageNames.ThankYou:
                _thankYou.Validate();
                break;

            case IndividualPageNames.AboutYourComputer:
                _aboutYourComputer.Validate();
                break;

            case IndividualPageNames.YourInternetConnection:
                _yourInternetConnection.Validate();
                break;

            case IndividualPageNames.AccessToARoom:
                _accessToRoom.Validate();
                break;

            case IndividualPageNames.Consent:
                _consent.Validate();
                _currentPage = _consent;
                break;

            case SelfTestPageNames.CheckYourComputer:
                _checkYourComputer.Validate();
                _currentPage = _checkYourComputer;
                break;

            case SelfTestPageNames.SwitchOnCameraAndMicrophone:
                _switchOnCameraAndMicrophone.Validate();
                _currentPage = _switchOnCameraAndMicrophone;
                break;

            case SelfTestPageNames.TestYourEquipment:
                _testYourEquipment.Validate();
                _currentPage = _testYourEquipment;
                break;

            case SelfTestPageNames.CameraWorking:
                _cameraWorking.Validate();
                _currentPage = _cameraWorking;
                break;

            case SelfTestPageNames.MicrophoneWorking:
                _microphoneWorking.Validate();
                _currentPage = _microphoneWorking;
                break;

            case SelfTestPageNames.VideoWorking:
                _videoWorking.Validate();
                _currentPage = _videoWorking;
                break;

            case SelfTestPageNames.SignBackIn:
                _currentPage = _signBackIn;
                break;

            case SelfTestPageNames.SignInOncomputer:
                _currentPage = _signInOnComputer;
                break;
            }
            _scenarioContext.Set(_currentPage, "CurrentPage");
        }
コード例 #12
0
        public void InitiateJourneySteps(string page)
        {
            switch (page)
            {
            case RepresentativePageNames.AboutYou:
                _aboutYou.Validate();
                _currentPage = _aboutYou;
                break;

            case RepresentativePageNames.AboutYourClient:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                _currentPage = _aboutYourClient;
                break;

            case RepresentativePageNames.ClientAttendance:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                _currentPage = _clientAttendance;
                break;

            case RepresentativePageNames.HearingSuitability:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                NavigateToDecisionPage(_clientAttendance);
                _currentPage = _hearingSuitability;
                break;

            case RepresentativePageNames.AccessToRoom:
                NavigateToDecisionPage(_aboutYou);
                _currentPage = _accessToRoom;
                break;

            case RepresentativePageNames.YourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                NavigateToDecisionPage(_clientAttendance);
                NavigateToDecisionPage(_hearingSuitability);
                _currentPage = _yourComputer;
                break;

            case RepresentativePageNames.AboutYourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                NavigateToDecisionPage(_clientAttendance);
                NavigateToDecisionPage(_hearingSuitability);
                NavigateToDecisionPage(_yourComputer);
                _currentPage = _aboutYourComputer;
                break;

            case SelfTestPageNames.CheckYourComputer:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                NavigateToDecisionPage(_clientAttendance);
                NavigateToDecisionPage(_hearingSuitability);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                _questionnaireCompleted.Continue();
                _currentPage = _checkYourComputer;
                break;

            case SelfTestPageNames.SwitchOnCameraAndMicrophone:
                NavigateToDecisionPage(_aboutYou);
                NavigateToDecisionPage(_accessToRoom);
                NavigateToDecisionPage(_aboutYourClient);
                NavigateToDecisionPage(_clientAttendance);
                NavigateToDecisionPage(_hearingSuitability);
                NavigateToDecisionPage(_yourComputer);
                NavigateToDecisionPage(_aboutYourComputer);
                _questionnaireCompleted.Continue();
                NavigateToDecisionPage(_checkYourComputer);
                _currentPage = _switchOnCameraAndMicrophone;
                break;
            }
            _scenarioContext.Set <DecisionJourney>(_currentPage, "CurrentPage");
        }