continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r794491 - in /continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test: LoginTest.java parent/AbstractBuildEnvironmentTest.java parent/AbstractContinuumTest.java
Date Thu, 16 Jul 2009 01:57:10 GMT
Author: carlos
Date: Thu Jul 16 01:57:10 2009
New Revision: 794491

URL: http://svn.apache.org/viewvc?rev=794491&view=rev
Log:
Move loginAsAdmin up and remove unnecessary dependencies

Modified:
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/LoginTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/LoginTest.java?rev=794491&r1=794490&r2=794491&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/LoginTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/LoginTest.java
Thu Jul 16 01:57:10 2009
@@ -47,7 +47,6 @@
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
     public void testWithBadPassword()
     {
         goToLoginPage();
@@ -58,7 +57,6 @@
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
     public void testWithEmptyUsername()
     {
         goToLoginPage();
@@ -68,7 +66,6 @@
         assertTextPresent( "User Name is required" );
     }
 
-    @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
     public void testWithEmptyPassword()
     {
         goToLoginPage();
@@ -78,16 +75,9 @@
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun
= true )
+    @Test( groups = { "loginSuccess" } )
     public void testWithCorrectUsernamePassword()
     {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-        assertTextPresent( "Edit Details" );
-        assertTextPresent( "Logout" );
-        assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
+        loginAsAdmin();
     }
 }

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java?rev=794491&r1=794490&r2=794491&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
Thu Jul 16 01:57:10 2009
@@ -24,7 +24,7 @@
  * @version $Id$
  */
 public abstract class AbstractBuildEnvironmentTest
-    extends AbstractSeleniumTest
+    extends AbstractContinuumTest
 {
     public void goToBuildEnvironmentPage()
     {

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=794491&r1=794490&r2=794491&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Thu Jul 16 01:57:10 2009
@@ -104,27 +104,17 @@
         assertTextPresent( "Forgot your Password? Request a password reset." );
     }
 
-    public void submitUserData(String username,String password,boolean rememberme,boolean
success )
+    public void loginAsAdmin()
     {
-
-        setFieldValue( "username", username );
-        setFieldValue( "password", password );
-        if ( rememberme )
-        {
-            checkField( "rememberMe" );
-        }
-        submit();
-        if ( success )
-        {
-            assertAutenticatedPage( username );
-        }
-        else
-        {
-            assertLoginPage();
-        }
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        assertAutenticatedPage( getProperty( "ADMIN_USERNAME" ) );
     }
 
-    public void assertAutenticatedPage(String username )
+    public void assertAutenticatedPage( String username )
     {
         assertTextPresent( "Current User" );
         assertTextPresent( "Edit Details" );



Mime
View raw message