# Search
SEARCH_BAD_ARTIFACT=asdf
# Existing Artifact
-ARTIFACT_GROUPID=test
-ARTIFACT_ARTIFACTID=test
+ARTIFACT_GROUPID=org.apache.maven.archiva.web.test
+ARTIFACT_ARTIFACTID=artifact-a
ARTIFACT_VERSION=1.0
ARTIFACT_PACKAGING=jar
# Reports
REPOSITORY_NAME=internal
START_DATE=04/01/2009
-END_DATE=04/30/2009
\ No newline at end of file
+END_DATE=04/30/2009
+
+# User Management
+GUEST_USERNAME=guest_user
+GUEST_FULLNAME=Guest User
+GUEST_EMAIL=guest_user@localhost.localdomain
+GUEST_PASSWORD=guest12
+GUEST_PASSWORD1=guest123
\ No newline at end of file
*/
import org.apache.archiva.web.test.parent.AbstractArchivaTest;
-import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
public class ArchivaAdminTest
extends AbstractArchivaTest
{
- @BeforeSuite
+ @BeforeSuite
public void initializeContinuum()
throws Exception
{
super.open();
- System.out.println( "open" );
getSelenium().open( baseUrl );
- System.out.println( "URL" );
String title = getSelenium().getTitle();
- if ( title.equals( "Create Admin User" ) )
+ if ( title.equals( "Apache Archiva \\ Create Admin User" ) )
{
assertCreateAdmin();
String fullname = p.getProperty( "ADMIN_FULLNAME" );
String mail = p.getProperty( "ADMIN_EMAIL" );
String password = p.getProperty( "ADMIN_PASSWORD" );
submitAdminData( fullname, mail, password );
- assertLoginPage();
- submitUserData( username, password, false, true );
assertAuthenticatedPage( username );
submit();
clickLinkWithText( "Logout" );
{
super.open();
}
+
+
public void displayLandingPage()
{
- getSelenium().open( baseUrl + "index.action" );
+ getSelenium().open( baseUrl );
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
- Assert.assertEquals( "Apache Archiva \\ Quick Search", getSelenium().getTitle() );
+ assertPage( "Apache Archiva \\ Quick Search" );
}
@Override
assertTextPresent( "Artifacts" );
}
-}
+}
\ No newline at end of file
{
super.close();
}
-}
+}
\ No newline at end of file
//TODO As of the creation of the tests, GroupId is not a required field in showing the reports of repository health. GroupId should be required I think.
}
-}
+}
\ No newline at end of file
public void assertCreateAdmin()
{
- assertPage( "Create Admin User" );
+ assertPage( "Apache Archiva \\ Create Admin User" );
assertTextPresent( "Username" );
assertFieldValue( "admin", "user.username" );
assertTextPresent( "Full Name*" );
public void submitAdminData( String fullname, String email, String password )
{
setFieldValue( "user.fullName", fullname );
- setFieldValue( "user.emaim", email );
+ setFieldValue( "user.email", email );
setFieldValue( "user.password", password );
setFieldValue( "user.confirmPassword", password );
submit();
clickButtonWithValue( "View Statistics" );
}
-}
+}
\ No newline at end of file
assertTextPresent( "Groups" );
}
-}
+}
\ No newline at end of file
getSelenium().type( "dom=document.forms[1].elements[0]", artifactId );
clickButtonWithValue( "Search" );
}
-}
+}
\ No newline at end of file
<dependency>
<groupId>org.openqa.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
- <version>0.8.1</version>
+ <version>1.0-SNAPSHOT</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Dependency for MavenConnectionTest -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-rc-1</version>
<executions>
<execution>
<id>start-selenium</id>
<fileset dir="src/test/${container.name}" />
</copy>
<copy
- todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.26/apache-tomcat-5.5.26/common/lib">
+ todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.27/apache-tomcat-5.5.27/common/lib">
<fileset dir="${project.build.directory}/providedDependencies">
<include name="**/*.jar" />
</fileset>
</activation>
<properties>
<container.name>tomcat5x</container.name>
- <container.url>http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip</container.url>
+ <container.url>http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip</container.url>
</properties>
</profile>
<profile>