/// <summary> /// search for a test, and delete the test /// </summary> /// <param name="searchTestName">the name of the test to search for</param> /// <returns>Workflows</returns> private AssessWorkflows SearchAndDeleteTest(string searchTestName) { Report.Write("--search for a test and delete it--"); TestCentralWorkflows .NavigateToTestCentralHomePage() .SearchForTestByName(searchTestName) .ClickFirstItemTestnameLink(); ViewTestDetailsWorkflows .ViewTestDetailsPageDeleteTest(); return(this); }
/// <summary> /// the constructor /// </summary> /// <param name="workflows">workflows</param> public AssessWorkflows(Workflows workflows) : base() { this.Workflows = workflows; CreateItemWorkflows = new CreateItemWorkflows(this); PassageWorkflows = new PassageWorkflows(this); RubricWorkflows = new RubricWorkflows(this); CreateExpressTestWorkflows = new CreateExpressTestWorkflows(this); CreateManualTestWorkflows = new CreateManualTestWorkflows(this); ViewTestDetailsWorkflows = new ViewTestDetailsWorkflows(this); EditScheduleWorkflows = new EditScheduleWorkflows(this); EditAssignmentCourseWorkflows = new EditAssignmentCourseWorkflows(this); OnlineTestTunnelWorkflows = new OnlineTestTunnelWorkflows(this); ItemCentralWorkflows = new ItemCentralWorkflows(this); TestCentralWorkflows = new TestCentralWorkflows(this); TestWindowWorkflows = new TestWindowWorkflows(this); }
/// <summary> /// search for a test, and copy the oldest test /// </summary> /// <param name="searchTestName">the name of the test to search for</param> /// <returns>Workflows</returns> public AssessWorkflows SearchAndCopyOldestTest(string searchTestName) { Report.Write("--search for a test, copy it, schedule it, sign in as student, start the test--"); //shorten the copied test name to under 70 characters int length = searchTestName.Length; String shorterTestName = null; if (length > 70) { shorterTestName = searchTestName.Substring(0, 70); } else { shorterTestName = searchTestName; } //copy the test name TestName = string.Format("Zcopy {0}: {1}", shorterTestName, DateTime.Now.ToString("yyMMddMMssfff")); //navigate to test central TestCentralWorkflows.NavigateToTestCentralHomePage(); //search for the test TestCentralWorkflows .SearchForTestByName(searchTestName) .SortTestOldestItemFirst() .ClickTestnameLink(searchTestName); //copy the test ViewTestDetailsWorkflows.ViewTestDetailsPageCopyTest(); //modify the copied test name CreateTestManualPage.Data.TestId = TestName; CreateManualTestWorkflows .CopiedManualTestToViewTestDetails(); return(this); }