continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r825350 - 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 Thu, 15 Oct 2009 00:25:13 GMT
Author: ctan
Date: Thu Oct 15 00:25:12 2009
New Revision: 825350

URL: http://svn.apache.org/viewvc?rev=825350&view=rev
Log:
- added selenium test for CONTINUUM-2350
- fixed testDeleteMavenTwoProject

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=825350&r1=825349&r2=825350&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Thu Oct 15
00:25:12 2009
@@ -24,6 +24,7 @@
 M2_PROJ_GRP_NAME=ContinuumBuildQueueTestData
 M2_PROJ_GRP_ID=org.apache.continuum
 M2_PROJ_GRP_DESCRIPTION=Project for testing continuum build queue
+M2_PROJ_GRP_SCM_ROOT_URL=scm:svn:https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data
 M2_POM_USERNAME=
 M2_POM_PASSWORD=
 
@@ -39,6 +40,13 @@
 MISS_PARENT_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-parent-pom.xml
 MISS_SUBPRO_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
 
+# Properties for testAddMavenTwoProjectModuleNameWithSameLetter
+M2_SAME_LETTER_POM_URL=https://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml
+M2_SAME_LETTER_PROJ_GRP_NAME=Flat Example
+M2_SAME_LETTER_PROJ_GRP_ID=com.example.flat
+M2_SAME_LETTER_PROJ_GRP_DESCRIPTION=
+M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent
+
 ########################
 # mavenOneProject group 
 ########################

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=825350&r1=825349&r2=825350&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
Thu Oct 15 00:25:12 2009
@@ -43,10 +43,37 @@
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
         String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
+        
         // Enter values into Add Maven Two Project fields, and submit
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
         // Wait Struct Listener
         assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+    }
+
+    /**
+     * Test flat multi module project with names that start with the same letter
+     */
+    public void testAddMavenTwoProjectModuleNameWithSameLetter()
+        throws Exception
+    {
+        String M2_POM_URL = getProperty( "M2_SAME_LETTER_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+
+        String M2_PROJ_GRP_NAME = getProperty( "M2_SAME_LETTER_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_SAME_LETTER_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_SAME_LETTER_PROJ_GRP_DESCRIPTION"
);
+
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL"
);
+
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+
+        assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
     }
 
     @Test( dependsOnMethods = { "testAddProjectGroup" } )
@@ -56,13 +83,17 @@
         String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
         String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
         String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
 
         String M2_POM_URL = getProperty( "M2_POM_URL" );
         String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
         String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+        
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, TEST_PROJ_GRP_NAME,
true );
 
         assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( TEST_PROJ_GRP_SCM_ROOT_URL );
     }
 
     /**
@@ -178,6 +209,9 @@
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
+
+        // wait for project to finish checkout
+        waitForProjectCheckout();
         
         // remove group for next test
         removeProjectGroup( M2_PROJ_GRP_NAME );
@@ -192,10 +226,13 @@
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
         
+        //wait for project to finish checkout
+        waitForProjectCheckout();
+
         // remove project group
         removeProjectGroup( M2_PROJ_GRP_NAME );
     }
-    
+
     private void addMaven2Project( String groupName )
         throws Exception
     {

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=825350&r1=825349&r2=825350&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
Thu Oct 15 00:25:12 2009
@@ -230,6 +230,7 @@
         // assertElementPresent( "remove" );
 
         assertTextPresent( "Project Group Scm Root" );
+        assertTextPresent( "Scm Root URL" );
 
         if ( isTextPresent( "Member Projects" ) )
         {
@@ -816,4 +817,23 @@
         assertTextNotPresent( name );
         assertTextNotPresent( email );
     }
+
+    public void waitForProjectCheckout()
+        throws Exception
+    {
+        int currentIt = 1;
+        int maxIt = 10;
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
+        {
+            Thread.sleep( 10000 );
+            getSelenium().refresh();
+            waitPage();
+            if ( currentIt > maxIt )
+            {
+                Assert.fail( "Timeout, Can't check out projects" );
+            }
+            currentIt++;
+        }
+        Thread.sleep( 10000 );
+    }
 }



Mime
View raw message