continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r825759 - in /continuum/trunk/continuum-webapp-test/src/test: resources/testng.properties testng/org/apache/continuum/web/test/MavenTwoProjectTest.java testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Date Fri, 16 Oct 2009 04:21:45 GMT
Author: ctan
Date: Fri Oct 16 04:21:45 2009
New Revision: 825759

URL: http://svn.apache.org/viewvc?rev=825759&view=rev
Log:
-fixed selenium test when deleting a maven 2 project
-added check if scm root url is also deleted when deleting a project

Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=825759&r1=825758&r2=825759&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Fri Oct 16
04:21:45 2009
@@ -33,6 +33,7 @@
 M2_DELETE_PROJ_GRP_NAME=Continuum Simple Example Project
 M2_DELETE_PROJ_GRP_ID=org.apache.continuum.examples
 M2_DELETE_PROJ_GRP_DESCRIPTION=Delete test project
+M2_DELETE_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/simple-example
 
 # SCM element is missing from pom
 NOT_SCM_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-scm-element-pom.xml

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=825759&r1=825758&r2=825759&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
Fri Oct 16 04:21:45 2009
@@ -193,44 +193,54 @@
         clickButtonWithValue( "Cancel" );
         assertAboutPage();
     }
-    
+
     @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
     public void testDeleteMavenTwoProject()
         throws Exception
     {
         String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_DELETE_PROJ_GRP_SCM_ROOT_URL"
);
         goToProjectGroupsSummaryPage();
         
         // delete project - delete icon
         addMaven2Project( M2_PROJ_GRP_NAME );
         clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+        // wait for project to finish checkout
+        waitForProjectCheckout();
+
         clickLinkWithXPath( "//tbody/tr['0']/td['10']/a/img[@alt='Delete']" );
         assertTextPresent( "Delete Continuum Project" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 
-        // wait for project to finish checkout
-        waitForProjectCheckout();
-        
         // remove group for next test
         removeProjectGroup( M2_PROJ_GRP_NAME );
-        
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+
         // delete project - "Delete Project(s)" button
         addMaven2Project( M2_PROJ_GRP_NAME );
         clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        //wait for project to finish checkout
+        waitForProjectCheckout();
+
         checkField( "//tbody/tr['0']/td['0']/input[@name='selectedProjects']" );
         clickButtonWithValue( "Delete Project(s)" );
         assertTextPresent( "Delete Continuum Projects" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
-        
-        //wait for project to finish checkout
-        waitForProjectCheckout();
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 
         // remove project group
         removeProjectGroup( M2_PROJ_GRP_NAME );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
     }
 
     private void addMaven2Project( String groupName )

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=825759&r1=825758&r2=825759&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Fri Oct 16 04:21:45 2009
@@ -823,7 +823,7 @@
     {
         int currentIt = 1;
         int maxIt = 10;
-        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) || isElementPresent( "//img[@alt='Updating']")
)
         {
             Thread.sleep( 10000 );
             getSelenium().refresh();



Mime
View raw message