Skip to content
Snippets Groups Projects
Commit ecd89b4d authored by srosse's avatar srosse
Browse files

OO-1738: fix the selenium test which imports existing users

parent b70bd5fd
No related branches found
No related tags found
No related merge requests found
......@@ -583,7 +583,8 @@ public class UserTest {
.next() // -> preview
.assertGreen(1)
.assertWarn(1)
.changePassword()
.updatePasswords()
.updateUsers()
.next() // -> groups
.next() // -> emails
.finish();
......
......@@ -27,6 +27,7 @@ import org.olat.user.restapi.UserVO;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;
/**
*
......@@ -56,9 +57,26 @@ public class ImportUserPage {
return this;
}
public ImportUserPage changePassword() {
By updatePassword = By.cssSelector("input[name='update.password'][type='checkbox']");
browser.findElement(updatePassword).click();
/**
* In the first mandatory option, select the update password one.
* @return
*/
public ImportUserPage updatePasswords() {
By updatePassword = By.id("o_fioupdate_password_SELBOX");
Select passwordDropdown = new Select(browser.findElement(updatePassword));
passwordDropdown.selectByValue("update");
OOGraphene.waitBusy(browser);
return this;
}
/**
* In the second mandatory option, select the update existing user one.
* @return
*/
public ImportUserPage updateUsers() {
By updatePassword = By.id("o_fioupdate_user_SELBOX");
Select passwordDropdown = new Select(browser.findElement(updatePassword));
passwordDropdown.selectByValue("update");
OOGraphene.waitBusy(browser);
return this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment