aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp-test/src
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2011-04-13 03:28:45 +0000
committerBrett Porter <brett@apache.org>2011-04-13 03:28:45 +0000
commit6566bcaa5e8fe918d3e0803b02b6085ad428f9a2 (patch)
tree3a1fd597cf9c3e76762853a23e7495a4574ef93d /archiva-modules/archiva-web/archiva-webapp-test/src
parentf004a7a1292a32bfbd172cdf235e4bbf3d84f804 (diff)
downloadarchiva-6566bcaa5e8fe918d3e0803b02b6085ad428f9a2.tar.gz
archiva-6566bcaa5e8fe918d3e0803b02b6085ad428f9a2.zip
[MRM-1111] fix xpath after reverting to default freemarker templates
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1091636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test/src')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryScanningTest.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryScanningTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryScanningTest.java
index 5dcabd470..860382d0d 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryScanningTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/RepositoryScanningTest.java
@@ -47,10 +47,15 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_0", "**/*.zip" );
clickAddIcon( "newpattern_0" );
- Assert.assertEquals( getSelenium().getText( "//ul[@class='errorMessage']/li/span" ),
+ Assert.assertEquals( getErrorMessageText(),
"Not adding pattern \"**/*.zip\" to filetype artifacts as it already exists." );
}
+ private static String getErrorMessageText()
+ {
+ return getSelenium().getText( "//ul[@class='errorMessage']/li/span" );
+ }
+
@Test( dependsOnMethods = { "testAddArtifactFileType_ExistingValue" } )
public void testDeleteArtifactFileType()
{
@@ -72,7 +77,7 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_1", "**/*-" );
clickAddIcon( "newpattern_1" );
- Assert.assertEquals( getSelenium().getText( "//span[@class='errorMessage']" ),
+ Assert.assertEquals( getErrorMessageText(),
"Not adding pattern \"**/*-\" to filetype auto-remove as it already exists." );
}
@@ -97,7 +102,7 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_2", "" );
clickAddIcon( "newpattern_2" );
- Assert.assertEquals( getSelenium().getText( "//span[@class='errorMessage']" ),
+ Assert.assertEquals( getErrorMessageText(),
"Unable to process blank pattern." );
}
@@ -106,7 +111,7 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_2", "**/*.sh" );
clickAddIcon( "newpattern_2" );
- Assert.assertEquals( getSelenium().getText( "//span[@class='errorMessage']" ),
+ Assert.assertEquals( getErrorMessageText(),
"Not adding pattern \"**/*.sh\" to filetype ignored as it already exists." );
}
@@ -132,7 +137,7 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_3", "" );
clickAddIcon( "newpattern_3" );
- Assert.assertEquals( getSelenium().getText( "//span[@class='errorMessage']" ),
+ Assert.assertEquals( getErrorMessageText(),
"Unable to process blank pattern." );
}
@@ -141,7 +146,7 @@ public class RepositoryScanningTest
{
setFieldValue( "newpattern_3", "**/*.xml" );
clickAddIcon( "newpattern_3" );
- Assert.assertEquals( getSelenium().getText( "//span[@class='errorMessage']" ),
+ Assert.assertEquals( getErrorMessageText(),
"Not adding pattern \"**/*.xml\" to filetype indexable-content as it already exists." );
}