[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1326-g329cf97

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Jan 7 12:38:26 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  329cf977417776fe5d9fe06f93388b3049cefb0f (commit)
      from  2c4c6f37df6da70bd503a2bc7e8893b4beae322a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=329cf977417776fe5d9fe06f93388b3049cefb0f

commit 329cf977417776fe5d9fe06f93388b3049cefb0f
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jan 7 12:37:38 2017 +0100

    fix FRS package update + add new test

diff --git a/src/www/frs/scripts/FRSController.js b/src/www/frs/scripts/FRSController.js
index d3634d8..521656b 100644
--- a/src/www/frs/scripts/FRSController.js
+++ b/src/www/frs/scripts/FRSController.js
@@ -1,7 +1,7 @@
 /**
  * FusionForge FRS
  *
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -105,7 +105,8 @@ FRSController.prototype =
 	updatePackage: function(params) {
 		this.params = params;
 		var td = jQuery(this.params.rowid).children();
-		jQuery.getJSON(this.params.action, {package_name: td[2].children.package_name.value, status_id: td[3].children.status_id.value }, function(data){
+		var select = jQuery(td[2].children).children();
+		jQuery.getJSON(this.params.action, {package_name: td[1].children.package_name.value, status_id: select[0].value }, function(data){
 			jQuery('#maindiv > .feedback').remove();
 			jQuery('#maindiv > .error').remove();
 			jQuery('#maindiv > .warning_msg').remove();
diff --git a/tests/func/20_FRS/FRSTest.php b/tests/func/20_FRS/FRSTest.php
index 9968320..49539f7 100644
--- a/tests/func/20_FRS/FRSTest.php
+++ b/tests/func/20_FRS/FRSTest.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright, 2014, Franck Villaume - TrivialDev
+ * Copyright, 2014,2016, Franck Villaume - TrivialDev
  * Copyright (C) 2015  Inria (Sylvain Beucler)
  *
  * This file is part of FusionForge.
@@ -26,8 +26,7 @@ class CreateFRS extends FForge_SeleniumTestCase
 {
 	public $fixture = 'projecta';
 
-	function testCreateFRSPackage()
-	{
+	function testCreateFRSPackage() {
 		$this->loadAndCacheFixture();
 		$this->switchUser(FORGE_ADMIN_USERNAME);
 		$this->gotoProject('ProjectA');
@@ -39,4 +38,21 @@ class CreateFRS extends FForge_SeleniumTestCase
 		$this->clickAndWait("//input[@name='submit' and @value='Create']");
 		$this->assertTextPresent("Added Package");
 	}
+
+	function testRenameFRSPackage() {
+		$this->loadAndCacheFixture();
+		$this->switchUser(FORGE_ADMIN_USERNAME);
+		$this->gotoProject('ProjectA');
+		$this->clickAndWait("link=Files");
+		$this->assertFalse($this->isTextPresent("Permission denied."));
+		$this->assertTrue($this->isTextPresent("Administration"));
+		$this->clickAndWait("link=Administration");
+		$this->type("//input[@name='package_name']", "My Package Name");
+		$this->clickAndWait("//input[@name='submit' and @value='Create']");
+		$this->assertTextPresent("Added Package");
+		$this->clickAndWait("link=Administration");
+		$this->type('//td[2]/input', 'My Named Packaged');
+		$this->clickAndWait('//td[5]/input');
+		$this->assertTextPresent('Package successfully updated');
+	}
 }

-----------------------------------------------------------------------

Summary of changes:
 src/www/frs/scripts/FRSController.js |  5 +++--
 tests/func/20_FRS/FRSTest.php        | 22 +++++++++++++++++++---
 2 files changed, 22 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list