aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-06-10 13:30:04 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-06-10 21:07:39 +0200
commitabab994f71a2654e2e4acf577d3c4a356a7c6817 (patch)
treefd1e9e3af18538894b25b4d41dac06164579bf44 /archiva-modules/archiva-web
parentedb7bd346b06f1513cbaa1e637c630e4e90ea0df (diff)
downloadarchiva-abab994f71a2654e2e4acf577d3c4a356a7c6817.tar.gz
archiva-abab994f71a2654e2e4acf577d3c4a356a7c6817.zip
Fixing issues on ciserver
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/pom.xml8
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java17
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java3
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java6
5 files changed, 32 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index 40eb946be..868f2f506 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -819,13 +819,15 @@
<executions>
<execution>
<id>cleanup-files</id>
+ <phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
- <tasks>
- <delete file="${user.home}/.m2/archiva.xml" quiet="true"/>
- </tasks>
+ <failOnError>false</failOnError>
+ <target>
+ <delete file="${user.home}/.m2/archiva.xml" />
+ </target>
</configuration>
</execution>
</executions>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
index 3e177b2aa..37805588a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
@@ -21,6 +21,8 @@ package org.apache.archiva.web.test;
import org.apache.archiva.web.test.parent.AbstractArchivaTest;
import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
@@ -35,4 +37,19 @@ public class ArchivaAdminTest
WebDriverWait wait = new WebDriverWait(getWebDriver(), 30);
wait.until(ExpectedConditions.titleContains("Apache Archiva"));
}
+
+ @Test
+ public void testInitialRepositories()
+ {
+ WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
+ WebElement el;
+ el = wait.until(ExpectedConditions.elementToBeClickable( By.id("menu-repositories-list-a")));
+ tryClick( el, ExpectedConditions.presenceOfElementLocated( By.xpath("//table[@id='managed-repositories-table']//td[contains(text(),'internal')]") ),
+ "Managed Repositories not activated");
+ wait.until(ExpectedConditions.visibilityOfElementLocated( By.xpath("//table[@id='managed-repositories-table']//td[contains(text(),'snapshots')]") ));
+ el = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#remote-repositories-content']")));
+ tryClick(el,ExpectedConditions.visibilityOfElementLocated(By.xpath("//table[@id='remote-repositories-table']//td[contains(text(),'central')]")),
+ "Remote Repositories View not available");
+
+ }
} \ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index c1eccfab9..7b034aa49 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -47,7 +47,7 @@ public class RepositoryAdminTest
@Test
public void testManagedRepository()
{
- login( getAdminUsername(), getAdminPassword() );
+ // login( getAdminUsername(), getAdminPassword() );
WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
WebElement el;
el = wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 17b90155b..e8cd49323 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -102,6 +102,9 @@ public class WebDriverBrowseTest
// wait until topbar-menu-container is feeded
await().atMost( 5, TimeUnit.SECONDS ).untilPredicate( ( fl ) -> $( "#topbar-menu" ).present() );
+ await().atMost( 10, TimeUnit.SECONDS).untilPredicate( (fl) -> el("#create-admin-link-a").conditions().clickable() ||
+ el("#login-link-a").conditions().clickable()
+ );
FluentList<FluentWebElement> elements = find( "#create-admin-link-a" );
if ( !elements.isEmpty() && elements.get( 0 ).displayed() )
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index 0cdce6536..35e26b39b 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -42,6 +42,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
/**
* @author Olivier Lamy
@@ -89,6 +90,11 @@ public class WebDriverTest
// wait until topbar-menu-container is feeded
//await().atMost(20, TimeUnit.SECONDS).until($("#topbar-menu")).present();
await().untilPredicate((fl) ->$("#topbar-menu").present());
+ await().atMost( 10, TimeUnit.SECONDS).untilPredicate( ( fl) -> el("#create-admin-link-a").conditions().clickable() ||
+ el("#login-link-a").conditions().clickable()
+ );
+
+
FluentList<FluentWebElement> elements = find("#create-admin-link-a");
if (!elements.isEmpty() && elements.get(0).displayed()) {