]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1257] - Selenium Test for accessing bundled repositories
authorJevica Arianne B. Zurbano <jzurbano@apache.org>
Fri, 25 Sep 2009 03:55:57 +0000 (03:55 +0000)
committerJevica Arianne B. Zurbano <jzurbano@apache.org>
Fri, 25 Sep 2009 03:55:57 +0000 (03:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@818710 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryTest.java

index a0ed9b0a6fae96bf55aa922175f011a90e7c3575..fbeb00cca7759d1f822aafb014ecba603b5eebf7 100644 (file)
@@ -144,4 +144,28 @@ public class RepositoryTest
                addRemoteRepository( "remoterepo" , "Remote Repository Sample" , "http://repository.codehaus.org/org/codehaus/mojo/" , "" , "" , "" , "Maven 2.x Repository" );
                assertTextPresent( "Remote Repository Sample" );
        }
+    \r
+    // *** BUNDLED REPOSITORY TEST ***
+    \r
+    @Test ( dependsOnMethods = { "testWithCorrectUsernamePassword" }, alwaysRun = true )\r
+    public void testBundledRepository()\r
+    {
+        String repo1 = baseUrl + "repository/internal/";
+        String repo2 = baseUrl + "repository/snapshots/";
+        
+        assertRepositoryAccess( repo1 );
+        assertRepositoryAccess( repo2 );
+        
+        getSelenium().open( "/archiva" );\r
+    }
+    
+    private void assertRepositoryAccess( String repo )
+    {
+        getSelenium().open( "/archiva" );
+        goToRepositoriesPage();
+        assertLinkPresent( repo );
+        clickLinkWithText( repo );
+        assertPage( "Collection: /" );
+        assertTextPresent( "Collection: /" );
+    }
 }