You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/12/29 00:15:24 UTC

svn commit: r1225381 [2/4] - in /archiva/trunk: ./ archiva-modules/archiva-web/ archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/ archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/ archiva-module...

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+74d58d97e78d5e51cc02c489c5edba0d
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+5c7571eb35248be0f65758783b036e8f7899c146
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+55f498a518e1151ce2e54daa674691de
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+730551bde461564d3f8a7e0178ef9bc54a86d2dd
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom Wed Dec 28 23:15:19 2011
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>artifact-s</artifactId>
+  <packaging>jar</packaging>
+  <version>0.1</version>
+  <name>artifact-s</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+     <dependency>
+      <groupId>org.apache.maven.archiva.web.test</groupId>
+      <artifactId>artifact-a</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.wagon</groupId>
+        <artifactId>wagon-webdav</artifactId>
+      </extension>
+    </extensions>
+  </build>
+</project>

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+746ba2848229dbc1c9683ece0e7f02c8
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+0d068f63069a86d982075a1dca7fe74fd95a29df
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml Wed Dec 28 23:15:19 2011
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>artifact-s</artifactId>
+  <version>0.1</version>
+  <versioning>
+    <versions>
+      <version>0.1</version>
+    </versions>
+    <lastUpdated>20070417090721</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+baa0ad0afaba9cee66ec262b38f796b6
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+dea84d579f673d2d87c7bd47e4318cdf8e59e4d0
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh Wed Dec 28 23:15:19 2011
@@ -0,0 +1,7 @@
+#Last Scan Information, managed by Archiva. DO NOT EDIT
+#Thu Apr 19 17:04:36 PHT 2007
+scan.included.files=12
+scan.skipped.files=0
+scan.finished.timestamp=1176973476967
+scan.consumed.files=20
+scan.started.timestamp=1176973467414

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar?rev=1225381&view=auto
==============================================================================
Files archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar (added) and archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar Wed Dec 28 23:15:19 2011 differ

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+306d556e6e5e4d604dc854d09ddcdefd
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+afb6586f5eb4c63dd5735a0bed11c99c7fac6755
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom Wed Dec 28 23:15:19 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <distributionManagement>
+    <status>deployed</status>
+  </distributionManagement>
+</project>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+8e896baea663a45d7bd2737f8e464481
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+e37897c617d78dedd978766a2db318d301e80105
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml Wed Dec 28 23:15:19 2011
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <buildNumber>1</buildNumber>
+    </snapshot>
+    <lastUpdated>20070425105840</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+add4f71a005137e9a296c5b192e900c2
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+b505e302169e04fc821bf571da7435b1e42ef8d7
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml Wed Dec 28 23:15:19 2011
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <versions>
+      <version>1.0-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20070425105840</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+f3b657fb48d2e82fee5fada169756938
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 Wed Dec 28 23:15:19 2011
@@ -0,0 +1 @@
+f4629e609deb95cefdcdddc6dd8c2942d1c3e47f
\ No newline at end of file

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties Wed Dec 28 23:15:19 2011
@@ -0,0 +1,143 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# properties for integration tests
+
+ADMIN_USERNAME=admin
+ADMIN_FULLNAME=Administrator
+ADMIN_EMAIL=admin@localhost.fr
+ADMIN_PASSWORD=admin1
+
+SELENIUM_HOST=localhost
+SELENIUM_PORT=4444
+SELENIUM_BROWSER=*firefox
+
+# Search, Artifact Management
+SEARCH_BAD_ARTIFACT=asdf
+# Existing Artifact
+ARTIFACT_GROUPID=test
+ARTIFACT_ARTIFACTID=test
+ARTIFACT_VERSION=1.0
+ARTIFACT_PACKAGING=jar
+ARTIFACT_CLASSNAME=test.App
+
+# Artifact for testing add artifact with valid values
+VALIDARTIFACT_GROUPID=addArtifactValidValues
+VALIDARTIFACT_ARTIFACTID=addArtifactValidValues-artifact
+
+# Artifact for upload action in audit log report - MRM-1304
+AUDITLOGARTIFACT_GROUPID=group.auditLogUpload
+AUDITLOGARTIFACT_ARTIFACTID=auditLogUpload-artifact
+AUDITLOG_EXPECTED_ARTIFACT=group/auditLogUpload/auditLogUpload-artifact/1.0/auditLogUpload-artifact-1.0.jar
+
+# Reports
+REPOSITORY_NAME=internal
+START_DATE=05/01/2009
+END_DATE=05/30/2009
+
+# User Management
+# For password and new password
+USERROLE_EMAIL=admin@localhost
+USERROLE_PASSWORD=password1
+NEW_USERROLE_PASSWORD=password123
+
+# Guest Role
+GUEST_USERNAME=guest_user
+GUEST_FULLNAME=Guest
+# Registered User Role
+REGISTERED_USERNAME=reg_user
+REGISTERED_FULLNAME=Registered User
+# System Administrator
+SYSAD_USERNAME=sys_admin
+SYSAD_FULLNAME=System Administrator
+# User Administrator
+USERADMIN_USERNAME=user_admin
+USERADMIN_FULLNAME=User Administrator
+# Global Repository Manager
+GLOBALREPOMANAGER_USERNAME=globalrepo_manager
+GLOBALREPOMANAGER_FULLNAME=Global Repository Manager
+# Global Repository Observer
+GLOBALREPOOBSERVER_USERNAME=globalrepo_observer
+GLOBALREPOOBSERVER_FULLNAME=Global Repository Observer
+# Repository Manager - internal
+REPOMANAGER_INTERNAL_USERNAME=repomanager_internal
+REPOMANAGER_INTERNAL_FULLNAME=Repository Manager - internal
+# Repository Manager - snapshots
+REPOMANAGER_SNAPSHOTS_USERNAME=repomanager_snapshots
+REPOMANAGER_SNAPSHOTS_FULLNAME=Repository Manager - snapshots
+# Repository Observer - internal
+REPOOBSERVER_INTERNAL_USERNAME=repoobserver_internal
+REPOOBSERVER_INTERNAL_FULLNAME=Repository Observer - internal
+# Repository Observer - snapshots
+REPOOBSERVER_SNAPSHOTS_USERNAME=repoobserver_snapshots
+REPOOBSERVER_SNAPSHOTS_FULLNAME=Repository Observer - snapshots
+
+# Add Artifact
+GROUPID=test
+ARTIFACTID=test
+VERSION=1.0
+PACKAGING=jar
+ARTIFACTFILEPATH=test
+REPOSITORYID=internal
+
+GROUPID1=delete
+ARTIFACTID1=delete
+VERSION1=1.0
+PACKAGING1=jar
+ARTIFACTFILEPATH1=test
+REPOSITORYID1=internal
+
+GROUPID_DOTNETARTIFACT=dotNetTypes
+ARTIFACTID_DOTNETARTIFACT=dotNetTypes
+PACKAGING_DOTNETARTIFACT=library
+
+SNAPSHOT_GROUPID=org.apache.archiva
+SNAPSHOT_ARTIFACTID=archiva-test
+SNAPSHOT_VERSION=1.0-SNAPSHOT
+SNAPSHOT_PACKAGING=jar
+SNAPSHOT_ARTIFACTFILEPATH=src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar
+SNAPSHOT_REPOSITORYID=snapshots
+
+ADD_REMOVE_GROUPID=artifact.dummy
+ADD_REMOVE_ARTIFACTID=artifact-dummy
+
+# REPOSITORIES
+# Manage Repositories
+MANAGED_IDENTIFIER=testing1
+MANAGED_NAME=Testing Managed Repository
+MANAGED_DIRECTORY=
+MANAGED_INDEX_DIRECTORY=
+MANAGED_TYPE=
+MANAGED_CRON=
+MANAGED_REPOPURGE_DAYSOLDERTHAN=
+MANAGED_REPOPURGE_RETENTIONCOUNT=
+
+# Network Proxies
+NETWORKPROXY_IDENTIFIER=networkproxytest
+NETWORKPROXY_PROTOCOL=http
+NETWORKPROXY_HOSTNAME=
+NETWORKPROXY_PORT=8080
+NETWORKPROXY_USERNAME=admin
+NETWORKPROXY_PASSWORD=admin123
+
+# Browse - MRM-1278 test
+SNAPSHOTS_REPOSITORY=snapshots
+RELEASES_REPOSITORY=releases
+
+

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,89 @@
+package org.apache.archiva.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class ArchivaAdminTest
+    extends AbstractArchivaTest
+{
+
+    @Override
+    @AfterTest
+    public void close()
+        throws Exception
+    {
+        super.close();
+    }
+
+    @Override
+    @BeforeSuite
+    public void open()
+        throws Exception
+    {
+        super.open();
+    }
+
+    @BeforeTest
+    @Parameters( { "baseUrl", "browser", "maxWaitTimeInMs", "seleniumHost", "seleniumPort" } )
+    public void initializeArchiva( String baseUrl, String browser, int maxWaitTimeInMs,
+                                   @Optional( "localhost" ) String seleniumHost, @Optional( "4444" ) int seleniumPort )
+        throws Exception
+    {
+
+        super.open( baseUrl, browser, seleniumHost, seleniumPort, Integer.toString( maxWaitTimeInMs ) );
+
+        getSelenium().open( baseUrl );
+
+        getSelenium().refresh();
+
+        // if not admin user created create one
+        if ( isElementVisible( "create-admin-link" ) )
+        {
+            clickLinkWithLocator( "create-admin-link-a", false );
+            assertCreateAdmin();
+            String fullname = getProperty( "ADMIN_FULLNAME" );
+            String username = getProperty( "ADMIN_USERNAME" );
+            String mail = getProperty( "ADMIN_EMAIL" );
+            String password = getProperty( "ADMIN_PASSWORD" );
+            submitAdminData( fullname, mail, password );
+            assertUserLoggedIn( username );
+            clickLinkWithLocator( "logout-link-a" );
+        }
+        else
+        {
+            login( getAdminUsername(), getAdminPassword() );
+        }
+
+    }
+
+    @Test( groups = { "about" }, alwaysRun = true )
+    public void testHome()
+    {
+        getSelenium().open( baseUrl );
+        assertPage( "Apache Archiva" );
+    }
+}
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,122 @@
+package org.apache.archiva.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+/*
+ * Bug in TestNG. TESTNG-285: @Test(sequential=true) works incorrectly for classes with inheritance
+ * http://code.google.com/p/testng/source/browse/trunk/CHANGES.txt
+ * Waiting 5.9 release. It's comming soon.
+ */
+/**
+ * Based on LoginTest of Emmanuel Venisse test.
+ * 
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+
+@Test( groups = { "login" }, dependsOnGroups = {"about"})
+public class LoginTest
+    extends AbstractArchivaTest
+{
+    @Test(alwaysRun = true)
+    public void testWithBadUsername()
+    {
+        goToLoginPage();
+        setFieldValue( "user-login-form-username", "badUsername" );
+
+        waitPage();
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+    }
+
+    @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
+    public void testWithBadPassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        setFieldValue( "loginForm_password", "badPassword" );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+        //<ul class="errorMessage"><li><span>
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+    }
+
+    @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
+    public void testWithEmptyUsername()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_password", "password" );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "User Name is required" );
+        assertElementPresent( "//tr[@errorFor=\'loginForm_username\']");
+    }
+
+    @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
+    public void testWithEmptyPassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+    }
+
+    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
+    public void testWithCorrectUsernamePassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        setFieldValue( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "Logout" );
+        assertElementPresent( "logoutLink" );
+        //assertTextPresent( "Edit Details" );
+        assertElementPresent( "editUserLink" );
+        assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
+    }
+
+    @BeforeTest
+    public void open()
+        throws Exception
+    {
+        super.open();
+    }
+
+    @Override
+    @AfterTest
+    public void close()
+        throws Exception
+    {
+        super.close();
+    }
+}
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,242 @@
+package org.apache.archiva.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Utility class for creating xpath expressions
+ */
+public class XPathExpressionUtil
+{
+    public static final String CONTAINS = "contains";
+
+    public static final String AND = " and ";
+
+    public static final String CURRENT_NODE = "./";
+
+    public static final String PARENT_NODE = "../";
+
+    public static final String GRANDPARENT_NODE = "../../";
+
+    public static final String ELEMENT_ANY_LEVEL = "//";
+
+    public static final String TABLE_COLUMN = "td";
+
+    public static final String TABLE_ROW = "tr";
+
+    public static final String START_NODE_TEST = "[";
+
+    public static final String END_NODE_TEST = "]";
+
+    public static final String ANCHOR = "a";
+
+    public static final String IMG = "img";
+
+    public static final String LIST = "ul";
+
+    public static final String LINE = "li";
+
+    public static String getList( String[] values )
+    {
+        String xpathExpression = "";
+
+        if ( values.length > 0 )
+        {
+            xpathExpression += ELEMENT_ANY_LEVEL;
+            xpathExpression += LIST;
+            xpathExpression += START_NODE_TEST;
+
+            for ( int nIndex = 0; nIndex < values.length; nIndex++ )
+            {
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( LINE + position( nIndex + 1 ), values[nIndex] );
+            }
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, null, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param elementValue the matched element value
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String elementValue, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, elementValue, "TEXT", columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getImgColumnElement( String element, int elementIndex, String imageName, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, imageName, IMG, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    private static String getColumnElement( String element, int elementIndex, String elementValue,
+                                            String elementValueType, String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = ELEMENT_ANY_LEVEL + element;
+            xpathExpression += START_NODE_TEST;
+
+            if ( elementValue != null )
+            {
+                if ( "TEXT".equals( elementValueType ) )
+                {
+                    xpathExpression += contains( elementValue );
+                    xpathExpression += ( columnValues.length > 0 ) ? AND : "";
+                }
+            }
+
+            // we are two levels below the table row element ( tr/td/<element> )
+            xpathExpression += matchColumns( GRANDPARENT_NODE, columnValues, elementIndex );
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        if ( IMG.equals( elementValueType ) )
+        {
+            xpathExpression += "/img[contains(@src, '" + elementValue + "')]";
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring the table row that matches all column values with the same order as the list
+     * 
+     * @param columnValues the matched list of columnValues
+     * @return
+     */
+    public static String getTableRow( String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = new String( ELEMENT_ANY_LEVEL + TABLE_ROW + START_NODE_TEST );
+            xpathExpression += matchColumns( columnValues );
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    private static String matchColumns( String[] columnValues )
+    {
+        return matchColumns( columnValues, -1 );
+    }
+
+    private static String matchColumns( String[] columnValues, int skipIndex )
+    {
+        return matchColumns( null, columnValues, skipIndex );
+    }
+
+    private static String matchColumns( String parent, String[] columnValues, int skipIndex )
+    {
+        String xpathExpression = "";
+
+        for ( int nIndex = 0; nIndex < columnValues.length; nIndex++ )
+        {
+            if ( ( skipIndex != nIndex ) || ( skipIndex == -1 ) )
+            {
+                // prepend "and" if index > 0
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( parent, TABLE_COLUMN + position( nIndex + 1 ), columnValues[nIndex] );
+            }
+        }
+
+        return xpathExpression;
+    }
+
+    private static String position( int nIndex )
+    {
+        return new String( "[" + nIndex + "]" );
+    }
+
+    private static String contains( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return contains( finalElement, matchedString );
+    }
+
+    private static String contains( String matchedString )
+    {
+        return contains( ".", matchedString );
+    }
+
+    private static String contains( String axis, String matchedString )
+    {
+        return new String( CONTAINS + "(" + axis + "," + "'" + matchedString + "')" );
+    }
+
+    private static String equals( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return equals( finalElement, matchedString );
+    }
+
+    private static String equals( String axis, String matchedString )
+    {
+        return new String( axis + "==" + "'" + matchedString + "'" );
+    }
+}
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,109 @@
+package org.apache.archiva.web.test.listener;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.thoughtworks.selenium.Selenium;
+import org.apache.archiva.web.test.parent.AbstractSeleniumTest;
+import org.apache.commons.io.FileUtils;
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.regex.Pattern;
+
+public class CaptureScreenShotsListener
+    extends TestListenerAdapter
+{
+    @Override
+    public void onTestSkipped( ITestResult tr )
+    {
+        System.out.println( "Test " + tr.getName() + " -> Skipped" );
+        super.onTestSkipped( tr );
+    }
+
+    @Override
+    public void onTestFailure( ITestResult tr )
+    {
+        captureError( tr );
+        System.out.println( "Test " + tr.getName() + " -> Failed" );
+        super.onTestFailure( tr );
+    }
+
+    @Override
+    public void onTestSuccess( ITestResult tr )
+    {
+        System.out.println( "Test " + tr.getName() + " -> Success" );
+        super.onTestFailure( tr );
+    }
+
+    private void captureError( ITestResult tr )
+    {
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
+        String time = sdf.format( new Date() );
+        File targetPath = new File( "target", "screenshots" );
+        StackTraceElement stackTrace[] = tr.getThrowable().getStackTrace();
+        String cName = tr.getTestClass().getName();
+        int index = getStackTraceIndexOfCallingClass( cName, stackTrace );
+        String methodName = stackTrace[index].getMethodName();
+        int lNumber = stackTrace[index].getLineNumber();
+        String lineNumber = Integer.toString( lNumber );
+        String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
+        targetPath.mkdirs();
+        Selenium selenium = AbstractSeleniumTest.getSelenium();
+        String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-" + time;
+        try
+        {
+            selenium.windowMaximize();
+            File fileName = new File( targetPath, fileBaseName + ".png" );
+            selenium.captureEntirePageScreenshot( fileName.getAbsolutePath(), "background=#FFFFFF" );
+        }
+        catch ( RuntimeException e )
+        {
+            System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() );
+        }
+        try
+        {
+            File fileName = new File( targetPath, fileBaseName + ".html" );
+            FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() );
+        }
+        catch ( IOException ioe )
+        {
+            System.out.println( ioe.getMessage() );
+        }
+    }
+
+    private int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
+    {
+        boolean match = false;
+        int i = 0;
+        do
+        {
+            String className = stackTrace[i].getClassName();
+            match = Pattern.matches( nameOfClass, className );
+            i++;
+        }
+        while ( match == false );
+        i--;
+        return i;
+    }
+}
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,726 @@
+package org.apache.archiva.web.test.parent;
+
+import org.apache.archiva.web.test.XPathExpressionUtil;
+import org.testng.Assert;
+
+import java.io.File;
+import java.io.IOException;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public abstract class AbstractArchivaTest
+    extends AbstractSeleniumTest
+{
+    protected String username;
+
+    protected String fullname;
+
+    protected static String getErrorMessageText()
+    {
+        return getSelenium().getText( "//ul[@class='errorMessage']/li/span" );
+    }
+
+    public String getUserEmail()
+    {
+        String email = getProperty( "USERROLE_EMAIL" );
+        return email;
+    }
+
+    public String getUserRolePassword()
+    {
+        String password = getProperty( "USERROLE_PASSWORD" );
+        return password;
+    }
+
+    public String getUserRoleNewPassword()
+    {
+        String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
+        return password_new;
+    }
+
+    public String getBasedir()
+    {
+        String basedir = System.getProperty( "basedir" );
+
+        if ( basedir == null )
+        {
+            basedir = new File( "" ).getAbsolutePath();
+        }
+
+        return basedir;
+    }
+
+    public String getAdminUsername()
+    {
+        String adminUsername = getProperty( "ADMIN_USERNAME" );
+        return adminUsername;
+    }
+
+    public String getAdminPassword()
+    {
+        String adminPassword = getProperty( "ADMIN_PASSWORD" );
+        return adminPassword;
+    }
+
+    public void assertCreateAdmin()
+    {
+        assertElementPresent( "user-create" );
+        assertFieldValue( "admin", "username" );
+        assertElementPresent( "fullname" );
+        assertElementPresent( "password" );
+        assertElementPresent( "confirmPassword" );
+        assertElementPresent( "email" );
+    }
+
+    public void submitAdminData( String fullname, String email, String password )
+    {
+        setFieldValue( "fullname", fullname );
+        setFieldValue( "email", email );
+        setFieldValue( "password", password );
+        setFieldValue( "confirmPassword", password );
+        clickButtonWithLocator( "user-create-form-register-button" );
+        //submit();
+    }
+
+    // Go to Login Page
+    public void goToLoginPage()
+    {
+        getSelenium().open( baseUrl );
+        // are we already logged in ?
+        if ( isElementVisible( "logout-link" ) ) //isElementPresent( "logoutLink" ) )
+        {
+            // so logout
+            clickLinkWithLocator( "logout-link-a", false );
+            clickLinkWithLocator( "login-link-a" );
+        }
+        else if ( isElementVisible( "login-link-a" ) )
+        {
+            clickLinkWithLocator( "login-link-a" );
+        }
+        assertLoginModal();
+    }
+
+    public void submitUserData( String username, String password, boolean rememberme, boolean success )
+    {
+
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberme )
+        {
+            checkField( "rememberMe" );
+        }
+
+        submit();
+        if ( success )
+        {
+            assertUserLoggedIn( username );
+        }
+        else
+        {
+            assertLoginModal();
+        }
+    }
+
+    public void assertLoginModal()
+    {
+        assertElementPresent( "user-login-form" );
+        Assert.assertTrue( isElementVisible( "register-link" ) );
+        assertElementPresent( "user-login-form-username" );
+        assertElementPresent( "user-login-form-password" );
+        assertButtonWithIdPresent( "modal-login-ok" );
+    }
+
+    // User Management
+    public void goToUserManagementPage()
+    {
+        getSelenium().open( "/archiva/security/userlist.action" );
+        assertUserManagementPage();
+    }
+
+    public void assertUserManagementPage()
+    {
+        assertPage( "Apache Archiva \\ [Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertTextPresent( "Navigation" );
+        assertImgWithAlt( "First" );
+        assertImgWithAlt( "Prev" );
+        assertImgWithAlt( "Next" );
+        assertImgWithAlt( "Last" );
+        assertTextPresent( "Display Rows" );
+        assertTextPresent( "Username" );
+        assertTextPresent( "Full Name" );
+        assertTextPresent( "Email" );
+        assertTextPresent( "Permanent" );
+        assertTextPresent( "Validated" );
+        assertTextPresent( "Locked" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "Tools" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "The following tools are available for administrators to manipulate the user list." );
+        assertButtonWithValuePresent( "Create New User" );
+        assertButtonWithValuePresent( "Show Users In Role" );
+        assertElementPresent( "roleName" );
+        assertTextPresent( "Reports" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Types" );
+        assertTextPresent( "User List" );
+        assertTextPresent( "Roles Matrix" );
+    }
+
+    /*
+     * //User Role public void goToUserRolesPage() { clickLinkWithText( "User Roles" ); assertUserRolesPage(); }
+     */
+
+    public void assertUserRolesPage()
+    {
+        //assertPage( "Apache Archiva \\ [Admin] User Edit" );
+        //[Admin] Rôles de l'utilisateur
+
+        assertTextPresent( "[Admin] User Roles", "[Admin] R\u00F4les de l'utilisateur" );
+        assertTextPresent( "Username", "Nom d'utilisateur" );
+        assertTextPresent( "Full Name", "Nom complet" );
+        String userRoles =
+            "Guest,Registered User,System Administrator,User Administrator,Global Repository Observer,Global Repository Manager,Repository Observer,Repository Manager,internal";
+        String[] arrayRole = userRoles.split( "," );
+        for ( String userroles : arrayRole )
+        {
+            assertTextPresent( userroles );
+        }
+    }
+
+    public void assertDeleteUserPage( String username )
+    {
+        assertTextPresent( "[Admin] User Delete", "[Admin] Suppression de l'utilisateur",
+                           "L'utilisateur suivant va \u00EAtre supprim\u00E9:" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username, "Nom d'utilisateur:" + username );
+        assertButtonWithIdPresent( "userDeleteSubmit" );
+    }
+
+    public void createUser( String userName, String fullName, String email, String password, boolean valid )
+    {
+        createUser( userName, fullName, email, password, password, valid );
+    }
+
+    private void createUser( String userName, String fullName, String emailAd, String password, String confirmPassword,
+                             boolean valid )
+    {
+        // login( getAdminUsername() , getAdminPassword() );
+        getSelenium().open( "/archiva/security/userlist.action" );
+        clickButtonWithLocator( "userCreateButton", true );
+        //clickButtonWithValue( "Create New User" );
+        assertCreateUserPage();
+        setFieldValue( "user.username", userName );
+        setFieldValue( "user.fullName", fullName );
+        setFieldValue( "user.email", emailAd );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", confirmPassword );
+        submit();
+
+        assertUserRolesPage();
+
+        //clickButtonWithValue( "Submit" );
+        clickButtonWithName( "submitRolesButton", true );
+
+        if ( valid )
+        {
+            String[] columnValues = { userName, fullName, emailAd };
+            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+        }
+        else
+        {
+            assertCreateUserPage();
+        }
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAdd )
+    {
+        deleteUser( userName, fullName, emailAdd, false, false );
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAd, boolean validated, boolean locked )
+    {
+        String[] columnValues = { userName, fullName, emailAd };
+        // clickLinkWithText( "userlist" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        assertDeleteUserPage( userName );
+        submit();
+        assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+    }
+
+    public void login( String username, String password )
+    {
+        login( username, password, true, "Login Page" );
+    }
+
+    public void login( String username, String password, boolean valid, String assertReturnPage )
+    {
+        if ( isElementVisible( "login-link-a" ) )//isElementPresent( "loginLink" ) )
+        {
+            goToLoginPage();
+
+            submitLoginPage( username, password, false, valid, assertReturnPage );
+        }
+        if ( valid )
+        {
+            assertUserLoggedIn( username );
+        }
+    }
+
+    public void submitLoginPage( String username, String password )
+    {
+        submitLoginPage( username, password, false, true, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean validUsernamePassword )
+    {
+        submitLoginPage( username, password, false, validUsernamePassword, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean rememberMe, boolean validUsernamePassword,
+                                 String assertReturnPage )
+    {
+        clickLinkWithLocator( "login-link-a", false );
+        setFieldValue( "user-login-form-username", username );
+        setFieldValue( "user-login-form-password", password );
+        /*
+        if ( rememberMe )
+        {
+            checkField( "rememberMe" );
+        }*/
+
+        clickButtonWithLocator( "modal-login-ok" );
+        if ( validUsernamePassword )
+        {
+            assertUserLoggedIn( username );
+        }
+        /*
+        else
+        {
+            if ( "Login Page".equals( assertReturnPage ) )
+            {
+                assertLoginPage();
+            }
+            else
+            {
+                assertPage( assertReturnPage );
+            }
+        }*/
+    }
+
+    protected void assertUserLoggedIn( String username )
+    {
+        Assert.assertFalse( isElementVisible( "login-link" ) );
+        Assert.assertTrue( isElementVisible( "logout-link" ) );
+        Assert.assertFalse( isElementVisible( "register-link" ) );
+        Assert.assertFalse( isElementVisible( "create-admin-link" ) );
+    }
+
+    // User Roles
+    public void assertUserRoleCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent(
+            "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + value
+                + "']" );
+    }
+
+    public void assertResourceRolesCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void checkUserRoleWithValue( String value )
+    {
+        assertUserRoleCheckBoxPresent( value );
+        getSelenium().click(
+            "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + value
+                + "']" );
+    }
+
+    public void checkResourceRoleWithValue( String value )
+    {
+        assertResourceRolesCheckBoxPresent( value );
+        getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void changePassword( String oldPassword, String newPassword )
+    {
+        assertPage( "Apache Archiva \\ Change Password" );
+        setFieldValue( "existingPassword", oldPassword );
+        setFieldValue( "newPassword", newPassword );
+        setFieldValue( "newPasswordConfirm", newPassword );
+        clickButtonWithValue( "Change Password" );
+    }
+
+    public void assertCreateUserPage()
+    {
+        //assertPage( "Apache Archiva \\ [Admin] User Create" );
+        //assertTextPresent( "[Admin] User Create" );
+        assertTextPresent( "Username*:", "Nom d'utilisateur*:" );
+        assertElementPresent( "user.username" );
+        assertTextPresent( "Full Name*:", "Nom complet*:" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*:", "Adresse email*:" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*:", "Mot de passe*:" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*:", "Confirmer le mot de passe*" );
+        assertElementPresent( "user.confirmPassword" );
+        //assertButtonWithValuePresent( "Create User" );
+        assertButtonWithIdPresent( "userCreateSubmit" );
+//        assertElementNotPresent( "userCreateSubmit" );
+    }
+
+    public void assertLeftNavMenuWithRole( String role )
+    {
+        if ( role.equals( "Guest" ) || role.equals( "Registered User" ) || role.equals( "Global Repository Observer" )
+            || role.equals( "Repository Observer - internal" ) || role.equals( "Repository Observer - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "User Administrator" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "User Management" );
+            assertLinkPresent( "User Roles" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "Global Repository Manager" ) || role.equals( "Repository Manager - internal" )
+            || role.equals( "Repository Manager - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "Upload Artifact" );
+            assertLinkPresent( "Delete Artifact" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else
+        {
+            assertTextPresent( "Search" );
+            String navMenu =
+                "Find Artifact,Browse,Reports,User Management,User Roles,Appearance,Upload Artifact,Delete Artifact,Repository Groups,Repositories,Proxy Connectors,Legacy Support,Network Proxies,Repository Scanning";
+            String[] arrayMenu = navMenu.split( "," );
+            for ( String navmenu : arrayMenu )
+            {
+                assertLinkPresent( navmenu );
+            }
+        }
+    }
+
+    // Find Artifact
+    public void goToFindArtifactPage()
+    {
+        getSelenium().open( "/archiva/findArtifact.action" );
+        assertFindArtifactPage();
+    }
+
+    public void assertFindArtifactPage()
+    {
+        //assertPage( "Apache Archiva \\ Find Artifact" );
+        assertElementPresent( "searchBox" );
+        //assertTextPresent( "Find Artifact" );
+        //assertTextPresent( "Search for:" );
+        //assertTextPresent( "Checksum:" );
+        assertElementPresent( "quickSearchBox" );
+        assertElementPresent( "checksumSearch" );
+        //assertButtonWithValuePresent( "Search" );
+        assertElementPresent( "checksumSearch_0" );
+    }
+
+    // Appearance
+    public void goToAppearancePage()
+    {
+        getSelenium().open( "/archiva/admin/configureAppearance.action" );
+        assertAppearancePage();
+    }
+
+    public void assertAppearancePage()
+    {
+        assertPage( "Apache Archiva \\ Configure Appearance" );
+        String appearance =
+            "Appearance,Organization Details,The logo in the top right of the screen is controlled by the following settings.,Organization Information,Name,URL,Logo URL";
+        String[] arrayAppearance = appearance.split( "," );
+        for ( String appear : arrayAppearance )
+        {
+            assertTextPresent( appear );
+        }
+        assertLinkPresent( "Edit" );
+        assertLinkPresent( "Change your appearance" );
+    }
+
+    public void addEditAppearance( String name, String url, String logoUrl, boolean wait )
+    {
+        setFieldValue( "organisationName", name );
+        setFieldValue( "organisationUrl", url );
+        setFieldValue( "organisationLogo", logoUrl );
+        clickButtonWithValue( "Save", wait );
+    }
+
+    public void goToHomePage()
+    {
+        getSelenium().open( "" );
+    }
+
+    // Upload Artifact
+    public void goToAddArtifactPage()
+    {
+        // must be logged as admin
+        getSelenium().open( "/archiva/upload.action" );
+        assertAddArtifactPage();
+    }
+
+    public void assertAddArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Upload Artifact" );
+        assertTextPresent( "Upload Artifact" );
+
+        String artifact =
+            "Upload Artifact,Group Id*:,Artifact Id*:,Version*:,Packaging*:,Classifier:,Generate Maven 2 POM,Artifact File*:,POM File:,Repository Id:";
+        String[] arrayArtifact = artifact.split( "," );
+        for ( String arrayartifact : arrayArtifact )
+        {
+            assertTextPresent( arrayartifact );
+        }
+
+        String artifactElements =
+            "upload_groupId,upload_artifactId,upload_version,upload_packaging,upload_classifier,upload_generatePom,upload_artifact,upload_pom,upload_repositoryId,uploadSubmit";
+        String[] arrayArtifactElements = artifactElements.split( "," );
+        for ( String artifactelements : arrayArtifactElements )
+        {
+            assertElementPresent( artifactelements );
+        }
+    }
+
+    public void addArtifact( String groupId, String artifactId, String version, String packaging,
+                             String artifactFilePath, String repositoryId, boolean wait )
+    {
+        addArtifact( groupId, artifactId, version, packaging, true, artifactFilePath, repositoryId, wait );
+    }
+
+    public void addArtifact( String groupId, String artifactId, String version, String packaging, boolean generatePom,
+                             String artifactFilePath, String repositoryId, boolean wait )
+    {
+        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+        goToAddArtifactPage();
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        setFieldValue( "packaging", packaging );
+
+        if ( generatePom )
+        {
+            checkField( "generatePom" );
+        }
+
+        String path;
+        if ( artifactFilePath != null && artifactFilePath.trim().length() > 0 )
+        {
+            File f = new File( artifactFilePath );
+            try
+            {
+                path = f.getCanonicalPath();
+            }
+            catch ( IOException e )
+            {
+                path = f.getAbsolutePath();
+            }
+        }
+        else
+        {
+            path = artifactFilePath;
+        }
+
+        setFieldValue( "artifact", path );
+        selectValue( "upload_repositoryId", repositoryId );
+
+        //clickButtonWithValue( "Submit" );
+        clickButtonWithLocator( "uploadSubmit", wait );
+    }
+
+    public void goToRepositoriesPage()
+    {
+        if ( !getTitle().equals( "Apache Archiva \\ Administration - Repositories" ) )
+        {
+            getSelenium().open( "/archiva/admin/repositories.action" );
+        }
+        assertRepositoriesPage();
+    }
+
+    public void assertRepositoriesPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Repositories" );
+        assertTextPresent( "Administration - Repositories" );
+        assertTextPresent( "Managed Repositories" );
+        assertTextPresent( "Remote Repositories" );
+    }
+
+    public void addManagedRepository( String identifier, String name, String directory, String indexDirectory,
+                                      String type, String cron, String daysOlder, String retentionCount, boolean wait )
+    {
+        // goToRepositoriesPage();
+        // clickLinkWithText( "Add" );
+        setFieldValue( "repository.id", identifier );
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", directory );
+        setFieldValue( "repository.indexDirectory", indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.cronExpression", cron );
+        setFieldValue( "repository.daysOlder", daysOlder );
+        setFieldValue( "repository.retentionCount", retentionCount );
+        // TODO
+        clickButtonWithValue( "Add Repository", wait );
+    }
+
+    // artifact management
+    public void assertDeleteArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Delete Artifact" );
+        assertTextPresent( "Delete Artifact" );
+        assertTextPresent( "Group Id*:" );
+        assertTextPresent( "Artifact Id*:" );
+        assertTextPresent( "Version*:" );
+        assertTextPresent( "Repository Id:" );
+        assertElementPresent( "groupId" );
+        assertElementPresent( "artifactId" );
+        assertElementPresent( "version" );
+        assertElementPresent( "repositoryId" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    // network proxies
+    public void goToNetworkProxiesPage()
+    {
+        clickLinkWithText( "Network Proxies" );
+        assertNetworkProxiesPage();
+    }
+
+    public void assertNetworkProxiesPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Network Proxies" );
+        assertTextPresent( "Administration - Network Proxies" );
+        assertTextPresent( "Network Proxies" );
+        assertLinkPresent( "Add Network Proxy" );
+    }
+
+    public void addNetworkProxy( String identifier, String protocol, String hostname, String port, String username,
+                                 String password )
+    {
+        //goToNetworkProxiesPage();
+        clickLinkWithText( "Add Network Proxy" );
+        assertAddNetworkProxy();
+        setFieldValue( "proxy.id", identifier );
+        setFieldValue( "proxy.protocol", protocol );
+        setFieldValue( "proxy.host", hostname );
+        setFieldValue( "proxy.port", port );
+        setFieldValue( "proxy.username", username );
+        setFieldValue( "proxy.password", password );
+        clickButtonWithValue( "Save Network Proxy" );
+    }
+
+    public void assertAddNetworkProxy()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Network Proxy" );
+        assertTextPresent( "Admin: Add Network Proxy" );
+        assertTextPresent( "Add network proxy:" );
+        assertTextPresent( "Identifier*:" );
+        assertTextPresent( "Protocol*:" );
+        assertTextPresent( "Hostname*:" );
+        assertTextPresent( "Port*:" );
+        assertTextPresent( "Username:" );
+        assertTextPresent( "Password:" );
+        assertButtonWithValuePresent( "Save Network Proxy" );
+    }
+
+    // Legacy Support
+    public void goToLegacySupportPage()
+    {
+        getSelenium().open( "/archiva/admin/legacyArtifactPath.action" );
+        assertLegacySupportPage();
+    }
+
+    public void assertLegacySupportPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Legacy Support" );
+        assertTextPresent( "Administration - Legacy Artifact Path Resolution" );
+        assertTextPresent( "Path Mappings" );
+        assertLinkPresent( "Add" );
+    }
+
+    public void addLegacyArtifactPath( String path, String groupId, String artifactId, String version,
+                                       String classifier, String type, boolean wait )
+    {
+        assertAddLegacyArtifactPathPage();
+        setFieldValue( "legacyArtifactPath.path", path );
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        setFieldValue( "classifier", classifier );
+        setFieldValue( "type", type );
+        clickButtonWithValue( "Add Legacy Artifact Path", wait );
+    }
+
+    public void assertAddLegacyArtifactPathPage()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Legacy Artifact Path" );
+        assertTextPresent( "Admin: Add Legacy Artifact Path" );
+        assertTextPresent(
+            "Enter the legacy path to map to a particular artifact reference, then adjust the fields as necessary." );
+        String element =
+            "addLegacyArtifactPath_legacyArtifactPath_path,addLegacyArtifactPath_groupId,addLegacyArtifactPath_artifactId,addLegacyArtifactPath_version,addLegacyArtifactPath_classifier,addLegacyArtifactPath_type";
+        String[] arrayElement = element.split( "," );
+        for ( String arrayelement : arrayElement )
+        {
+            assertElementPresent( arrayelement );
+        }
+        assertButtonWithValuePresent( "Add Legacy Artifact Path" );
+    }
+
+    // add managed repository and its staging repository
+    public void addStagingRepository( String identifier, String name, String directory, String indexDirectory,
+                                      String type, String cron, String daysOlder, String retentionCount )
+    {
+        setFieldValue( "repository.id", identifier );
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", directory );
+        setFieldValue( "repository.indexDirectory", indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.cronExpression", cron );
+        setFieldValue( "repository.daysOlder", daysOlder );
+        setFieldValue( "repository.retentionCount", retentionCount );
+        checkField( "stageNeeded" );
+
+        clickButtonWithValue( "Add Repository" );
+    }
+
+    protected void logout()
+    {
+        clickLinkWithText( "Logout" );
+        assertTextNotPresent( "Current User:" );
+        assertLinkNotPresent( "Edit Details" );
+        assertLinkNotPresent( "Logout" );
+        assertLinkPresent( "Login" );
+    }
+}
\ No newline at end of file

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java?rev=1225381&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java Wed Dec 28 23:15:19 2011
@@ -0,0 +1,82 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public abstract class AbstractArtifactManagementTest
+    extends AbstractArchivaTest
+{
+
+    public String getGroupId()
+    {
+        String groupId = getProperty( "GROUPID" );
+        return groupId;
+    }
+
+    public String getArtifactId()
+    {
+        String artifactId = getProperty( "ARTIFACTID" );
+        return artifactId;
+    }
+
+    public String getVersion()
+    {
+        String version = getProperty( "VERSION" );
+        return version;
+    }
+
+    public String getPackaging()
+    {
+        String packaging = getProperty( "PACKAGING" );
+        return packaging;
+    }
+
+    public String getArtifactFilePath()
+    {
+        return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
+    }
+
+    public String getRepositoryId()
+    {
+        String repositoryId = getProperty( "REPOSITORYID" );
+        return repositoryId;
+    }
+
+    public void goToDeleteArtifactPage()
+    {
+        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().open( "/archiva/deleteArtifact.action" );
+        assertDeleteArtifactPage();
+    }
+
+    public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
+    {
+        deleteArtifact( groupId, artifactId, version, repositoryId, false );
+    }
+
+    public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId, boolean wait )
+    {
+        goToDeleteArtifactPage();
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        selectValue( "repositoryId", repositoryId );
+        clickButtonWithValue( "Submit", wait );
+    }
+}

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision