diff options
3 files changed, 9 insertions, 18 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js index 86ae953e7..5e90e6e5a 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js @@ -74,7 +74,6 @@ $(function() { this.managedRepositoriesViewModel = managedRepositoriesViewModel; this.update = update; var self = this; - var currentManagedRepository = this.managedRepository; save=function(){ var valid = $("#main-content #managed-repository-edit-form").valid(); if (valid==false) { @@ -106,12 +105,12 @@ $(function() { { type: "POST", contentType: 'application/json', - data: "{\"managedRepository\": " + ko.toJSON(currentManagedRepository)+"}", + data: "{\"managedRepository\": " + ko.toJSON(self.managedRepository)+"}", dataType: 'json', success: function(data) { //var repo = mapManagedRepository(data); - //$.log("data:"+repo.name); - self.managedRepositoriesViewModel.managedRepositories.push(currentManagedRepository); + //$.log("data:"+data.responseText); + self.managedRepositoriesViewModel.managedRepositories.push(self.managedRepository); displaySuccessMessage($.i18n.prop('managedrepository.added')); activateManagedRepositoriesGridTab(); }, diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml index b9d6f606e..0ae4a7538 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml @@ -219,20 +219,11 @@ <goal>test</goal> </goals> <configuration> - <systemProperties> - <property> - <name>browser</name> - <value>${selenium.browser}</value> - </property> - <property> - <name>baseUrl</name> - <value>${baseUrl}</value> - </property> - <property> - <name>maxWaitTimeInMs</name> - <value>${maxWaitTimeInMs}</value> - </property> - </systemProperties> + <systemPropertyVariables> + <browser>${selenium.browser}</browser> + <baseUrl>${baseUrl}</baseUrl> + <maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs> + </systemPropertyVariables> </configuration> </execution> </executions> diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java index a785d221d..f7e51cb4f 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java @@ -102,6 +102,7 @@ public abstract class AbstractArchivaTest public void goToLoginPage() { getSelenium().open( baseUrl ); + waitPage(); // are we already logged in ? if ( isElementVisible( "logout-link" ) ) //isElementPresent( "logoutLink" ) ) { |