public void testEditResponse() { ______TS("edit responses"); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse( fq.getId(), "*****@*****.**", "*****@*****.**"); assertEquals("Student 1 self feedback.", fr.getResponseDetails().getAnswerString()); submitPage = loginToInstructorEditStudentFeedbackPage( "IESFPTCourseinstr", "*****@*****.**", "session1InIESFPTCourse"); // Full HTML verification already done in InstructorFeedbackSubmitPageUiTest submitPage.verifyHtmlMainContent("/InstructorEditStudentFeedbackPageOpen.html"); submitPage.fillResponseTextBox(1, 0, "Good design"); submitPage.clickSubmitButton(); assertEquals(submitPage.getStatus(), Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); fr = BackDoor.getFeedbackResponse( fq.getId(), "*****@*****.**", "*****@*****.**"); assertEquals("Good design", fr.getResponseDetails().getAnswerString()); }
private void testDeleteResponse() { ______TS("test delete response"); submitPage.fillResponseTextBox(2, 0, ""); submitPage.fillResponseTextBox(1, 0, ""); submitPage.clickSubmitButton(); assertEquals(submitPage.getStatus(), Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse( fq.getId(), "*****@*****.**", "*****@*****.**"); assertNull(fr); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); fr = BackDoor.getFeedbackResponse( fq.getId(), "*****@*****.**", "*****@*****.**"); assertNull(fr); }
private void testAddResponse() { ______TS("test new response"); submitPage.fillResponseTextBox(2, 0, "4"); submitPage.clickSubmitButton(); assertEquals(submitPage.getStatus(), Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse( fq.getId(), "*****@*****.**", "*****@*****.**"); assertEquals("4", fr.getResponseDetails().getAnswerString()); // Full HTML verification already done in InstructorFeedbackSubmitPageUiTest submitPage.verifyHtmlMainContent("/InstructorEditStudentFeedbackPageModified.html"); }