Source:
public void allTests() throws Exception{ feedbackEditPage = getFeedbackEditPage(); ______TS("Submit empty course list"); feedbackEditPage.clickFsCopyButton(); ThreadHelper.waitFor(1000); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopyPage.html"); feedbackEditPage.clickFsCopySubmitButton(); feedbackEditPage.verifyStatus(Const.StatusMessages.FEEDBACK_SESSION_COPY_NONESELECTED); ______TS("Copying fails due to fs with same name in course selected"); feedbackEditPage.clickFsCopyButton(); ThreadHelper.waitFor(1000); feedbackEditPage.fillCopyToOtherCoursesForm(feedbackSessionName); feedbackEditPage.clickFsCopySubmitButton(); String error = String.format(Const.StatusMessages.FEEDBACK_SESSION_COPY_ALREADYEXISTS, feedbackSessionName, testData.courses.get("course").id); feedbackEditPage.verifyStatus(error); ThreadHelper.waitFor(1000); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopyFail.html"); ______TS("Successful case"); feedbackEditPage.clickFsCopyButton(); ThreadHelper.waitFor(1000); feedbackEditPage.fillCopyToOtherCoursesForm("New name!"); feedbackEditPage.clickFsCopySubmitButton(); feedbackEditPage.verifyStatus(Const.StatusMessages.FEEDBACK_SESSION_COPIED); ThreadHelper.waitFor(1000); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopySuccess.html"); }

Target:
public void allTests() throws Exception{ feedbackEditPage = getFeedbackEditPage(); ______TS("Submit empty course list"); feedbackEditPage.clickFsCopyButton(); feedbackEditPage.waitForModalToLoad(); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopyPage.html"); feedbackEditPage.clickFsCopySubmitButton(); feedbackEditPage.verifyStatus(Const.StatusMessages.FEEDBACK_SESSION_COPY_NONESELECTED); ______TS("Copying fails due to fs with same name in course selected"); feedbackEditPage.clickFsCopyButton(); feedbackEditPage.waitForModalToLoad(); feedbackEditPage.fillCopyToOtherCoursesForm(feedbackSessionName); feedbackEditPage.clickFsCopySubmitButton(); String error = String.format(Const.StatusMessages.FEEDBACK_SESSION_COPY_ALREADYEXISTS, feedbackSessionName, testData.courses.get("course").id); feedbackEditPage.verifyStatus(error); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopyFail.html"); ______TS("Copying fails due to fs with invalid name"); feedbackEditPage.clickFsCopyButton(); feedbackEditPage.waitForModalToLoad(); feedbackEditPage.fillCopyToOtherCoursesForm("Invalid name | for feedback session"); feedbackEditPage.clickFsCopySubmitButton(); feedbackEditPage.verifyStatus("\"Invalid name | for feedback session\" is not acceptable to TEAMMATES as feedback session name because it contains invalid characters. All feedback session name must start with an alphanumeric character, and cannot contain any vertical bar (|) or percent sign (%)."); ______TS("Successful case"); feedbackEditPage.clickFsCopyButton(); feedbackEditPage.waitForModalToLoad(); feedbackEditPage.fillCopyToOtherCoursesForm("New name!"); feedbackEditPage.clickFsCopySubmitButton(); feedbackEditPage.verifyStatus(Const.StatusMessages.FEEDBACK_SESSION_COPIED); feedbackEditPage.waitForElementPresence(By.id("table-sessions"), 5); ThreadHelper.waitFor(1000); feedbackEditPage.verifyHtml("/instructorFeedbackEditCopySuccess.html"); }