Search in sources :

Example 1 with UserPreferencesPageFragment

use of org.olat.selenium.page.user.UserPreferencesPageFragment in project OpenOLAT by OpenOLAT.

the class UserTest method userResetItsPreferences.

/**
 * Reset the preferences and check that a log out happens
 *
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test
@RunAsClient
public void userResetItsPreferences(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
    UserVO user = new UserRestClient(deploymentUrl).createRandomUser();
    loginPage.loginAs(user.getLogin(), user.getPassword()).resume();
    UserToolsPage userTools = new UserToolsPage(browser);
    UserPreferencesPageFragment prefs = userTools.openUserToolsMenu().openMySettings().openPreferences();
    // reset the preferences
    prefs.resetPreferences();
    // check the user is log out
    loginPage.assertOnLoginPage();
}
Also used : UserToolsPage(org.olat.selenium.page.user.UserToolsPage) UserVO(org.olat.user.restapi.UserVO) UserPreferencesPageFragment(org.olat.selenium.page.user.UserPreferencesPageFragment) UserRestClient(org.olat.test.rest.UserRestClient) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 2 with UserPreferencesPageFragment

use of org.olat.selenium.page.user.UserPreferencesPageFragment in project openolat by klemens.

the class UserTest method userResetItsPreferences.

/**
 * Reset the preferences and check that a log out happens
 *
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test
@RunAsClient
public void userResetItsPreferences(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
    UserVO user = new UserRestClient(deploymentUrl).createRandomUser();
    loginPage.loginAs(user.getLogin(), user.getPassword()).resume();
    UserToolsPage userTools = new UserToolsPage(browser);
    UserPreferencesPageFragment prefs = userTools.openUserToolsMenu().openMySettings().openPreferences();
    // reset the preferences
    prefs.resetPreferences();
    // check the user is log out
    loginPage.assertOnLoginPage();
}
Also used : UserToolsPage(org.olat.selenium.page.user.UserToolsPage) UserVO(org.olat.user.restapi.UserVO) UserPreferencesPageFragment(org.olat.selenium.page.user.UserPreferencesPageFragment) UserRestClient(org.olat.test.rest.UserRestClient) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Aggregations

RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)2 Test (org.junit.Test)2 UserPreferencesPageFragment (org.olat.selenium.page.user.UserPreferencesPageFragment)2 UserToolsPage (org.olat.selenium.page.user.UserToolsPage)2 UserRestClient (org.olat.test.rest.UserRestClient)2 UserVO (org.olat.user.restapi.UserVO)2