protected void NavigateToDecisionPage(DecisionJourney decisionJourneyPage) { decisionJourneyPage.Validate(); if (ShouldSelectYes(decisionJourneyPage)) { decisionJourneyPage.SelectYes(); } else { decisionJourneyPage.SelectNo(); } decisionJourneyPage.Continue(); }
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"); }
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"); }
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"); }