aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp-test-js
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-12-29 13:54:33 +0000
committerOlivier Lamy <olamy@apache.org>2011-12-29 13:54:33 +0000
commitcfa7d6107211a683e791baa8748d4a5aadace66a (patch)
tree3d46ff535aa4886857a7d7de9203f229f155ab4b /archiva-modules/archiva-web/archiva-webapp-test-js
parentad628c23da7304223a2240683b0ad07e0a302ed1 (diff)
downloadarchiva-cfa7d6107211a683e791baa8748d4a5aadace66a.tar.gz
archiva-cfa7d6107211a683e791baa8748d4a5aadace66a.zip
fix selenium test add/delete user with webapp-js
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1225534 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test-js')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java16
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java10
3 files changed, 19 insertions, 9 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
index c7ea281a2..1913b032f 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
+++ b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
@@ -59,7 +59,7 @@ NEW_USERROLE_PASSWORD=password123
# Guest Role
GUEST_USERNAME=guest_user
-GUEST_FULLNAME=Guest
+GUEST_FULLNAME=The Test Guest
# Registered User Role
REGISTERED_USERNAME=reg_user
REGISTERED_FULLNAME=Registered User
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index b4adefc83..a785d221d 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -234,11 +234,7 @@ public abstract class AbstractArchivaTest
clickLinkWithLocator( "user-create-form-register-button", true );
- assertTextPresent( "user created:guest_user" );
-
- //assertUserRolesPage();
-
- //clickButtonWithName( "submitRolesButton", true );
+ assertTextPresent( "user created:"+userName );
if ( valid )
{
@@ -265,8 +261,12 @@ public abstract class AbstractArchivaTest
clickLinkWithLocator( "users-grid-delete-" + userName );
+ clickLinkWithLocator( "dialog-confirm-modal-ok" );
+
assertTextPresent( "user " + userName + " deleted" );
+ clickLinkWithLocator( "alert-message-success-close-a" );
+
assertTextNotPresent( userName );
assertTextNotPresent( fullName );
@@ -724,8 +724,8 @@ public abstract class AbstractArchivaTest
{
clickLinkWithText( "Logout" );
assertTextNotPresent( "Current User:" );
- assertLinkNotPresent( "Edit Details" );
- assertLinkNotPresent( "Logout" );
- assertLinkPresent( "Login" );
+ assertLinkNotVisible( "Edit Details" );
+ assertLinkNotVisible( "Logout" );
+ assertLinkVisible( "Login" );
}
} \ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 1619d33bf..03d88395d 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -212,6 +212,16 @@ public abstract class AbstractSeleniumTest
Assert.assertFalse( isElementPresent( "link=" + text ), "The link('" + text + "' is present." );
}
+ public void assertLinkNotVisible( String text )
+ {
+ Assert.assertFalse( isElementVisible( "link=" + text ), "The link('" + text + "' is visible." );
+ }
+
+ public void assertLinkVisible( String text )
+ {
+ Assert.assertTrue( isElementVisible( "link=" + text ), "The link('" + text + "' is not visible." );
+ }
+
public void assertImgWithAlt( String alt )
{
assertElementPresent( "/¯img[@alt='" + alt + "']" );