Commit 8a8f3cfb authored by Andrew Robert Nicols's avatar Andrew Robert Nicols
Browse files

selenium: Shared tests to create two institutions and associated users and admins


Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 5759f701
Login_Admin
institution_one_create
admin_institution_one_create
user_institution_one_create
Logout_User
admin_institution_one_login
admin_institution_one_setpassword
admin_institution_one_resetpassword
generic_logout
user_institution_one_login
user_institution_one_setpassword
user_institution_one_resetpassword
generic_logout
Login_Admin
user_institution_one_delete
admin_institution_one_delete
institution_one_delete
Logout_User
Login_Admin
institution_two_create
admin_institution_two_create
user_institution_two_create
Logout_User
admin_institution_two_login
admin_institution_two_setpassword
admin_institution_two_resetpassword
generic_logout
user_institution_two_login
user_institution_two_setpassword
user_institution_two_resetpassword
generic_logout
Login_Admin
user_institution_two_delete
admin_institution_two_delete
institution_two_delete
Logout_User
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_one_create</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_one_create</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Site Administration</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Users</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Add User</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>firstname</td>
<td>admin</td>
</tr>
<tr>
<td>type</td>
<td>lastname</td>
<td>one</td>
</tr>
<tr>
<td>type</td>
<td>email</td>
<td>admin.one@void.void</td>
</tr>
<tr>
<td>type</td>
<td>username</td>
<td>admin.one</td>
</tr>
<tr>
<td>type</td>
<td>password</td>
<td>password1</td>
</tr>
<tr>
<td>select</td>
<td>//select[@id='adduser_authinstance']</td>
<td>label=Institution One: internal</td>
</tr>
<tr>
<td>check</td>
<td>institutionadmin</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>adduser_submit</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>New user account created successfully</td>
<td></td>
</tr>
<tr>
<td>verifyChecked</td>
<td>institutionone_admin</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Return to Site</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_one_delete</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_one_delete</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Site Administration</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Users</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=admin.one</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Account settings: admin one</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>edituser_delete_submit</td>
<td></td>
</tr>
<tr>
<td>assertConfirmation</td>
<td>Are you sure you want to delete this user?</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>//div[@id='messages']</td>
<td>User deleted successfully</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Return to Site</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>admin_institution_one_login</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_one_login</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>login_login_username</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>login_submit</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>login_login_username</td>
<td>admin.one</td>
</tr>
<tr>
<td>type</td>
<td>login_login_password</td>
<td>password1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>login_submit</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_one_resetpassword</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_one_resetpassword</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=admin.one</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=accountprefs_oldpassword</td>
<td>mahara1</td>
</tr>
<tr>
<td>type</td>
<td>accountprefs_password1</td>
<td>password1</td>
</tr>
<tr>
<td>type</td>
<td>accountprefs_password2</td>
<td>password1</td>
</tr>
<tr>
<td>click</td>
<td>accountprefs_submit</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Home</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Logout</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>login_login_username</td>
<td>admin.one</td>
</tr>
<tr>
<td>type</td>
<td>login_login_password</td>
<td>password1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>login_submit</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>setpassword</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">setpassword</td></tr>
</thead><tbody>
<tr>
<td>type</td>
<td>password1</td>
<td>mahara1</td>
</tr>
<tr>
<td>type</td>
<td>password2</td>
<td>mahara1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=requiredfields_submit</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Your new password has been saved</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Home</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_two_create</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_two_create</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Site Administration</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Users</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Add User</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>firstname</td>
<td>admin</td>
</tr>
<tr>
<td>type</td>
<td>lastname</td>
<td>two</td>
</tr>
<tr>
<td>type</td>
<td>email</td>
<td>admin.two@void.void</td>
</tr>
<tr>
<td>type</td>
<td>username</td>
<td>admin.two</td>
</tr>
<tr>
<td>type</td>
<td>password</td>
<td>password1</td>
</tr>
<tr>
<td>select</td>
<td>//select[@id='adduser_authinstance']</td>
<td>label=Institution Two: internal</td>
</tr>
<tr>
<td>check</td>
<td>institutionadmin</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>adduser_submit</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>New user account created successfully</td>
<td></td>
</tr>
<tr>
<td>verifyChecked</td>
<td>institutiontwo_admin</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Return to Site</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_two_delete</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_two_delete</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Site Administration</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Users</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=admin.two</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Account settings: admin two</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>edituser_delete_submit</td>
<td></td>
</tr>
<tr>
<td>assertConfirmation</td>
<td>Are you sure you want to delete this user?</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>//div[@id='messages']</td>
<td>User deleted successfully</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Return to Site</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>admin_institution_two_login</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_two_login</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>login_login_username</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>login_submit</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>login_login_username</td>
<td>admin.two</td>
</tr>
<tr>
<td>type</td>
<td>login_login_password</td>
<td>password1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>login_submit</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>admin_institution_two_resetpassword</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">admin_institution_two_resetpassword</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=admin.two</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=accountprefs_oldpassword</td>
<td>mahara1</td>
</tr>
<tr>
<td>type</td>
<td>accountprefs_password1</td>
<td>password1</td>
</tr>
<tr>
<td>type</td>
<td>accountprefs_password2</td>
<td>password1</td>
</tr>
<tr>
<td>click</td>
<td>accountprefs_submit</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>