public void SubmitResponse(string user, string password, string notes = "") { ActivitiesNav.LnkSubmitResponse.Click(); var responsePage = new SubmitResponsePopup(this.GetStudyID(), "Submit Response"); responsePage.SwitchTo(); responsePage.TxtInfo.Value = notes; responsePage.BtnOk.Click(); responsePage.ConfirmCredentials(user, password); responsePage.SwitchBackToParent(); //Wait.Until(h => new Link(By.LinkText("Response Submitted")).Exists); Wait.Until(h => ProjectLogHistory.VerifyFirstRowLink("Response Submitted") == true); }
public void InsignificantRniWithClarificationRequestedToAcknowledged() { string RNITitle = "AutoTestRNI-" + DataGen.String(5); var InboxPage = new Inbox(); var ActionsNav = new ActivitiesNav(); var RNISmartformPage = new RNISmartform(); var StudyWorkspacePage = new IRBWorkspace(); var IRBSubmissionsPage = new IRBSubmissions(); Store.LoginAsUser(Users.Irbc); InboxPage.ImgCreateNewRNI.Click(); // Fill in just required info RNISmartformPage.TxtRNIShortTitle.Value = RNITitle; RNISmartformPage.TxtDateAware.Value = "03/02/2014"; RNISmartformPage.TxtDescriptionOfProblem.Value = "This is a RNI test for " + RNITitle; RNISmartformPage.RdoIsIncreasedRiskNo.Click(); RNISmartformPage.RdoNeedRevisionNo.Click(); RNISmartformPage.RdoConsentRequiresRevisionkNo.Click(); RNISmartformPage.BtnContinue.Click(); RNISmartformPage.BtnFinish.Click(); // verify in history tab, pre-submission Wait.Until(h => new Link(By.LinkText("Reportable Information Opened")).Exists); Assert.IsTrue(new Link(By.LinkText("Reportable Information Opened")).Exists, "'Reportable Information Opened' activity not found for: " + RNITitle); // Grab the ID of the study, switch to submit RNI popup (move this functionality to page) string id = StudyWorkspacePage.GetStudyID(); var SubmitRNIPopup = new ActivityPopup(id, "Submit RNI"); // Submit the RNI ActionsNav.LnkSubmitRNI.Click(); SubmitRNIPopup.SwitchTo(); SubmitRNIPopup.BtnOk.Click(); // change this to "confirm credentials page" SubmitRNIPopup.ConfirmCredentials(Users.Irbc.UserName, Users.Irbc.Password); // Switch back to main page PopUpWindow.SwitchTo(RNITitle); Wait.Until(h => new Link(By.LinkText("RNI Submitted")).Exists); ActionsNav.LnkAssignCoordinator.Click(); var AssignCoordinatorPopup = new AssignCoordinator(id, "Assign Coordinator"); AssignCoordinatorPopup.SwitchTo(); AssignCoordinatorPopup.FirstUser.Click(); AssignCoordinatorPopup.BtnOk.Click(); AssignCoordinatorPopup.SwitchBackToParent(); // Log in as IRBD Store.LoginAsUser(Users.Irbd); IRBSubmissionsPage.AllSubmissionsTab.NavigateTo(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.LnkAdvanced.Click(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.SetCriteria("Name",RNITitle); IRBSubmissionsPage.OpenSubmission(RNITitle); ActionsNav.LnkRequestPreReviewClarification.Click(); var RequestPreReviewPopup = new RequestPreReviewClarificationPopup(id, "Request Pre-Review Clarification"); RequestPreReviewPopup.SwitchTo(); RequestPreReviewPopup.TxtInfo.Value = "Addition information required regarding RNI"; RequestPreReviewPopup.BtnOk.Click(); RequestPreReviewPopup.SwitchBackToParent(); Wait.Until(h => new Link(By.LinkText("Clarification Requested")).Exists); Assert.IsTrue(new Link(By.LinkText("Clarification Requested")).Exists, "'Clarification Requested' activity not found for: " + RNITitle); Assert.IsTrue(StudyWorkspacePage.GetStudyState() == "Clarification Requested (Pre-Review)"); // Log in as IRBC Store.LoginAsUser(Users.Irbc); //InboxPage.OpenStudy(RNITitle); IRBSubmissionsPage.AllSubmissionsTab.NavigateTo(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.LnkAdvanced.Click(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.SetCriteria("Name", RNITitle); IRBSubmissionsPage.OpenSubmission(RNITitle); ActionsNav.LnkSubmitResponse.Click(); var SubmitResponsePage = new SubmitResponsePopup(id, "Submit Response"); SubmitResponsePage.SwitchTo(); SubmitResponsePage.TxtInfo.Value = "I cleared this up with batman. We are good."; SubmitResponsePage.BtnOk.Click(); SubmitResponsePage.ConfirmCredentials(Users.Irbc.UserName, Users.Irbc.Password); PopUpWindow.SwitchTo(RNITitle, true); Wait.Until(h => new Link(By.LinkText("Response Submitted")).Exists); Assert.IsTrue(new Link(By.LinkText("Response Submitted")).Exists, "'Response Submitted' activity not found for: " + RNITitle); Assert.IsTrue(StudyWorkspacePage.GetStudyState() == "Pre-Review"); // Log in as IRBD Store.LoginAsUser(Users.Irbd); IRBSubmissionsPage.AllSubmissionsTab.NavigateTo(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.LnkAdvanced.Click(); IRBSubmissionsPage.AllSubmissionsTab.ProjectsComponent.SetCriteria("Name", RNITitle); IRBSubmissionsPage.OpenSubmission(RNITitle); ActionsNav.LnkSubmitRNIPreReview.Click(); var SubmitRNIPreReviewPopup = new SubmitRNIPreReview(id, "Submit RNI Pre-Review"); SubmitRNIPreReviewPopup.SwitchTo(); SubmitRNIPreReviewPopup.SelectDetermination(SubmitRNIPreReview.Determinations.NoneOfTheAbove); SubmitRNIPreReviewPopup.rdoSubmitPreviewYes.Click(); SubmitRNIPreReviewPopup.BtnOk.Click(); SubmitRNIPreReviewPopup.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 Pre-Review Submitted' activity not found for: " + RNITitle); Assert.IsTrue(StudyWorkspacePage.GetStudyState() == "Acknowledged"); }