use of org.olat.selenium.page.user.UserPasswordPage in project OpenOLAT by OpenOLAT.
the class UserTest method userChangeItsPassword.
/**
* Change the password, log out and try to log in again
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void userChangeItsPassword(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO user = new UserRestClient(deploymentUrl).createRandomUser();
loginPage.loginAs(user.getLogin(), user.getPassword()).resume();
UserToolsPage userTools = new UserToolsPage(browser);
userTools.openUserToolsMenu().openPassword();
String newPassword = UUID.randomUUID().toString();
UserPasswordPage password = UserPasswordPage.getUserPasswordPage(browser);
password.setNewPassword(user.getPassword(), newPassword);
userTools.logout();
loginPage.loginAs(user.getLogin(), newPassword).resume().assertLoggedIn(user);
}
use of org.olat.selenium.page.user.UserPasswordPage in project openolat by klemens.
the class UserTest method userChangeItsPassword.
/**
* Change the password, log out and try to log in again
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void userChangeItsPassword(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
UserVO user = new UserRestClient(deploymentUrl).createRandomUser();
loginPage.loginAs(user.getLogin(), user.getPassword()).resume();
UserToolsPage userTools = new UserToolsPage(browser);
userTools.openUserToolsMenu().openPassword();
String newPassword = UUID.randomUUID().toString();
UserPasswordPage password = UserPasswordPage.getUserPasswordPage(browser);
password.setNewPassword(user.getPassword(), newPassword);
userTools.logout();
loginPage.loginAs(user.getLogin(), newPassword).resume().assertLoggedIn(user);
}
Aggregations