From 6b69ca6416cfc7b457090b81bb258765a3bbfadf Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Mon, 3 Oct 2011 03:34:40 +0000 Subject: fix tests that check duplicate artifacts are not added to the lists git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1178289 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/test/RepositoryScanningTest.java | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'archiva-modules/archiva-web/archiva-webapp-test/src') 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 8a6295267..f37a158be 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 @@ -43,15 +43,13 @@ public class RepositoryScanningTest Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[1]/table.13.0" ), "**/*.dll" ); } - @Test( dependsOnMethods = { "testAddArtifactFileType" }, enabled = false ) + @Test( dependsOnMethods = { "testAddArtifactFileType" } ) public void testAddArtifactFileType_ExistingValue() { goToRepositoryScanningPage(); - // FIXME: broken setFieldValue( "newpattern_0", "**/*.zip" ); clickAddIcon( "newpattern_0" ); - Assert.assertEquals( getErrorMessageText(), - "Not adding pattern \"**/*.zip\" to filetype artifacts as it already exists." ); + Assert.assertEquals( getErrorMessageText(), "File type [artifacts] already contains pattern [**/*.zip]" ); } @Test( dependsOnMethods = { "testAddArtifactFileType" } ) @@ -74,15 +72,13 @@ public class RepositoryScanningTest assertTextPresent( "Unable to process blank pattern." ); } - @Test( dependsOnMethods = { "testAddAutoRemove_NullValue" }, enabled = false ) + @Test( dependsOnMethods = { "testAddAutoRemove_NullValue" } ) public void testAddAutoRemove_ExistingValue() { goToRepositoryScanningPage(); setFieldValue( "newpattern_1", "**/*-" ); clickAddIcon( "newpattern_1" ); - // FIXME: broken - Assert.assertEquals( getErrorMessageText(), - "Not adding pattern \"**/*-\" to filetype auto-remove as it already exists." ); + Assert.assertEquals( getErrorMessageText(), "File type [auto-remove] already contains pattern [**/*-]" ); } @Test( dependsOnMethods = { "testAddAutoRemove_NullValue" } ) @@ -115,15 +111,13 @@ public class RepositoryScanningTest "Unable to process blank pattern." ); } - @Test(enabled = false) + @Test public void testAddIgnoredArtifacts_ExistingValue() { goToRepositoryScanningPage(); setFieldValue( "newpattern_2", "**/*.sh" ); clickAddIcon( "newpattern_2" ); - // FIXME: broken - Assert.assertEquals( getErrorMessageText(), - "Not adding pattern \"**/*.sh\" to filetype ignored as it already exists." ); + Assert.assertEquals( getErrorMessageText(), "File type [ignored] already contains pattern [**/*.sh]" ); } @Test @@ -158,15 +152,14 @@ public class RepositoryScanningTest "Unable to process blank pattern." ); } - @Test( enabled = false ) + @Test public void testAddIndexableContent_ExistingValue() { goToRepositoryScanningPage(); setFieldValue( "newpattern_3", "**/*.xml" ); clickAddIcon( "newpattern_3" ); - // FIXME: broken Assert.assertEquals( getErrorMessageText(), - "Not adding pattern \"**/*.xml\" to filetype indexable-content as it already exists." ); + "File type [indexable-content] already contains pattern [**/*.xml]" ); } @Test -- cgit v1.2.3