Source:
private void testPublishAndResendLinkAction() throws Exception { feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions); ______TS("MANUAL: publish link clickable"); String courseId = testData.feedbackSessions.get("manualSession").getCourseId(); String sessionName = testData.feedbackSessions.get("manualSession").getFeedbackSessionName(); feedbackPage.clickAndCancel(feedbackPage.getPublishLink(courseId, sessionName)); assertFalse(BackDoor.getFeedbackSession(courseId, sessionName).isPublished()); feedbackPage.verifyResendPublishedEmailButtonDoesNotExist(courseId, sessionName); feedbackPage.clickAndConfirm(feedbackPage.getPublishLink(courseId, sessionName)); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_SESSION_PUBLISHED); assertTrue(BackDoor.getFeedbackSession(courseId, sessionName).isPublished()); feedbackPage.verifyHtmlMainContent("/instructorFeedbackPublishSuccessful.html"); ______TS("PUBLISHED: publish link hidden"); feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions); feedbackPage.verifyPublishLinkHidden(courseId, sessionName); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.cancelResendPublishedEmailForm(); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.waitForAjaxLoaderGifToDisappear(); feedbackPage.submitResendPublishedEmailForm(); feedbackPage.waitForPageToLoad(); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_RESEND_EMAIL_EMPTY_RECIPIENT); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.waitForAjaxLoaderGifToDisappear(); feedbackPage.fillResendPublishedEmailForm(); feedbackPage.submitResendPublishedEmailForm(); feedbackPage.waitForPageToLoad(); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_RESEND_EMAIL_EMPTY_RECIPIENT); }

Target:
private void testPublishAndResendLinkAction() throws Exception { feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions); ______TS("MANUAL: publish link clickable"); String courseId = testData.feedbackSessions.get("manualSession").getCourseId(); String sessionName = testData.feedbackSessions.get("manualSession").getFeedbackSessionName(); feedbackPage.clickAndCancel(feedbackPage.getPublishLink(courseId, sessionName)); assertFalse(BackDoor.getFeedbackSession(courseId, sessionName).isPublished()); assertFalse(feedbackPage.checkIfResendPublishedEmailButtonExists(courseId, sessionName)); feedbackPage.clickAndConfirm(feedbackPage.getPublishLink(courseId, sessionName)); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_SESSION_PUBLISHED); assertTrue(BackDoor.getFeedbackSession(courseId, sessionName).isPublished()); feedbackPage.verifyHtmlMainContent("/instructorFeedbackPublishSuccessful.html"); ______TS("PUBLISHED: publish link hidden"); feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions); feedbackPage.verifyPublishLinkHidden(courseId, sessionName); ______TS("resend link action: PUBLISHED feedback session"); assertTrue(feedbackPage.checkIfResendPublishedEmailButtonExists(courseId, sessionName)); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.cancelResendPublishedEmailForm(); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.waitForAjaxLoaderGifToDisappear(); feedbackPage.submitResendPublishedEmailForm(); feedbackPage.waitForPageToLoad(); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_RESEND_EMAIL_EMPTY_RECIPIENT); feedbackPage.clickResendPublishedEmailLink(courseId, sessionName); feedbackPage.waitForAjaxLoaderGifToDisappear(); feedbackPage.fillResendPublishedEmailForm(); feedbackPage.submitResendPublishedEmailForm(); feedbackPage.waitForPageToLoad(); feedbackPage.waitForTextsForAllStatusMessagesToUserEquals( Const.StatusMessages.FEEDBACK_SESSION_RESEND_EMAIL_EMPTY_RECIPIENT); }