[MRM-1277] Create Selenium test for advanced search feature

o add advanced search selenium test using different search criteria


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@897862 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2010-01-11 13:57:15 +00:00
parent 160afaa199
commit 9b2e1cfa42
1 changed files with 23 additions and 3 deletions

View File

@ -66,12 +66,32 @@ public class SearchTest
assertTextPresent( "Advanced Search - At least one search criteria must be provided." );
}
/* public void testSearchExistingArtifactUsingAdvancedSearchArtifactId()
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchArtifactId()
{
searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, null, null, null );
searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, getProperty( "REPOSITORYID" ), null, null );
assertTextPresent( "Results" );
assertTextPresent( "Hits: 1 to 1 of 1" );
assertLinkPresent( "test" );
}*/
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchGroupId()
{
searchForArtifactAdvancedSearch( getProperty( "GROUPID" ), null, null, getProperty( "REPOSITORYID" ), null, null );
assertTextPresent( "Results" );
assertTextPresent( "Hits: 1 to 1 of 1" );
assertLinkPresent( "test" );
}
@Test (dependsOnMethods = { "testAddManagedRepoValidValues", "testAddArtifactValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchNoAccessToRepository()
{
searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, "managedrepo1", null, null );
assertTextPresent( "No results found" );
assertTextNotPresent( "Results" );
assertTextNotPresent( "Hits: 1 to 1 of 1" );
assertLinkNotPresent( "test" );
}
}