public void InitialStudyCreationThroughCommitteeReview_ModsRequired_Approved() { string targetStudy = "AutoTestStudy-" + DataGen.String(5); var InitialStudySF = new InitialStudySmartForm(); var irbSubmissionsPage = new IRBSubmissions(); var actionsNav = new ActionsNav(); var workspace = new IRBWorkspace(); //Log in as PI and Create New Study. Store.LoginAsUser(Users.Pi); actionsNav.ImgCreateNewStudyLink.Click(); InitialStudySF.NewSubmissionSmartformPage.TxtDescription.Value = "Random Automated test for IRB submission"; InitialStudySF.NewSubmissionSmartformPage.TxtTitleStudy.Value = targetStudy; InitialStudySF.NewSubmissionSmartformPage.TxtShortTitle.Value = targetStudy; InitialStudySF.NewSubmissionSmartformPage.RdoExternalIrbNo.Selected = true; InitialStudySF.NewSubmissionSmartformPage.RdoFinancialInterestNo.Selected = true; InitialStudySF.NewSubmissionSmartformPage.AttachProtocol(@"\\pdxstor\public\Aaron.Bentley\automation\testDoc.docx"); InitialStudySF.NewSubmissionSmartformPage.BtnContinue.Click(); // Funding Sources InitialStudySF.FundingSourcesPage.BtnContinue.Click(); // Study Team Members InitialStudySF.StudyTeamMembersPage.AddStudyTeamMember(false, false, "Bivens (pi2)", AddStudyTeamMemberPopup.Roles.CoInvestigator, AddStudyTeamMemberPopup.Roles.ResearchAssistant); InitialStudySF.StudyTeamMembersPage.BtnContinue.Click(); // Study Scope InitialStudySF.StudyScopePage.SpecifyExternalSite(false); InitialStudySF.StudyScopePage.SpecifyDrugsInvolved(false); InitialStudySF.StudyScopePage.SpecifyDevicesInvolved(false); InitialStudySF.StudyScopePage.BtnContinue.Click(); // Consent Forms and Recuitment Materials -- skip InitialStudySF.ConsentFormsRecruitmentPage.BtnContinue.Click(); // title / description -- skip InitialStudySF.StudyModCustomPage.BtnContinue.Click(); // Add supporting documents -- skip InitialStudySF.SupportingDocumentsPage.BtnContinue.Click(); // Final Page InitialStudySF.FinalPage.BtnFinish.Click(); // Assert the study appears in window title Wait.Until(h => Web.PortalDriver.Title == targetStudy); // As the PI, Submit the study. workspace.Submit(Users.Pi.UserName, Users.Pi.Password); Assert.IsTrue(workspace.GetStudyState() == "Pre-Review", "State expected not in 'Pre-Review'. State currently: " + workspace.GetStudyState()); // Log in as an IRB coordinator and Assign Coordinator. Store.LoginAsUser(Users.Irbc); irbSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); workspace.AssignCoordinator("Orlando Max (irbc)"); // Log in as the assigned IRBC, Submit Pre-Review (yes to submit pre-review). workspace.SubmitPreReviewForStudy(SubmitPreReviewPopup.TypeOfResearch.BiomedicalClinical); Assert.IsTrue(workspace.GetStudyState() == "Pre-Review Completed", "State expected not in 'Pre-Review Completed'. State currently: " + workspace.GetStudyState()); // Log in as the assigned IRB Coordinator, Assign to Meeting. workspace.AssignMeetingByFirstMeeting(); Assert.IsTrue(workspace.GetStudyState() == "Committee Review", "State expected not in 'Committee Review'. State currently: " + workspace.GetStudyState()); //As the assigned IRB Coordinator, Submit Committee Review (Modifications Required Secure to Approved) workspace.SubmitCommitteeReview(SubmitCommitteeReviewPopup.Determinations.ModificationsRequiredToSecureApproved, "Reason #1","2", "1", "0", "0", "0", "", true); Assert.IsTrue(workspace.GetStudyState() == "Post-Review", "State expected not in 'Post-Review'. State currently: " + workspace.GetStudyID()); //Log in as assigned coordinator, Finalize Documents. Store.LoginAsUser(Users.Irbc); irbSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); workspace.FinalizeDocuments(); Assert.IsTrue(workspace.GetStudyState() == "Post-Review", "State expected not in 'Post-Review'. State currently: " + workspace.GetStudyID()); //As the assigned coordinator, Prepare Letter (Approved should be the only choice). workspace.PrepareLetter(); Assert.IsTrue(workspace.GetStudyState() == "Post-Review", "State expected not in 'Post-Review'. State currently: " + workspace.GetStudyID()); //As the assigned coordinator, Send Letter. workspace.SendLetter(); Assert.IsTrue(workspace.GetStudyState() == "Modifications Required", "State expected not in 'Modifications Required'. State currently: " + workspace.GetStudyID()); // Log in as the PI and Submit Response. Store.LoginAsUser(Users.Pi); irbSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); workspace.SubmitResponse(Users.Pi.UserName,Users.Pi.Password,"This is my respone! :/ "); // Log in as the assigned IRB Coordinator and Assign to Committee Review. Store.LoginAsUser(Users.Irbc); irbSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); workspace.AssignToCommitteeReview(); Assert.IsTrue(workspace.GetStudyState() == "Committee Review", "State expected not in 'Committee Review'. State currently: " + workspace.GetStudyID()); // As the assigned IRB Coordinator, Add Review Comments. workspace.AddReviewComments("Reviewed!"); // TODO VERIFY THE REVIEW COMMENTS //Assert.IsTrue(workspace.ProjectLogReviews.DivComponentArea.Text.Contains("Reviewed!")); Assert.IsTrue(workspace.GetStudyState() == "Committee Review", "State expected not in 'Committee Review'. State currently: " + workspace.GetStudyID()); // As the assigned IRB Coordinator, update review comments by Add Review Comments. workspace.AddReviewComments("More revised comments!"); // TODO VERIFY THE REVIEW COMMENTS // Log in as the assigned IRB Coordinator, Assign to Meeting. workspace.AssignMeetingByFirstMeeting(); Assert.IsTrue(workspace.GetStudyState() == "Committee Review", "State expected not in 'Committee Review'. State currently: " + workspace.GetStudyID()); // As the assigned IRB Coordinator¸ Submit Committee Review (Approved determination, “yes” to submit). workspace.SubmitCommitteeReview(SubmitCommitteeReviewPopup.Determinations.Approved, "2", "1", "0", "0", "0", "", true); Assert.IsTrue(workspace.GetStudyState() == "Post-Review", "State expected not in 'Post-Review'. State currently: " + workspace.GetStudyID()); // As the assigned IRB Coordinator and Prepare Letter. workspace.PrepareLetter(); Assert.IsTrue(workspace.GetStudyState() == "Post-Review", "State expected not in 'Post-Review'. State currently: " + workspace.GetStudyID()); // As the assigned IRB Coordinator, Send Letter. workspace.SendLetter(); Assert.IsTrue(workspace.GetStudyState() == "Approved", "State expected not in 'Approved'. State currently: " + workspace.GetStudyID()); }