import org.apache.archiva.web.test.parent.AbstractArchivaTest;
import org.testng.annotations.Test;
-@Test( groups = { "userroles" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = {"userroles"}, dependsOnMethods = {"testWithCorrectUsernamePassword"} )
public class UserRolesTest
extends AbstractArchivaTest
{
+ private static final String EDIT_ROLES = "Edit Roles";
+
public void testBasicAddDeleteUser()
{
username = getProperty( "GUEST_USERNAME" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+ @Test( dependsOnMethods = {"testBasicAddDeleteUser"} )
public void testUserWithGuestRole()
{
username = getProperty( "GUEST_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithGuestRole" } )
+ @Test( dependsOnMethods = {"testUserWithGuestRole"} )
public void testUserWithRegisteredUserRole()
{
username = getProperty( "REGISTERED_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithRegisteredUserRole" } )
+ @Test( dependsOnMethods = {"testUserWithRegisteredUserRole"} )
public void testUserWithSysAdminUserRole()
{
username = getProperty( "SYSAD_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithSysAdminUserRole" } )
+ @Test( dependsOnMethods = {"testUserWithSysAdminUserRole"} )
public void testUserWithUserAdminUserRole()
{
username = getProperty( "USERADMIN_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithUserAdminUserRole" } )
+ @Test( dependsOnMethods = {"testUserWithUserAdminUserRole"} )
public void testUserWithGlobalRepoManagerRole()
{
username = getProperty( "GLOBALREPOMANAGER_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithGlobalRepoManagerRole" } )
+ @Test( dependsOnMethods = {"testUserWithGlobalRepoManagerRole"} )
public void testUserWithGlobalRepoObserverRole()
{
username = getProperty( "GLOBALREPOOBSERVER_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkUserRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
login( getAdminUsername(), getAdminPassword() );
}
- @Test( dependsOnMethods = { "testUserWithGlobalRepoObserverRole" } )
+ @Test( dependsOnMethods = {"testUserWithGlobalRepoObserverRole"} )
public void testUserWithRepoManagerInternalRole()
{
username = getProperty( "REPOMANAGER_INTERNAL_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkResourceRoleWithValue( fullname );
clickButtonWithValue( "Submit" );
* getAdminUsername() , getAdminPassword() ); }
*/
- @Test( dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
+ @Test( dependsOnMethods = {"testUserWithRepoManagerInternalRole"} )
public void testUserWithRepoObserverInternalRole()
{
username = getProperty( "REPOOBSERVER_INTERNAL_USERNAME" );
createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
clickLinkWithText( username );
- clickLinkWithText( "Edit Roles" );
+ clickLinkWithText( EDIT_ROLES );
checkResourceRoleWithValue( fullname );
clickButtonWithValue( "Submit" );