archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r899054 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test: VirtualRepositoryTest.java parent/AbstractRepositoryTest.java
Date Thu, 14 Jan 2010 04:17:04 GMT
Author: brett
Date: Thu Jan 14 04:17:04 2010
New Revision: 899054

URL: http://svn.apache.org/viewvc?rev=899054&view=rev
Log:
fix virtual repository test

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java?rev=899054&r1=899053&r2=899054&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java
Thu Jan 14 04:17:04 2010
@@ -21,6 +21,7 @@
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
 import org.testng.annotations.Test;
+import org.testng.Assert;
 
 @Test( groups = { "virtualrepository" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
 public class VirtualRepositoryTest 
@@ -37,14 +38,14 @@
 	{
 		addRepositoryGroup( "testing" );
 		//assertAddedRepositoryLink( "testing" );
-		assertTextPresent( "testing" );
+		Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[1]/p[1]"
), "testing" );
 	}
 	
 	@Test(dependsOnMethods = { "testAddRepositoryGroupValidValue" } )
 	public void testAddRepositoryToRepositoryGroup()
 	{
 		addRepositoryToRepositoryGroup( "testing", "internal" );
-		assertTextPresent( "internal" );		
+		Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]"
), "internal" );
 		//clickLinkWithXPath( "/html/body/div[4]/div/div/div[2]/div/div/p[2]/a" );
 		//getSelenium().goBack();
 	}
@@ -55,7 +56,7 @@
 		deleteRepositoryInRepositoryGroups();
 		assertTextPresent( "Repository Groups" );
 		assertTextNotPresent( "No Repository Groups Defined." );
-		waitPage();
+		Assert.assertFalse( getSelenium().isElementPresent( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]"
) );
 	}
 	
 	@Test(dependsOnMethods = { "testDeleteRepositoryOfRepositoryGroup" } )

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java?rev=899054&r1=899053&r2=899054&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java
Thu Jan 14 04:17:04 2010
@@ -80,12 +80,13 @@
 	
 	public void deleteRepositoryInRepositoryGroups()
 	{
+		goToRepositoryGroupsPage();
 		getSelenium().click( "xpath=//div[@id='contentArea']/div[2]/div/div[3]/div[1]/a/img" );
+		waitPage();
 	}
 	
 	public void deleteRepositoryGroup( String repositoryName )
 	{
-		//goToRepositoryGroupsPage();
 		getSelenium().click( "xpath=//div[@id='contentArea']/div[2]/div/div[1]/div/a/img" );
 		waitPage();
 		assertDeleteRepositoryGroupPage( repositoryName );



Mime
View raw message