use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AdminSessionsPageUiTest method testContent.
private void testContent() {
______TS("content: typical page");
AppUrl sessionsUrl = createUrl(Const.ActionURIs.ADMIN_SESSIONS_PAGE);
sessionsPage = loginAdminToPage(sessionsUrl, AdminSessionsPage.class);
By timeFramePanel = By.id("timeFramePanel");
sessionsPage.waitForElementToDisappear(timeFramePanel);
assertTrue(isSessionDataDisplayCorrect());
______TS("content: show filter");
sessionsPage.clickDetailButton();
sessionsPage.waitForElementVisibility(browser.driver.findElement(timeFramePanel));
assertTrue(isSessionDataDisplayCorrect());
______TS("content: hide filter");
sessionsPage.clickDetailButton();
sessionsPage.waitForElementToDisappear(timeFramePanel);
assertTrue(isSessionDataDisplayCorrect());
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AllAccessControlUiTests method verifyCannotAccessAdminPages.
private void verifyCannotAccessAdminPages() {
// cannot access directly
AppUrl url = createUrl(Const.ActionURIs.ADMIN_HOME_PAGE);
verifyRedirectToForbidden(url);
// cannot access by masquerading either
url = url.withUserId(TestProperties.TEST_ADMIN_ACCOUNT);
verifyRedirectToForbidden(url);
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AllAccessControlUiTests method testUserNotRegistered.
@Test
public void testUserNotRegistered() {
______TS("student pages");
loginStudent(TestProperties.TEST_UNREG_ACCOUNT, TestProperties.TEST_UNREG_PASSWORD);
verifyRedirectToWelcomeStrangerPage(createUrl(Const.ActionURIs.STUDENT_HOME_PAGE), TestProperties.TEST_UNREG_ACCOUNT);
______TS("instructor pages");
loginInstructorUnsuccessfully(TestProperties.TEST_UNREG_ACCOUNT, TestProperties.TEST_UNREG_PASSWORD);
AppUrl url = createUrl(Const.ActionURIs.INSTRUCTOR_HOME_PAGE);
verifyRedirectToNotAuthorized(url);
verifyCannotMasquerade(url, otherInstructor.googleId);
______TS("admin pages");
// cannot access admin while logged in as student
verifyCannotAccessAdminPages();
______TS("incorrect URL");
AppUrl nonExistentActionUrl = createUrl("/page/nonExistentAction");
AppPage.getNewPageInstance(browser, nonExistentActionUrl, NotFoundPage.class);
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AllAccessControlUiTests method verifyCannotMasquerade.
private void verifyCannotMasquerade(AppUrl url, String otherInstructorId) {
AppUrl masqueradeUrl = url.withUserId(otherInstructorId);
verifyRedirectToNotAuthorized(masqueradeUrl);
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AutomatedSessionRemindersTest method testFeedbackSessionClosingReminders.
@Test
public void testFeedbackSessionClosingReminders() {
AppUrl closingRemindersUrl = createUrl(Const.ActionURIs.AUTOMATED_FEEDBACK_CLOSING_REMINDERS);
loginAdminToPage(closingRemindersUrl, GenericAppPage.class);
}
Aggregations