public void PrepareLetter() { string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY-AutoTest-hWfUU", targetStudy); var ActionsNav = new ActivitiesNav(); var Inbox = new Inbox(); var finalizeDocumentsPage = new FinalizeDocuments(); //var prepareLetterPage = new PrepareLetterPopup(); //var sendLetterPage = new SendLetterPopup(); var IRBSubmissionPage = new IRBSubmissions(); var studyworkspace = new IRBWorkspace(); Store.LoginAsUser(Users.Irbd); ActionsNav.LnkSubmissions.Click(); IRBSubmissionPage.AllSubmissionsTab.NavigateTo(); IRBSubmissionPage.AllSubmissionsTab.ProjectsComponent.LnkAdvanced.Click(); IRBSubmissionPage.AllSubmissionsTab.ProjectsComponent.SetCriteria("Name", targetStudy); IRBSubmissionPage.OpenSubmission(targetStudy); // finalize the documents ActionsNav.LnkFinalizeDocuments.Click(); PopUpWindow.SwitchTo("Execute \"Finalize Documents\"", true); finalizeDocumentsPage.ChkApprove.Click(); finalizeDocumentsPage.BtnOk.Click(); // Assert that the "Finalized Documents" appear in History tab PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Finalized Documents")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Finalized Documents")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Post-Review"); // Prepare Letter var prepareLetterPage = new PrepareLetterPopup(studyworkspace.GetStudyID(), "Prepare Letter"); ActionsNav.LnkPrepareLetter.Click(); PopUpWindow.SwitchTo("Execute \"Prepare Letter\"", true); prepareLetterPage.CmbDraftLetterTemplate.SelectByInnerText("Approval"); prepareLetterPage.BtnGenerate.Click(); // wait for draft letter link to appear Wait.Until(d => new CCElement(By.PartialLinkText("Correspondence")).Exists); prepareLetterPage.BtnOk.Click(); PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Prepared Letter")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Prepared Letter")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Post-Review"); // Send Letter var sendLetterPage = new SendLetterPopup(studyworkspace.GetStudyID(), "Send Letter"); ActionsNav.LnkSendLetter.Click(); PopUpWindow.SwitchTo("Execute \"Send Letter\"", true); sendLetterPage.BtnOk.Click(); PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Letter Sent")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Letter Sent")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Approved"); }
public void AssignPrimaryContact() { string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY00000017", targetStudy); var ActionsNav = new ActivitiesNav(); var workspace = new IRBWorkspace(); var SelectPersonPage = new SelectPerson("Person"); Store.LoginAsUser(Users.Irbd); var studyForReview = new CCElement(By.LinkText(targetStudy)); studyForReview.Click(); var assignPrimaryContact = new AssignPrimaryContact(workspace.GetStudyID(), "Assign Primary Contact"); ActionsNav.LnkAssignPrimaryContact.Click(); assignPrimaryContact.SwitchTo(); PopUpWindow.SwitchTo("Execute \"Assign Primary Contact\"", true); assignPrimaryContact.SelectPrimaryContact("Bivens (pi2)"); PopUpWindow.SwitchTo(targetStudy); Wait.Until(h => new CCElement(By.LinkText("Assigned Primary Contact")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Assigned Primary Contact")).Exists, "Assigned primary contact not found for: " + targetStudy); }
public void FinalizeDocuments() { // Using STUDY-AutoTest-uqqHJ as template string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY-AutoTest-nGPTf", targetStudy); var ActionsNav = new ActivitiesNav(); var Workspace = new IRBWorkspace(); var irbSubmissionsPage = new IRBSubmissions(); Store.LoginAsUser(Users.Comm4); irbSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); var submitDesignatedReviewPopup = new SubmitDesignatedReview(Workspace.GetStudyID(), "Submit Designated Review"); ActionsNav.LnkSubmitDesignatedReview.Click(); submitDesignatedReviewPopup.SwitchTo(); submitDesignatedReviewPopup.ChkConflictingInterest.Click(); submitDesignatedReviewPopup.RdoBtnFirstDetermination.Click(); submitDesignatedReviewPopup.RdoFirstReviewLevel.Click(); submitDesignatedReviewPopup.ChkFirstExemptCategory.Click(); submitDesignatedReviewPopup.TxtLastDayApproval.Text = "2/6/2030"; submitDesignatedReviewPopup.RdoReadyToSubmitThisReviewYes.Click(); submitDesignatedReviewPopup.BtnOk.Click(); submitDesignatedReviewPopup.SwitchBackToParent(); Wait.Until((d) => new CCElement(By.LinkText("Designated Review Submitted")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Designated Review Submitted")).Exists); Assert.IsTrue(Workspace.GetStudyState() == "Post-Review"); }
public void PutIntoReview() { // Take an existing study in the pre-review completed state, and clone it, put into non-committe review -- use one of the clones in this test string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY-AutoTest-SMVPz", targetStudy); var ActionsNav = new ActivitiesNav(); var Inbox = new Inbox(); //var DesignatedReviewerPopup = new AssignDesignatedReviewer(); var IRBSubmissionPage = new IRBSubmissions(); var StudyWorkspace = new IRBWorkspace(); // Login as irbd Store.LoginAsUser(Users.Irbd); IRBSubmissionPage.OpenSubmissionByAllSubmissions(targetStudy); // Assign Designated Reviewer var DesignatedReviewerPopup = new AssignDesignatedReviewer(StudyWorkspace.GetStudyID(), "Assign Designated Reviewer"); ActionsNav.LnkAssignDesignatedReviewer.Click(); DesignatedReviewerPopup.SwitchTo(); DesignatedReviewerPopup.CmbDesignatedReviewer.SelectByInnerText("Harry Smith (comm4)"); DesignatedReviewerPopup.OkBtn.Click(); DesignatedReviewerPopup.SwitchBackToParent(); Wait.Until((d) => new CCElement(By.LinkText("Assigned to Designated Reviewer")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Assigned to Designated Reviewer")).Exists); }
//[Test] //[Ignore("Duplicated by System Test InsignificantRniWithClarificationRequestedToAcknowledged")] public void SubmitRNIPreReview() { // clone a RNI in pre-review state string targetStudy = "RNI-" + DataGen.String(5); // select something new EntityClonerUtil.CloneEntity("RNI00000005", targetStudy); var Inbox = new Inbox(); var LeftActionNav = new ActivitiesNav(); var StudyWorkspacePage = new IRBWorkspace(); Store.LoginAsUser(Users.Irbd); Inbox.LnkAdvanced.Click(); Wait.Until(h => Inbox.QueryField1.Displayed); Inbox.QueryField1.SelectByInnerText("State"); Wait.Until(h => Inbox.QueryCriteria1.Enabled); Inbox.QueryCriteria1.Text = "Pre-Review"; Wait.Until(d => Inbox.BtnGo.Enabled); Inbox.BtnGo.Click(); Wait.Until(d => Inbox.BtnGo.Enabled); // change this Inbox.OpenStudy(targetStudy); string id = StudyWorkspacePage.GetStudyID(); var AssignCordPopup = new AssignCoordinator(id, "Assign Coordinator"); // Assign coordinator LeftActionNav.LnkAssignCoordinator.Click(); AssignCordPopup.SwitchTo(); AssignCordPopup.FirstUser.Click(); AssignCordPopup.SwitchBackToParent(); // Submit RNI-SubmitPreReviewPopup LeftActionNav.LnkSubmitRNIPreReview.Click(); var SubmitRNIPreReviewPage = new SubmitRNIPreReview(id, "Submit RNI Pre-Review"); SubmitRNIPreReviewPage.SwitchTo(); SubmitRNIPreReviewPage.SelectDetermination(IRBStore.SubmitRNIPreReview.Determinations.NoneOfTheAbove); SubmitRNIPreReviewPage.rdoSubmitPreviewYes.Click(); SubmitRNIPreReviewPage.BtnOk.Click(); SubmitRNIPreReviewPage.SwitchBackToParent(); Wait.Until(h => new Link(By.LinkText("RNI Pre-Review Submitted")).Exists); Assert.IsTrue(new Link(By.LinkText("RNI Pre-Review Submitted")).Exists, "'RNI Submitted Pre-Review' activity not found for: " + targetStudy); Assert.IsTrue(StudyWorkspacePage.GetStudyState() == "Acknowledged", "State of RNI: Not in acknowledged state"); }
public void A2_SubmitPreReview() { // take a study in the previous pre-review state, clone it. string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY00000011", targetStudy); var ActionsNav = new ActivitiesNav(); var AssignCoordinator = new AssignCoordinator("STUDY-" + targetStudy, "Assign Coordinator"); var IRBSubmissionsPage = new IRBSubmissions(); var Workspace = new IRBWorkspace(); // Login as irbd Store.LoginAsUser(Users.Irbd); IRBSubmissionsPage.OpenSubmissionByAllSubmissions(targetStudy); // Assign a coordinator Workspace.AssignCoordinator("Orlando Max (irbc)"); // verify link IRB Coordinator Assigned Assert.IsTrue(new CCElement(By.LinkText("IRB Coordinator Assigned")).Exists, "Cannot find 'IRB Coordinator Assigned' activity in history"); // Submit Pre-Review var PreReview = new SubmitPreReviewPopup(Workspace.GetStudyID(), "Submit Pre-Review"); ActionsNav.LnkSubmitPreReview.Click(); PreReview.SwitchTo(); PreReview.RdoRiskLevelGreater.Click(); PreReview.ChkBoxBioMedicalClinical.Click(); PreReview.RadioBtnSubmitPreReviewYes.Click(); PreReview.BtnOk.Click(); PreReview.SwitchBackToParent(); // verify link Pre-Review Submitted exists Wait.Until((d) => new CCElement(By.LinkText("Pre-Review Submitted")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Pre-Review Submitted")).Exists, "Cannot find 'Pre-Review Submitted' activity in history"); }