From b24d5ceb4b46f92a4988d601b9ff7b90303abd9f Mon Sep 17 00:00:00 2001 From: "Jevica Arianne B. Zurbano" Date: Fri, 25 Sep 2009 03:55:57 +0000 Subject: [PATCH] [MRM-1257] - Selenium Test for accessing bundled repositories git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@818710 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/test/RepositoryTest.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryTest.java index a0ed9b0a6..fbeb00cca 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryTest.java @@ -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" ); } + + // *** BUNDLED REPOSITORY TEST *** + + @Test ( dependsOnMethods = { "testWithCorrectUsernamePassword" }, alwaysRun = true ) + public void testBundledRepository() + { + String repo1 = baseUrl + "repository/internal/"; + String repo2 = baseUrl + "repository/snapshots/"; + + assertRepositoryAccess( repo1 ); + assertRepositoryAccess( repo2 ); + + getSelenium().open( "/archiva" ); + } + + private void assertRepositoryAccess( String repo ) + { + getSelenium().open( "/archiva" ); + goToRepositoriesPage(); + assertLinkPresent( repo ); + clickLinkWithText( repo ); + assertPage( "Collection: /" ); + assertTextPresent( "Collection: /" ); + } } -- 2.39.5