public void testWithBadUsername()
{
goToLoginPage();
- getSelenium().type( "loginForm_username", "badUsername" );
- getSelenium().click( "loginForm__login" );
+ setFieldValue( "loginForm_username", "badUsername" );
+ clickButtonWithValue( "Login" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
assertTextPresent( "You have entered an incorrect username and/or password" );
}
public void testWithBadPassword()
{
goToLoginPage();
- getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
- getSelenium().type( "loginForm_password", "badPassword" );
+ setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+ setFieldValue( "loginForm_password", "badPassword" );
getSelenium().click( "loginForm__login" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
assertTextPresent( "You have entered an incorrect username and/or password" );
public void testWithEmptyUsername()
{
goToLoginPage();
- getSelenium().type( "loginForm_password", "password" );
- getSelenium().click( "loginForm__login" );
+ setFieldValue( "loginForm_password", "password" );
+ clickButtonWithValue( "Login" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
assertTextPresent( "User Name is required" );
}
public void testWithEmptyPassword()
{
goToLoginPage();
- getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
- getSelenium().click( "loginForm__login" );
+ setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+ clickButtonWithValue( "Login" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
assertTextPresent( "You have entered an incorrect username and/or password" );
}
public void testWithCorrectUsernamePassword()
{
goToLoginPage();
- getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
- getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
- getSelenium().click( "loginForm__login" );
+ setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+ setFieldValue( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+ clickButtonWithValue( "Login" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
assertTextPresent( "Edit Details" );
assertTextPresent( "Logout" );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );
logout();
login( username, getUserRolePassword() );
changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
- // this section will be removed if issue from redback after changing password will be fixed.
- getSelenium().goBack();
- logout();
- // assertTextPresent("You are already logged in.");
-
- login( username, getUserRoleNewPassword() );
+ assertTextPresent( "Password successfully changed" );
assertLeftNavMenuWithRole( fullname );
logout();
login( getAdminUsername(), getAdminPassword() );