From: Marecor M. Baclay Date: Thu, 18 Mar 2010 09:25:09 +0000 (+0000) Subject: [MRM-1323] archiva webapp tests failed to run in internet explorer X-Git-Tag: archiva-1.4-M1~967 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ac57eadd4890782a73d77f89d058cddeb3a109b6;p=archiva.git [MRM-1323] archiva webapp tests failed to run in internet explorer Submitted by: Gwen Harold Autencio git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@924673 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java index 0e1ae2511..58d2554c3 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java @@ -96,15 +96,15 @@ public class ArtifactManagementTest @Test( groups = "requiresUpload" ) public void testDotNetTypes() { - addArtifact( getGroupId(), "testDotNetTypes", getVersion(), "library", getArtifactFilePath(), + addArtifact( "dotNetTypes", "dotNetTypes", getVersion(), "library", getArtifactFilePath(), getRepositoryId() ); - assertTextPresent( "Artifact 'test:testDotNetTypes:1.0' was successfully deployed to repository 'internal'" ); - getSelenium().open( baseUrl + "/browse/" + getGroupId() + "/testDotNetTypes/" + getVersion() ); + assertTextPresent( "Artifact 'dotNetTypes:dotNetTypes:1.0' was successfully deployed to repository 'internal'" ); + getSelenium().open( baseUrl + "/browse/" + "dotNetTypes" + "/dotNetTypes/" + getVersion() ); waitPage(); assertTextPresent( "library" ); String basePath = - "/archiva/repository/internal/" + getGroupId() + "/testDotNetTypes/" + getVersion() + "/testDotNetTypes-" + + "/archiva/repository/internal/" + "dotNetTypes" + "/dotNetTypes/" + getVersion() + "/dotNetTypes-" + getVersion(); assertLinkPresent( ".NET Library" ); assertElementPresent( "//a[@href='" + basePath + ".dll']" ); 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 ee49694d3..df1088c24 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 @@ -29,7 +29,7 @@ public class RepositoryTest public void testAddManagedRepoValidValues() { goToRepositoriesPage(); - clickLinkWithLocator( "//div[@id='contentArea']/div/div/a[@href='/archiva/admin/addRepository.action']" ); + clickLinkWithText( "Add" ); addManagedRepository( "managedrepo1", "Managed Repository Sample 1" , getRepositoryDir() + "repository/" , "", "Maven 2.x Repository", "0 0 * * * ?", "", "" ); clickButtonWithValue( "Save" ); assertTextPresent( "Managed Repository Sample 1" ); @@ -40,7 +40,7 @@ public class RepositoryTest public void testAddManagedRepoInvalidValues() { goToRepositoriesPage(); - clickLinkWithLocator( "//div[@id='contentArea']/div/div/a[@href='/archiva/admin/addRepository.action']" ); + clickLinkWithText( "Add" ); addManagedRepository( "", "" , "" , "", "Maven 2.x Repository", "", "", "" ); assertTextPresent( "You must enter a repository identifier." ); assertTextPresent( "You must enter a repository name." ); @@ -105,7 +105,7 @@ public class RepositoryTest @Test(dependsOnMethods = { "testAddRemoteRepoValidValues" } ) public void testAddRemoteRepoNullValues() { - clickLinkWithLocator( "//div[@id='contentArea']/div/div/a[@href='/archiva/admin/addRemoteRepository.action']" ); + getSelenium().open( "/archiva/admin/addRemoteRepository.action" ); addRemoteRepository( "" , "" , "" , "" , "" , "" , "Maven 2.x Repository" ); assertTextPresent( "You must enter a repository identifier." ); assertTextPresent( "You must enter a repository name." ); @@ -136,7 +136,7 @@ public class RepositoryTest @Test(dependsOnMethods = { "testDeleteManageRepo" } ) public void testAddRemoteRepoValidValues() { - clickLinkWithLocator( "//div[@id='contentArea']/div/div/a[@href='/archiva/admin/addRemoteRepository.action']" ); + getSelenium().open( "/archiva/admin/addRemoteRepository.action" ); addRemoteRepository( "remoterepo" , "Remote Repository Sample" , "http://repository.codehaus.org/org/codehaus/mojo/" , "" , "" , "" , "Maven 2.x Repository" ); assertTextPresent( "Remote Repository Sample" ); } diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java index b22264af8..f723cd962 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java @@ -513,7 +513,7 @@ public abstract class AbstractArchivaTest } setFieldValue( "artifact", path ); - setFieldValue( "repositoryId", repositoryId ); + selectValue( "repositoryId", repositoryId ); clickButtonWithValue( "Submit" ); } diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java index 6c8e66209..d78387cf1 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java @@ -67,7 +67,8 @@ public abstract class AbstractRepositoryTest assertPage( "Apache Archiva \\ Admin: Delete Repository Group" ); assertTextPresent( "WARNING: This operation can not be undone." ); assertTextPresent( "Are you sure you want to delete the following repository group?" ); - assertTextPresent( "ID: " + repositoryName ); + assertTextPresent( "ID:" ); + assertTextPresent( repositoryName ); assertButtonWithValuePresent( "Confirm" ); assertButtonWithValuePresent( "Cancel" ); }