Search in sources :

Example 1 with InstructorFeedbackResultsPage

use of teammates.test.pageobjects.InstructorFeedbackResultsPage in project teammates by TEAMMATES.

the class AdminHomePageUiTest method verifyCanViewSessionResults.

private void verifyCanViewSessionResults(String courseId, String sessionName, String pathToExpectedHtml) throws Exception {
    InstructorHomePage instructorHomePage = coursesPage.loadInstructorHomeTab();
    InstructorFeedbackResultsPage resultsPage = instructorHomePage.clickFeedbackSessionViewResultsLink(courseId, sessionName);
    resultsPage.expandPanels();
    resultsPage.verifyHtmlMainContent(pathToExpectedHtml);
}
Also used : InstructorHomePage(teammates.test.pageobjects.InstructorHomePage) InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage)

Example 2 with InstructorFeedbackResultsPage

use of teammates.test.pageobjects.InstructorFeedbackResultsPage in project teammates by TEAMMATES.

the class FeedbackRankQuestionUiTest method testInstructorResultsPageForRankRecipientQuestion.

@Test
public void testInstructorResultsPageForRankRecipientQuestion() throws Exception {
    ______TS("Rank recipient instructor results : question");
    InstructorFeedbackResultsPage instructorResultsPage = loginToInstructorFeedbackResultsPageWithViewType("instructor1", "student", false, null);
    instructorResultsPage.loadResultQuestionPanel(3);
    instructorResultsPage.loadResultQuestionPanel(9);
    instructorResultsPage.verifyHtmlMainContent("/instructorFeedbackResultsPageRankRecipient.html");
}
Also used : InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage) Test(org.testng.annotations.Test)

Example 3 with InstructorFeedbackResultsPage

use of teammates.test.pageobjects.InstructorFeedbackResultsPage in project teammates by TEAMMATES.

the class InstructorFeedbackResultsPageScalabilityTest method loginToInstructorFeedbackResultsPage.

// Needs to log before returning.
@SuppressWarnings("PMD.UnnecessaryLocalBeforeReturn")
private InstructorFeedbackResultsPage loginToInstructorFeedbackResultsPage(String instructorName, String fsName) {
    AppUrl resultsUrl = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_RESULTS_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).getCourseId()).withSessionName(testData.feedbackSessions.get(fsName).getFeedbackSessionName());
    Stopwatch stopwatch = new Stopwatch();
    stopwatch.start();
    InstructorFeedbackResultsPage resultsPage = loginAdminToPage(resultsUrl, InstructorFeedbackResultsPage.class);
    resultsPage.clickCollapseExpandButtonAndWaitForPanelsToExpand();
    log.info("Time taken: " + stopwatch.getTimeElapsedInSeconds());
    return resultsPage;
}
Also used : AppUrl(teammates.common.util.AppUrl) Stopwatch(teammates.client.scripts.util.Stopwatch) InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage)

Example 4 with InstructorFeedbackResultsPage

use of teammates.test.pageobjects.InstructorFeedbackResultsPage in project teammates by TEAMMATES.

the class InstructorFeedbackResultsPageUiTest method loginToInstructorFeedbackResultsPageWithViewType.

private InstructorFeedbackResultsPage loginToInstructorFeedbackResultsPageWithViewType(String instructorName, String fsName, boolean needAjax, String viewType) {
    AppUrl resultsUrl = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_RESULTS_PAGE).withUserId(testData.instructors.get(instructorName).googleId).withCourseId(testData.feedbackSessions.get(fsName).getCourseId()).withSessionName(testData.feedbackSessions.get(fsName).getFeedbackSessionName());
    if (needAjax) {
        resultsUrl = resultsUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_NEED_AJAX, String.valueOf(needAjax));
    }
    if (viewType != null) {
        resultsUrl = resultsUrl.withParam(Const.ParamsNames.FEEDBACK_RESULTS_SORTTYPE, viewType);
    }
    InstructorFeedbackResultsPage resultsPage = loginAdminToPage(resultsUrl, InstructorFeedbackResultsPage.class);
    if (needAjax) {
        resultsPage.waitForPageStructureToLoad();
    } else {
        resultsPage.waitForPageToLoad();
    }
    return resultsPage;
}
Also used : AppUrl(teammates.common.util.AppUrl) InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage)

Example 5 with InstructorFeedbackResultsPage

use of teammates.test.pageobjects.InstructorFeedbackResultsPage in project teammates by TEAMMATES.

the class InstructorFeedbackSessionsPageUiTest method testViewResultsLink.

private void testViewResultsLink() {
    InstructorFeedbackResultsPage feedbackResultsPage;
    FeedbackSessionAttributes fsa;
    ______TS("view results clickable not creator, open session");
    fsa = testData.feedbackSessions.get("openSession");
    feedbackResultsPage = feedbackPage.loadViewResultsLink(fsa.getCourseId(), fsa.getFeedbackSessionName());
    assertTrue(feedbackResultsPage.isCorrectPage(fsa.getCourseId(), fsa.getFeedbackSessionName()));
    feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions);
    ______TS("view results clickable creator, closed session");
    fsa = testData.feedbackSessions.get("manualSession");
    feedbackResultsPage = feedbackPage.loadViewResultsLink(fsa.getCourseId(), fsa.getFeedbackSessionName());
    assertTrue(feedbackResultsPage.isCorrectPage(fsa.getCourseId(), fsa.getFeedbackSessionName()));
    feedbackPage = getFeedbackPageForInstructor(idOfInstructorWithSessions);
}
Also used : FeedbackSessionAttributes(teammates.common.datatransfer.attributes.FeedbackSessionAttributes) InstructorFeedbackResultsPage(teammates.test.pageobjects.InstructorFeedbackResultsPage)

Aggregations

InstructorFeedbackResultsPage (teammates.test.pageobjects.InstructorFeedbackResultsPage)7 Test (org.testng.annotations.Test)2 AppUrl (teammates.common.util.AppUrl)2 Stopwatch (teammates.client.scripts.util.Stopwatch)1 FeedbackSessionAttributes (teammates.common.datatransfer.attributes.FeedbackSessionAttributes)1 FeedbackSubmitPage (teammates.test.pageobjects.FeedbackSubmitPage)1 InstructorHomePage (teammates.test.pageobjects.InstructorHomePage)1