use of org.olat.selenium.page.user.ImportUserPage in project OpenOLAT by OpenOLAT.
the class UserTest method importExistingUsers.
/**
* Import 1 new user and 1 existing, change the password and the last name
* of the existing user.
*
* @param loginPage
* @param existingUserBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void importExistingUsers(@InitialPage LoginPage loginPage, @Drone @User WebDriver existingUserBrowser, @Drone @Student WebDriver newUserBrowser) throws IOException, URISyntaxException {
UserVO user1 = new UserRestClient(deploymentUrl).createRandomUser("tsukune");
// login
loginPage.assertOnLoginPage().loginAs("administrator", "openolat").resume();
UserAdminPage userAdminPage = navBar.openUserManagement().openImportUsers();
// start import wizard
ImportUserPage importWizard = userAdminPage.startImport();
String uuid = UUID.randomUUID().toString();
String username1 = "moka-" + uuid;
StringBuilder csv = new StringBuilder();
UserVO newUser = importWizard.append(username1, "rosario02", "Moka", "Akashiya", csv);
user1 = importWizard.append(user1, "Aono", "openolat2", csv);
importWizard.fill(csv.toString()).nextData().assertGreen(1).assertWarn(1).updatePasswords().updateUsers().nextOverview().nextGroups().finish();
OOGraphene.waitAndCloseBlueMessageWindow(browser);
// existing user log in with its new password and check if its name was updated
LoginPage userLoginPage = LoginPage.getLoginPage(existingUserBrowser, deploymentUrl);
// tools
userLoginPage.loginAs(user1.getLogin(), "openolat2").resume().assertLoggedInByLastName("Aono");
// new user log in
LoginPage newLoginPage = LoginPage.getLoginPage(newUserBrowser, deploymentUrl);
// tools
newLoginPage.loginAs(newUser.getLogin(), "rosario02").resume().assertLoggedInByLastName("Akashiya");
}
use of org.olat.selenium.page.user.ImportUserPage in project openolat by klemens.
the class UserTest method importUsers.
/**
* Import 2 new users and check if the first can log in.
*
* @param loginPage
* @param userBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void importUsers(@InitialPage LoginPage loginPage, @Drone @User WebDriver userBrowser) throws IOException, URISyntaxException {
// login
loginPage.assertOnLoginPage().loginAs("administrator", "openolat").resume();
UserAdminPage userAdminPage = navBar.openUserManagement().openImportUsers();
// start import wizard
ImportUserPage importWizard = userAdminPage.startImport();
String uuid = UUID.randomUUID().toString();
String username1 = "moka-" + uuid;
String username2 = "mizore-" + uuid;
StringBuilder csv = new StringBuilder();
UserVO user1 = importWizard.append(username1, "rosario01", "Moka", "Akashiya", csv);
importWizard.append(username2, "vampire01", "Mizore", "Shirayuki", csv);
importWizard.fill(csv.toString()).nextData().assertGreen(2).nextOverview().nextGroups().finish();
OOGraphene.waitAndCloseBlueMessageWindow(browser);
// user log in
LoginPage userLoginPage = LoginPage.getLoginPage(userBrowser, deploymentUrl);
// tools
userLoginPage.loginAs(username1, "rosario01").resume().assertLoggedIn(user1);
}
use of org.olat.selenium.page.user.ImportUserPage in project OpenOLAT by OpenOLAT.
the class UserTest method importUsers.
/**
* Import 2 new users and check if the first can log in.
*
* @param loginPage
* @param userBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void importUsers(@InitialPage LoginPage loginPage, @Drone @User WebDriver userBrowser) throws IOException, URISyntaxException {
// login
loginPage.assertOnLoginPage().loginAs("administrator", "openolat").resume();
UserAdminPage userAdminPage = navBar.openUserManagement().openImportUsers();
// start import wizard
ImportUserPage importWizard = userAdminPage.startImport();
String uuid = UUID.randomUUID().toString();
String username1 = "moka-" + uuid;
String username2 = "mizore-" + uuid;
StringBuilder csv = new StringBuilder();
UserVO user1 = importWizard.append(username1, "rosario01", "Moka", "Akashiya", csv);
importWizard.append(username2, "vampire01", "Mizore", "Shirayuki", csv);
importWizard.fill(csv.toString()).nextData().assertGreen(2).nextOverview().nextGroups().finish();
OOGraphene.waitAndCloseBlueMessageWindow(browser);
// user log in
LoginPage userLoginPage = LoginPage.getLoginPage(userBrowser, deploymentUrl);
// tools
userLoginPage.loginAs(username1, "rosario01").resume().assertLoggedIn(user1);
}
use of org.olat.selenium.page.user.ImportUserPage in project openolat by klemens.
the class UserTest method importExistingUsers.
/**
* Import 1 new user and 1 existing, change the password and the last name
* of the existing user.
*
* @param loginPage
* @param existingUserBrowser
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void importExistingUsers(@InitialPage LoginPage loginPage, @Drone @User WebDriver existingUserBrowser, @Drone @Student WebDriver newUserBrowser) throws IOException, URISyntaxException {
UserVO user1 = new UserRestClient(deploymentUrl).createRandomUser("tsukune");
// login
loginPage.assertOnLoginPage().loginAs("administrator", "openolat").resume();
UserAdminPage userAdminPage = navBar.openUserManagement().openImportUsers();
// start import wizard
ImportUserPage importWizard = userAdminPage.startImport();
String uuid = UUID.randomUUID().toString();
String username1 = "moka-" + uuid;
StringBuilder csv = new StringBuilder();
UserVO newUser = importWizard.append(username1, "rosario02", "Moka", "Akashiya", csv);
user1 = importWizard.append(user1, "Aono", "openolat2", csv);
importWizard.fill(csv.toString()).nextData().assertGreen(1).assertWarn(1).updatePasswords().updateUsers().nextOverview().nextGroups().finish();
OOGraphene.waitAndCloseBlueMessageWindow(browser);
// existing user log in with its new password and check if its name was updated
LoginPage userLoginPage = LoginPage.getLoginPage(existingUserBrowser, deploymentUrl);
// tools
userLoginPage.loginAs(user1.getLogin(), "openolat2").resume().assertLoggedInByLastName("Aono");
// new user log in
LoginPage newLoginPage = LoginPage.getLoginPage(newUserBrowser, deploymentUrl);
// tools
newLoginPage.loginAs(newUser.getLogin(), "rosario02").resume().assertLoggedInByLastName("Akashiya");
}
Aggregations