[New Edit Mode] Fixed failing tests, and added new test in CreateWizard

[New Edit Mode] #480 fixed JSLint errors

[New Edit Mode] #480 do not show locator for sub objects

[New Edit Mode] Modified persistence in SaveAction

Removed redundant variable

Fixed Failing Test

Fixed JSLint errors

Improved some documentation
This commit is contained in:
Henry
2016-01-20 20:52:26 -08:00
parent c65096f166
commit cd2b19eb1e
9 changed files with 75 additions and 28 deletions

View File

@@ -22,7 +22,7 @@
/*global define,Promise*/
/**
* Module defining CreateAction. Created by vwoeltje on 11/10/14.
* Module defining AddAction. Created by ahenry on 01/21/16.
*/
define(
[
@@ -66,9 +66,14 @@ define(
this.dialogService = dialogService;
this.policyService = policyService;
}
/**
*
* Create a new object of the given type.
* This will prompt for user input first.
*
* @returns {Promise} that will be resolved with the object that the
* action was originally invoked on (ie. the 'parent')
*/
AddAction.prototype.perform = function () {
var newModel = this.type.getInitialModel(),
@@ -106,10 +111,10 @@ define(
}
return this.dialogService
.getUserInput(wizard.getFormStructure(), wizard.getInitialFormValue())
.getUserInput(wizard.getFormStructure(false), wizard.getInitialFormValue())
.then(populateObjectFromInput)
.then(save)
.then(addToParent)
.then(addToParent);
};