use of teammates.test.pageobjects.InstructorFeedbackEditPage in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageUiTest method testLink.
@Test
public void testLink() {
______TS("action: test that edit link leads to correct edit page");
InstructorFeedbackEditPage editPage = resultsPage.clickEditLink();
editPage.verifyContains("Edit Feedback Session");
assertEquals("CFResultsUiT.CS2104", editPage.getCourseId());
assertEquals("First Session", editPage.getFeedbackSessionName());
}
use of teammates.test.pageobjects.InstructorFeedbackEditPage in project teammates by TEAMMATES.
the class InstructorFeedbackSessionsPageUiTest method testEditLink.
private void testEditLink() {
InstructorFeedbackEditPage feedbackResultsPage;
FeedbackSessionAttributes fsa;
______TS("edit link clickable when creator");
fsa = testData.feedbackSessions.get("privateSession");
feedbackResultsPage = feedbackPage.loadEditLink(fsa.getCourseId(), fsa.getFeedbackSessionName());
assertTrue(feedbackResultsPage.isCorrectPage(fsa.getCourseId(), fsa.getFeedbackSessionName()));
feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions);
}
use of teammates.test.pageobjects.InstructorFeedbackEditPage in project teammates by TEAMMATES.
the class InstructorFeedbackEditCopyUiTest method allTests.
@Test
public void allTests() throws Exception {
InstructorFeedbackEditPage feedbackEditPage = getFeedbackEditPage();
______TS("Submit empty course list");
feedbackEditPage.clickFsCopyButton();
feedbackEditPage.getFsCopyToModal().waitForModalToLoad();
// Full HTML verification already done in InstructorFeedbackEditPageUiTest
feedbackEditPage.verifyHtmlMainContent("/instructorFeedbackEditCopyPage.html");
feedbackEditPage.getFsCopyToModal().clickSubmitButton();
feedbackEditPage.getFsCopyToModal().waitForFormSubmissionErrorMessagePresence();
assertTrue(feedbackEditPage.getFsCopyToModal().isFormSubmissionStatusMessageVisible());
feedbackEditPage.getFsCopyToModal().verifyStatusMessage(Const.StatusMessages.FEEDBACK_SESSION_COPY_NONESELECTED);
feedbackEditPage.getFsCopyToModal().clickCloseButton();
______TS("Copying fails due to fs with same name in course selected");
feedbackEditPage.clickFsCopyButton();
feedbackEditPage.getFsCopyToModal().waitForModalToLoad();
feedbackEditPage.getFsCopyToModal().fillFormWithAllCoursesSelected(feedbackSessionName);
feedbackEditPage.getFsCopyToModal().clickSubmitButton();
feedbackEditPage.getFsCopyToModal().waitForFormSubmissionErrorMessagePresence();
assertTrue(feedbackEditPage.getFsCopyToModal().isFormSubmissionStatusMessageVisible());
feedbackEditPage.getFsCopyToModal().verifyStatusMessage(String.format(Const.StatusMessages.FEEDBACK_SESSION_COPY_ALREADYEXISTS, feedbackSessionName, testData.courses.get("course").getId()));
// Full HTML verification already done in InstructorFeedbackEditPageUiTest
feedbackEditPage.verifyHtmlMainContent("/instructorFeedbackEditCopyFail.html");
feedbackEditPage.getFsCopyToModal().clickCloseButton();
______TS("Copying fails due to fs with invalid name");
String invalidNameforFs = "Invalid name | for feedback session";
feedbackEditPage.clickFsCopyButton();
feedbackEditPage.getFsCopyToModal().waitForModalToLoad();
feedbackEditPage.getFsCopyToModal().fillFormWithAllCoursesSelected(invalidNameforFs);
feedbackEditPage.getFsCopyToModal().clickSubmitButton();
feedbackEditPage.getFsCopyToModal().waitForFormSubmissionErrorMessagePresence();
assertTrue(feedbackEditPage.getFsCopyToModal().isFormSubmissionStatusMessageVisible());
feedbackEditPage.getFsCopyToModal().verifyStatusMessage("\"" + invalidNameforFs + "\" is not acceptable to TEAMMATES as a/an " + "feedback session name because it contains invalid characters. " + "A/An feedback session name must start with an alphanumeric character, " + "and cannot contain any vertical bar (|) or percent sign (%).");
feedbackEditPage.getFsCopyToModal().clickCloseButton();
______TS("Successful case");
feedbackEditPage.clickFsCopyButton();
feedbackEditPage.getFsCopyToModal().waitForModalToLoad();
feedbackEditPage.getFsCopyToModal().fillFormWithAllCoursesSelected("New name!");
feedbackEditPage.getFsCopyToModal().clickSubmitButton();
feedbackEditPage.waitForPageToLoad();
feedbackEditPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_SESSION_COPIED);
feedbackEditPage.waitForElementPresence(By.id("table-sessions"));
// Full HTML verification already done in InstructorFeedbackEditPageUiTest
feedbackEditPage.verifyHtmlMainContent("/instructorFeedbackEditCopySuccess.html");
}
Aggregations