You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by sr...@apache.org on 2015/04/01 13:10:31 UTC

[04/21] falcon git commit: FALCON-790 Falcon UI to enable entity/process/feed edits and management. Contributed by Armando Reyna/Kenneth Ho

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/cluster/cluster-moduleSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/cluster/cluster-moduleSpec.js b/falcon-ui/app/test/controllers/cluster/cluster-moduleSpec.js
new file mode 100644
index 0000000..dfe4d39
--- /dev/null
+++ b/falcon-ui/app/test/controllers/cluster/cluster-moduleSpec.js
@@ -0,0 +1,336 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var q,
+      scope,
+      controller,
+      falconServiceMock = jasmine.createSpyObj('Falcon', ['getEntities', 'getEntityDefinition']),
+      x2jsServiceMock = jasmine.createSpyObj('X2jsService', ['xml_str2json', 'json2xml_str']),
+      stateMock = jasmine.createSpyObj('state', ['go']),
+      entityModelArrangeMock = jasmine.createSpyObj('EntityModel', ['arrangeFieldsOrder']),
+      entityModel = {clusterModel : 
+        {cluster:{tags: "",interfaces:{interface:[
+            {_type:"readonly",_endpoint:"hftp://sandbox.hortonworks.com:50070",_version:"2.2.0"},
+            {_type:"write",_endpoint:"hdfs://sandbox.hortonworks.com:8020",_version:"2.2.0"},
+            {_type:"execute",_endpoint:"sandbox.hortonworks.com:8050",_version:"2.2.0"},
+            {_type:"workflow",_endpoint:"http://sandbox.hortonworks.com:11000/oozie/",_version:"4.0.0"},
+            {_type:"messaging",_endpoint:"tcp://sandbox.hortonworks.com:61616?daemon=true",_version:"5.1.6"}
+          ]},locations:{location:[{_name: "staging", _path: ""},{_name: "temp", _path: ""},{_name: "working", _path: ""}]},
+          ACL: {_owner: "",_group: "",_permission: ""},properties: {property: [{ _name: "", _value: ""}]},
+          _xmlns:"uri:falcon:cluster:0.1",_name:"",_description:"",_colo:""},
+      }},
+      validationService,
+      backupRegistryObject;
+
+  describe('ClusterFormCtrl', function () {
+
+    beforeEach(function () {
+      module('app.controllers.cluster');
+      module('app.services.validation');
+    });
+
+    beforeEach(inject(function($q, $rootScope, $controller, ValidationService) {
+      q = $q;
+      validationService = ValidationService;
+      var promise = {};
+      promise.success = function() {return {error: function() {}}};
+
+      scope = $rootScope.$new();
+   
+      controller = $controller('ClusterFormCtrl', { 
+        $scope: scope,
+        Falcon: falconServiceMock,
+        EntityModel: entityModel,
+        $state: stateMock,
+        X2jsService: x2jsServiceMock,
+        validationService:ValidationService
+      });
+      //
+    }));
+
+    describe('initialize', function() {       
+      it('Should initialize $scope variables', function() {
+        scope.clusterEntity.cluster = scope.clusterEntity.clusterModel.cluster;      
+        expect(scope.clusterEntity.clusterModel).toBeDefined();       
+        expect(scope.clusterEntity.clusterModel.cluster.tags).toEqual("");        
+        expect(scope.clusterEntity.clusterModel.cluster).toEqual(scope.clusterEntity.clusterModel.cluster);        
+        expect(scope.secondStep).toEqual(false);
+        expect(scope.clusterEntity.clusterModel.cluster.properties.property).toEqual([{ _name: "", _value: ""}]);
+        
+        expect(scope.registry).toEqual({ check: false });
+        expect(scope.registry).toEqual({ check: false });
+      });      
+    });
+    describe('tags', function() {      
+      describe('$scope.addTag', function() {       
+        it('should init with one empty tag in tagsArray', function() {              
+          expect(scope.tagsArray.length).toEqual(1);         
+          expect(scope.tagsArray).toEqual([{key: null, value: null}]);             
+          scope.addTag();
+          expect(scope.tagsArray.length).toEqual(2);
+          expect(scope.tagsArray).toEqual([{key: null, value: null}, {key: null, value: null}]);             
+        });
+           
+      });
+      describe('$scope.convertTags', function() {       
+        it('should convert correctly each pair of tags on each add', function() { 
+          scope.tagsArray =[{key: 'something', value: 'here'}, {key: 'another', value: 'here'}];      
+          scope.convertTags();
+          expect(scope.clusterEntity.clusterModel.cluster.tags).toEqual("something=here,another=here");       
+          scope.tagsArray =[{key: 'something', value: 'here'}, {key: 'another', value: 'here'}, {key: 'third', value: 'tag'}]; 
+          scope.convertTags(); 
+          expect(scope.clusterEntity.clusterModel.cluster.tags).toEqual("something=here,another=here,third=tag");           
+        });        
+      });
+      describe('$scope.splitTags', function() {       
+        it('should split correctly the string in pair of tags', function() { 
+          scope.clusterEntity.clusterModel.cluster.tags = 'some=tag';         
+          scope.splitTags();
+          expect(scope.tagsArray).toEqual([{key: 'some', value: 'tag'}]); 
+          
+          scope.clusterEntity.clusterModel.cluster.tags = 'some=tag,another=tag,third=value';         
+          scope.splitTags();
+          expect(scope.tagsArray).toEqual([{key: 'some', value: 'tag'},{key: 'another', value: 'tag'},{key: 'third', value: 'value'}]);                        
+        });        
+      });
+      describe('scope.removeTags', function() {       
+        it('should ignore if empty or if undefined, string or null also if index doesnt exists in array', function() {            
+          scope.tagsArray = [{key: "first", value: "value"}, {key: "second", value: "value"}];                          
+          scope.removeTag();
+          scope.removeTag("string");
+          scope.removeTag(null);
+          scope.removeTag(undefined);
+          scope.removeTag(10);
+          scope.removeTag(4);
+          scope.removeTag(100);
+          expect(scope.tagsArray).toEqual([{key: "first", value: "value"}, {key: "second", value: "value"}]);                   
+        });
+        it('should remove correct tags by index', function() {              
+          scope.tagsArray = [{key: "first", value: "value"}, {key: "second", value: "value"}, {key: "third", value: "value"}, {key: "fourth", value: "value"}];                
+          scope.removeTag(1);
+          expect(scope.tagsArray).toEqual([{key: "first", value: "value"}, {key: "third", value: "value"}, {key: "fourth", value: "value"}]);          
+          scope.removeTag(2);
+          expect(scope.tagsArray).toEqual([{key: "first", value: "value"}, {key: "third", value: "value"}]);
+          scope.removeTag(0);
+          expect(scope.tagsArray).toEqual([{key: "third", value: "value"}]);       
+        });   
+      });      
+    });
+    describe('locations', function() { 
+      describe('initialization', function() {       
+        it('should init with default locations and correct values', function() {           
+
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual(
+            [{ _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, { _name : 'working', _path : '' }, { _name : '', _path : '' }]
+          );
+        });   
+      });    
+      describe('$scope.addLocation', function() {       
+        it('$scope.addLocation should add locations', function() {       
+          scope.clusterEntity.clusterModel.cluster.locations.location = [{ _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, { _name : 'working', _path : '' }, { _name : 'something', _path : 'here' }];
+          
+          scope.addLocation();
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual([ 
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, {_name:"something", _path: "here"}, {_name:"", _path: ""}]);
+        });  
+        it('$scope.addLocation should ignore if _name or _location in newLocation are empty', function() {       
+          scope.clusterEntity.clusterModel.cluster.locations.location = [{ _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, { _name : 'working', _path : '' }, { _name : 'something', _path : 'here' }, {_name:"", _path: ""}];         
+          scope.addLocation();
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual([ 
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, {_name:"something", _path: "here"}, {_name:"", _path: ""}]);
+          
+          scope.clusterEntity.clusterModel.cluster.locations.location = [{ _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, { _name : 'working', _path : '' }, { _name : 'something', _path : 'here' }, {_name:"noPath", _path: ""}];
+          scope.addLocation();
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual([ 
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, {_name:"something", _path: "here"}, {_name:"noPath", _path: ""}]);     
+        });    
+      });      
+      describe('$scope.removeLocation', function() {       
+        it('$scope.removeLocation should remove locations', function() {   
+          scope.clusterEntity.clusterModel.cluster.locations.location = [
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, { _name : 'something', _path : 'here' }, {_name:"noPath", _path: ""}
+          ];
+              
+          scope.removeLocation(3);                  
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual([ 
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, {_name:"noPath", _path: ""}]);     
+        });   
+        it('$scope.removeLocation should not remove if empty or default values', function() {       
+          //default values cant be removed as the delete button doesnt appears if one of them due to ng-if in template, so no testing here
+          scope.removeLocation();
+          scope.removeLocation("string");
+          scope.removeLocation(null);
+          scope.removeLocation(undefined);
+          scope.removeLocation(10);
+          scope.removeLocation(4);          
+          expect(scope.clusterEntity.clusterModel.cluster.locations.location).toEqual([ 
+            { _name : 'staging', _path : '' }, { _name : 'temp', _path : '' }, 
+            { _name : 'working', _path : '' }, {_name:"noPath", _path: ""}]);      
+        });    
+      });     
+    });  
+    describe('properties', function() {  
+      describe('initialization', function() {       
+        it('should init with default properties and correct values', function() {    
+          expect(scope.clusterEntity.clusterModel.cluster.properties.property).toNotBe(undefined);       
+          expect(scope.clusterEntity.clusterModel.cluster.properties.property[0]).toEqual({ _name: "", _value: ""});         
+        });   
+      });   
+      describe('$scope.addProperty', function() {      
+        it('$scope.addProperty should not add if values are empty or are not valid', function() {
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: "", _value: ""}];
+          scope.addProperty();         
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: "something", _value: ""}];
+          scope.addProperty();        
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: "", _value: "something"}];
+          scope.addProperty();      
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: null, _value: "something"}];
+          scope.addProperty(); 
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: "something", _value: undefined}];
+          scope.addProperty();       
+          expect(scope.clusterEntity.clusterModel.cluster.properties.property.length).toEqual(1);
+        });         
+        it('$scope.addProperty should add correct values', function() { 
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name: "name1", _value: "value1"}];      
+   
+          scope.addProperty();            
+                   
+          expect(scope.clusterEntity.clusterModel.cluster.properties.property).toEqual([{ _name: "name1", _value: "value1"}, { _name: "", _value: ""}]);
+        });   
+      });   
+      describe('$scope.removeProperty', function() {      
+        it('should not remove if called with invalid arguments', function() {
+          scope.removeProperty();
+          scope.removeProperty(-10);
+          scope.removeProperty(5);
+          scope.removeProperty(1543);
+          scope.removeProperty("string");
+          scope.removeProperty(null);
+          scope.removeProperty(undefined);
+          expect(scope.clusterEntity.clusterModel.cluster.properties.property).toEqual([{ _name: "name1", _value: "value1"}, { _name: "", _value: ""}]);     
+        });         
+        it('should remove correct values', function() {       
+           scope.removeProperty(1);
+           expect(scope.clusterEntity.clusterModel.cluster.properties.property).toEqual([{ _name: "name1", _value: "value1"}]);
+           
+        });   
+      });     
+    });     
+    describe('goSummaryStep', function() {
+
+      describe('$scope.goSummaryStep', function() {
+
+        it('should activate second step flag', function() {
+          scope.validations = validationService;
+          scope.goSummaryStep(); 
+          expect(scope.secondStep).toBe(true);
+        }); 
+        it('should not call x2jsService yet', function() {
+          scope.validations = validationService;
+          scope.goSummaryStep(); 
+          expect(x2jsServiceMock.json2xml_str).not.toHaveBeenCalled(); 
+        }); 
+      });
+      describe('private cleanModel()', function() {
+        it('should delete tags if empty and leave them if not', function() {
+          scope.validations = validationService;
+          scope.clusterEntity.clusterModel.cluster.tags = "";    
+          expect(scope.clusterEntity.clusterModel.cluster.tags).toEqual("");                 
+          scope.goSummaryStep(); 
+          expect(scope.clusterEntity.clusterModel.cluster.tags).toBe(undefined);   
+          
+        });  
+        it('should delete registry interface only if not checked', function() {
+          scope.validations = validationService;
+          scope.clusterEntity.clusterModel.cluster.tags = ""; 
+          expect(scope.registry.check).toBe(true);
+          expect(scope.clusterEntity.clusterModel.cluster.interfaces.interface.length).toEqual(6); 
+          expect(scope.clusterEntity.clusterModel.cluster.interfaces.interface[5]).toEqual({ _type : 'registry', _endpoint : '', _version : '' });         
+          scope.goSummaryStep();  
+          expect(scope.clusterEntity.clusterModel.cluster.interfaces.interface[5]).toEqual({ _type : 'registry', _endpoint : '', _version : '' }); 
+          scope.registry.check = false;
+          scope.clusterEntity.clusterModel.cluster.ACL = { _owner : '', _group : '', _permission : '' };
+          scope.clusterEntity.clusterModel.cluster.tags = ""; 
+          scope.goSummaryStep();  
+          expect(scope.clusterEntity.clusterModel.cluster.interfaces.interface[5]).toBeUndefined(); 
+          expect(scope.clusterEntity.clusterModel.cluster.interfaces.interface.length).toEqual(5);                       
+        }); 
+        
+        it('should delete properties if empty and leave them if not', function() {
+          scope.validations = validationService;
+          scope.clusterEntity.clusterModel.cluster.properties.property=[{ _name : '', _value : '' }];          
+          scope.goSummaryStep(); 
+          expect(scope.clusterEntity.clusterModel.cluster.properties).toBe(undefined);      
+        });  
+        it('should delete ACL if empty and leave them if not', function() {
+          scope.validations = validationService;
+          expect(scope.clusterEntity.clusterModel.cluster.ACL).toEqual({ _owner : '', _group : '', _permission : '' }); 
+          scope.goSummaryStep();      
+          expect(scope.clusterEntity.clusterModel.cluster.ACL).toEqual(undefined);                  
+        }); 
+        it('should move properties to be the last if coexists with ACL', function() {
+          scope.validations = validationService;
+          function testACLandPropertiesOrder() {
+            var i;
+            for (i in scope.clusterEntity.clusterModel.cluster) { //first one out
+              if(i === "ACL"){ return true; }
+              if(i === "properties"){return false;}  
+            };
+          }
+          delete scope.clusterEntity.clusterModel.cluster.properties;
+          delete scope.clusterEntity.clusterModel.cluster.ACL;
+          scope.clusterEntity.clusterModel.cluster.properties = {};
+          scope.clusterEntity.clusterModel.cluster.properties.property = [{ _name : '2nd', _value : '2nd' }];  
+          scope.clusterEntity.clusterModel.cluster.ACL = { _owner : 'this', _group : 'that', _permission : '0755' }; 
+          expect(testACLandPropertiesOrder()).toEqual(false); 
+          scope.goSummaryStep();             
+          expect(scope.clusterEntity.clusterModel.cluster).toEqual(jasmine.objectContaining({ACL:{ _owner : 'this', _group : 'that', _permission : '0755' }}));
+          expect(scope.clusterEntity.clusterModel.cluster.properties).toEqual(jasmine.objectContaining({property:[{ _name : '2nd', _value : '2nd' }]}));
+          expect(testACLandPropertiesOrder()).toBe(true);                  
+        });   
+      });
+      describe('$scope.jsonString', function() {
+        it('should transform the json string to show in the preview', function() {
+          scope.validations = validationService;
+          expect(scope.jsonString).toEqual(undefined);
+          scope.goSummaryStep(); 
+          expect(scope.jsonString).toEqual(undefined);
+        });   
+      });
+    });
+    
+    describe('$scope.xmlPreview.editXML', function() {
+      it('should toggle the attribute variable', function() {       
+        expect(scope.xmlPreview.edit).toBe(false);
+        scope.xmlPreview.editXML(); 
+        expect(scope.xmlPreview.edit).toBe(true);
+        scope.xmlPreview.editXML(); 
+        expect(scope.xmlPreview.edit).toBe(false);
+      });   
+      
+      
+    });
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/entity/EntityRootControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/entity/EntityRootControllerSpec.js b/falcon-ui/app/test/controllers/entity/EntityRootControllerSpec.js
new file mode 100644
index 0000000..750a082
--- /dev/null
+++ b/falcon-ui/app/test/controllers/entity/EntityRootControllerSpec.js
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+  var controllerProvider;
+  var entityFactoryMock;
+  var serializerMock;
+
+  describe('EntityRootCtrl', function () {
+
+    beforeEach(module('app.controllers.entity'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.models = {};
+      controllerProvider = $controller;
+      entityFactoryMock = jasmine.createSpyObj('EntityFactory', ['newEntity']);
+      serializerMock = jasmine.createSpyObj('EntitySerializer', ['preDeserialize']);
+
+
+      controller = $controller('EntityRootCtrl', {
+        $scope: scope,
+        $state: {
+          $current: {
+            name: 'forms.feed.general'
+          },
+          go: angular.noop
+        }
+      });
+    }));
+
+
+    describe('toggleEditXml', function() {
+      it('Should toggle editXmlDisable value to true', function() {
+        scope.editXmlDisabled = false;
+
+        scope.toggleEditXml();
+
+        expect(scope.editXmlDisabled).toBe(true);
+      });
+    });
+
+
+    describe('baseInit', function() {
+      it('Should be initialized properly', function() {
+        scope.baseInit();
+
+        expect(scope.editXmlDisabled).toBe(true);
+      });
+    });
+
+
+    it('Should capitalize properly', function() {
+      expect(scope.capitalize('hello')).toBe('Hello');
+    });
+
+
+    describe('cancel', function() {
+      it('Should clear the feed from the scope when cancelling', function() {
+        scope.entityType = 'feed';
+        scope.feed = {};
+
+        scope.cancel();
+
+        expect(scope.feed).toBe(null);
+      });
+
+    });
+
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/feed/FeedGeneralInformationControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedGeneralInformationControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedGeneralInformationControllerSpec.js
new file mode 100644
index 0000000..34c39cb
--- /dev/null
+++ b/falcon-ui/app/test/controllers/feed/FeedGeneralInformationControllerSpec.js
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+
+  describe('FeedGeneralInformationController', function () {
+    beforeEach(module('app.controllers.feed'));
+
+    beforeEach(inject(function($q, $rootScope, $controller, $filter) {
+      scope = $rootScope.$new();
+      scope.feed = {
+        tags: [{key: null, value: null}]
+      };
+
+      controller = $controller('FeedGeneralInformationController', {
+        $scope: scope,
+        $state: {},
+        $filter: $filter
+      });
+    }));
+
+
+    it('Should add a new empty tag', function() {
+      expect(scope.feed.tags.length).toEqual(1);
+
+      scope.addTag();
+
+      expect(scope.feed.tags.length).toEqual(2);
+      expect(scope.feed.tags[1]).toEqual({key: null, value: null});
+    });
+
+    it('Should remove a tag at the specified index', function() {
+      scope.feed.tags = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'},
+        {key: 'key2', value: 'value2'}
+      ];
+
+      scope.removeTag(1);
+
+      expect(scope.feed.tags.length).toEqual(2);
+      expect(scope.feed.tags).toEqual([{key: 'key0', value: 'value0'}, {key: 'key2', value: 'value2'}]);
+    });
+
+    it('Should not delete if there is only one element', function() {
+      scope.feed.tags = [{key: 'key', value: 'value'}];
+
+      scope.removeTag(0);
+
+      expect(scope.feed.tags).toEqual([{key: 'key', value: 'value'}]);
+    });
+
+    it('Should not delete if index is not passed in', function() {
+      scope.feed.tags = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'}
+      ];
+
+      scope.removeTag();
+
+      expect(scope.feed.tags).toEqual([{key: 'key0', value: 'value0'}, {key: 'key1', value: 'value1'}]);
+    });
+  })
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
new file mode 100644
index 0000000..8c584af
--- /dev/null
+++ b/falcon-ui/app/test/controllers/feed/FeedLocationControllerSpec.js
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('FeedLocationController', function () {
+    beforeEach(module('app.controllers.feed'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.feed = {
+       storage: {
+         fileSystem: {
+           active: true,
+           locations: [
+             {type: 'data', path: '/'},
+             {type: 'stats', path: '/'},
+             {type: 'meta', path: '/'}
+           ]
+         },
+         catalog: {
+           active: false,
+           catalogTable: {
+             uri: null
+           }
+         }
+       }
+      };
+
+      controller = $controller('FeedLocationController', {
+        $scope: scope,
+        $state: {}
+      });
+    }));
+
+    it('Should toggle the default selected storage from file system to catalog', function() {
+      scope.toggleStorage();
+
+      expect(scope.feed.storage.catalog.active).toBe(true);
+      expect(scope.feed.storage.fileSystem.active).toBe(false);
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/feed/FeedPropertiesControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedPropertiesControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedPropertiesControllerSpec.js
new file mode 100644
index 0000000..5a0160c
--- /dev/null
+++ b/falcon-ui/app/test/controllers/feed/FeedPropertiesControllerSpec.js
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('FeedPropertiesController', function () {
+    beforeEach(module('app.controllers.feed'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.feed = {
+        customProperties: [{key: null, value: null}]
+      };
+
+      controller = $controller('FeedPropertiesController', {
+        $scope: scope,
+        $state: {}
+      });
+    }));
+
+    it('Should add a new empty property', function() {
+      expect(scope.feed.customProperties.length).toEqual(1);
+
+      scope.addCustomProperty();
+
+      expect(scope.feed.customProperties.length).toEqual(2);
+      expect(scope.feed.customProperties[1]).toEqual({key: null, value: null});
+    });
+
+    it('Should remove a property at the specified index', function() {
+      scope.feed.customProperties = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'},
+        {key: 'key2', value: 'value2'}
+      ];
+
+      scope.removeCustomProperty(1);
+
+      expect(scope.feed.customProperties.length).toEqual(2);
+      expect(scope.feed.customProperties).toEqual([{key: 'key0', value: 'value0'}, {key: 'key2', value: 'value2'}]);
+    });
+
+    it('Should not delete if there is only one element', function() {
+      scope.feed.customProperties = [{key: 'key', value: 'value'}];
+
+      scope.removeCustomProperty(0);
+
+      expect(scope.feed.customProperties).toEqual([{key: 'key', value: 'value'}]);
+    });
+
+    it('Should not delete if index is not passed in', function() {
+      scope.feed.customProperties = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'}
+      ];
+
+      scope.removeCustomProperty();
+
+      expect(scope.feed.customProperties).toEqual([{key: 'key0', value: 'value0'}, {key: 'key1', value: 'value1'}]);
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js b/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
new file mode 100644
index 0000000..d6f76b6
--- /dev/null
+++ b/falcon-ui/app/test/controllers/feed/FeedRootCtrlSpec.js
@@ -0,0 +1,181 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('FeedRootCtrl', function () {
+    var entityFactoryMock;
+    var serializerMock;
+    var controllerProvider;
+    var falconServiceMock;
+
+    beforeEach(module('app.controllers.feed'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.models = {};
+      entityFactoryMock = jasmine.createSpyObj('EntityFactory', ['newEntity']);
+      serializerMock = jasmine.createSpyObj('EntitySerializer', ['preDeserialize']);
+      falconServiceMock = jasmine.createSpyObj('Falcon', ['postUpdateEntity', 'postSubmitEntity', 'logRequest', 'logResponse']);
+      controllerProvider = $controller;
+
+      controller = $controller('FeedController', {
+        $scope: scope,
+        $state: {
+          $current:{
+            name: 'main.forms.feed.general'
+          },
+          go: angular.noop
+        },
+        Falcon: falconServiceMock
+      });
+    }));
+
+    it('Should be of type feed', function() {
+      expect(scope.entityType).toBe('feed');
+    });
+
+    describe('init', function() {
+      it('Should be initialized properly', function() {
+
+        scope.init();
+
+        expect(scope.feed.name).toBe("");
+        expect(scope.feed.description).toBe(null);
+        expect(scope.feed.groups).toBe(null);
+      });
+    });
+
+    it('Should return true when the current state is the general view', function() {
+      expect(scope.isActive('main.forms.feed.general')).toBe(true);
+    });
+
+    it('Should return true when the current state is not the general view', function() {
+      expect(scope.isActive('main.forms.feed.location')).toBe(false);
+    });
+
+
+    describe('loadOrCreateEntity()', function() {
+      it('Should deserialize the entity if the xml is found on the scope', function() {
+
+        controller = createController();
+        var createdFeed =  {};
+        var deserialzedFeed =  {};
+        var feedModel = {name: 'FeedName'};
+        
+        
+        serializerMock.preDeserialize.andReturn(deserialzedFeed);
+        entityFactoryMock.newEntity.andReturn(createdFeed);
+        scope.models.feedModel = feedModel;
+
+        var feed = scope.loadOrCreateEntity();
+
+        expect(serializerMock.preDeserialize).toHaveBeenCalledWith(feedModel, 'feed');
+        expect(feed).toNotBe(createdFeed);
+        expect(feed).toBe(deserialzedFeed);
+      });
+
+      it('Should not deserialize the entity if the xml is not found on the scope', function() {
+        controller = createController();
+        var createdFeed =  {};
+        var deserialzedFeed =  {};
+        serializerMock.preDeserialize.andReturn(deserialzedFeed);
+        entityFactoryMock.newEntity.andReturn(createdFeed);
+
+
+        var feed = scope.loadOrCreateEntity();
+
+        expect(serializerMock.preDeserialize).not.toHaveBeenCalled();
+        expect(feed).toBe(createdFeed);
+        expect(feed).toNotBe(deserialzedFeed);
+      });
+
+      it('Should clear the feedModel from the scope', function() {
+        controller = createController();
+        entityFactoryMock.newEntity.andReturn({});
+        scope.models.feedModel = {};
+
+        scope.loadOrCreateEntity();
+
+        expect(scope.models.feedModel).toBe(null);
+      });
+
+
+    });
+
+    describe('saveEntity', function() {
+      it('Should save the update the entity if in edit mode', function() {
+        falconServiceMock.postUpdateEntity.andReturn(successResponse({}));
+        scope.editingMode = true;//i think this one should be deprecated, because it doesnt work in the real app, just in the tests
+        scope.cloningMode = false;
+        scope.feed = { name:  'FeedOne'};
+        scope.xml = '<feed/>';
+        
+        scope.saveEntity();
+
+        expect(scope.editingMode).toBe(false);
+        expect(falconServiceMock.postSubmitEntity).not.toHaveBeenCalled();
+        expect(falconServiceMock.postUpdateEntity).toHaveBeenCalledWith('<feed/>', 'feed', 'FeedOne');
+      });
+
+      it('Should save the update the entity if in cloning mode', function() {
+        falconServiceMock.postSubmitEntity.andReturn(successResponse({}));
+        scope.cloningMode = true;//i think this one should be deprecated, because it doesnt work in the real app, just in the tests
+        scope.feed = { name:  'FeedOne'};
+        scope.xml = '<feed/>';
+        scope.$parent.cloningMode = true;
+        
+        scope.saveEntity();
+
+        expect(scope.cloningMode).toBe(false);
+        expect(falconServiceMock.postSubmitEntity).toHaveBeenCalledWith('<feed/>', 'feed');
+        expect(falconServiceMock.postUpdateEntity).not.toHaveBeenCalled();
+      });
+
+    });
+
+    function createController() {
+      return controllerProvider('FeedController', {
+        $scope: scope,
+        $state: {
+          $current:{
+            name: 'main.forms.feed.general'
+          },
+          go: angular.noop
+        },
+        Falcon: {},
+        EntityFactory: entityFactoryMock,
+        EntitySerializer: serializerMock
+      });
+    }
+
+    function successResponse(value) {
+      var fakePromise = {};
+      fakePromise.success = function(callback) {
+        callback(value);
+        return fakePromise;
+      };
+      fakePromise.error = angular.noop;
+      return fakePromise;
+    }
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js b/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
new file mode 100644
index 0000000..90d3fb9
--- /dev/null
+++ b/falcon-ui/app/test/controllers/feed/FeedSummaryControllerSpec.js
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('FeedSummaryController', function () {
+    beforeEach(module('app.controllers.feed'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.feed = {};
+
+      controller = $controller('FeedSummaryController', {
+        $scope: scope,
+        $state: {}
+      });
+    }));
+
+
+    it('Should return false when there are no tags on the feed', function() {
+      scope.feed.tags = [];
+
+      expect(scope.hasTags()).toBe(false);
+    });
+
+    it('Should return false when there are with empty keys on the feed', function() {
+      scope.feed.tags = [{key: null, value: null}];
+
+      expect(scope.hasTags()).toBe(false);
+    });
+
+
+    it('Should return "Not specified if not present" if empty string', function() {
+      expect(scope.optional('')).toBe('Not specified');
+    });
+
+    it('Should return "Not specified if not present" if empty string', function() {
+      expect(scope.optional()).toBe('Not specified');
+    });
+
+    it('Should return the specified value if the expression is true', function() {
+      expect(scope.optional(true, 'Up 2 hours')).toBe('Up 2 hours');
+    });
+
+    it('Should return "Not specified if the expression is false', function() {
+      expect(scope.optional(false, 'Up 2 hours')).toBe('Not specified');
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
new file mode 100644
index 0000000..7273fbf
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessClustersCtrlSpec.js
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('ProcessClustersCtrl', function () {
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.process = {};
+      controller = $controller('ProcessClustersCtrl', {
+        $scope: scope,
+        clustersList: []
+      });
+    }));
+
+    describe('init', function() {
+      it('Should add date format', function() {
+        scope.init();
+
+        expect(scope.dateFormat).toBe('dd-MMMM-yyyy');
+      });
+    });
+
+    describe('openDatePicker', function() {
+      it('Should set the container opened property to true', function() {
+        var eventMock = {
+          preventDefault: angular.noop,
+          stopPropagation: angular.noop
+        };
+        var container = {
+          opened: false
+        };
+
+        scope.openDatePicker(eventMock, container);
+
+        expect(scope.dateFormat).toBe('dd-MMMM-yyyy');
+      });
+    });
+
+    describe('addCluster', function() {
+
+      it('Should add a new empty cluster', function() {
+        scope.process.clusters = [{}];
+
+        scope.addCluster();
+
+        expect(scope.process.clusters.length).toEqual(2);
+      });
+    });
+
+    describe('removeCluster', function() {
+      it('Should remove a cluster at the specified index', function() {
+        scope.process.clusters = [
+          {name: 'cluster1'},
+          {name: 'cluster2'},
+          {name: 'cluster3'}
+        ];
+
+        scope.removeCluster(1);
+
+        expect(scope.process.clusters.length).toEqual(2);
+        expect(scope.process.clusters).toEqual([{name: 'cluster1'}, {name: 'cluster3'}]);
+      });
+
+      it('Should not delete if there is only one element', function() {
+        scope.process.clusters = [{name: 'cluster1'}];
+
+        scope.removeCluster(0);
+
+        expect(scope.process.clusters).toEqual([{name: 'cluster1'}]);
+      });
+
+      it('Should not delete if index is not passed in', function() {
+        scope.process.clusters= [
+          {name: 'cluster1'},
+          {name: 'cluster2'}
+        ];
+
+        scope.removeCluster();
+
+        expect(scope.process.clusters).toEqual([{name: 'cluster1'}, {name: 'cluster2'}]);
+      });
+
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
new file mode 100644
index 0000000..6008456
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessGeneralInformationCtrlSpec.js
@@ -0,0 +1,111 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+
+  describe('ProcessGeneralInformationCtrl', function () {
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.entityType = 'process';
+      scope.process = {
+        tags: [{key: null, value: null}]
+      };
+
+      controller = $controller('ProcessGeneralInformationCtrl', {
+        $scope: scope
+      });
+    }));
+
+
+    it('Should add a new empty tag', function() {
+      expect(scope.process.tags.length).toEqual(1);
+
+      scope.addTag();
+
+      expect(scope.process.tags.length).toEqual(2);
+      expect(scope.process.tags[1]).toEqual({key: null, value: null});
+    });
+
+    it('Should remove a tag at the specified index', function() {
+      scope.process.tags = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'},
+        {key: 'key2', value: 'value2'}
+      ];
+
+      scope.removeTag(1);
+
+      expect(scope.process.tags.length).toEqual(2);
+      expect(scope.process.tags).toEqual([{key: 'key0', value: 'value0'}, {key: 'key2', value: 'value2'}]);
+    });
+
+    it('Should not delete if there is only one element', function() {
+      scope.process.tags = [{key: 'key', value: 'value'}];
+
+      scope.removeTag(0);
+
+      expect(scope.process.tags).toEqual([{key: 'key', value: 'value'}]);
+    });
+
+    it('Should not delete if index is not passed in', function() {
+      scope.process.tags = [
+        {key: 'key0', value: 'value0'},
+        {key: 'key1', value: 'value1'}
+      ];
+
+      scope.removeTag();
+
+      expect(scope.process.tags).toEqual([{key: 'key0', value: 'value0'}, {key: 'key1', value: 'value1'}]);
+    });
+  })
+
+  describe('Versions', function() {
+    it('Should display the oozie versions when oozie workflow is selected', function() {
+      var expectedVersions = ['3.1.3-incubating', '3.2.0-incubating', '3.3.0', '3.3.1', '3.3.2', '4.0.0', '4.0.1'];
+      scope.process.workflow = {engine: 'oozie'};
+
+      scope.selectWorkflow();
+
+      expect(scope.versions).toEqual(expectedVersions);
+    });
+
+    it('Should display the pig versions when pig workflow is selected', function() {
+      var expectedVersions = ['pig-0.10.0', 'pig-0.10.1', 'pig-0.11.0', 'pig-0.11.1', 'pig-0.12.0', 'pig-0.12.1', 'pig-0.13.0', 'pig-0.8.0', 'pig-0.8.1', ' pig-0.9.0', ' pig-0.9.1', 'pig-0.9.2'];
+      scope.process.workflow = {engine: 'pig'};
+
+      scope.selectWorkflow();
+
+      expect(scope.versions).toEqual(expectedVersions);
+    });
+
+    it('Should display the hive versions when hive workflow is selected', function() {
+      var expectedVersions = ['hive-0.10.0', 'hive-0.11.0', 'hive-0.12.0', 'hive-0.13.0', 'hive-0.13.1', 'hive-0.6.0', 'hive-0.7.0', 'hive-0.8.0', 'hive-0.8.1', 'hive-0.9.0'];
+      scope.process.workflow = {engine: 'hive'};
+
+      scope.selectWorkflow();
+
+      expect(scope.versions).toEqual(expectedVersions);
+    });
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessInputsAndOutputsCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessInputsAndOutputsCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessInputsAndOutputsCtrlSpec.js
new file mode 100644
index 0000000..a20a37a
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessInputsAndOutputsCtrlSpec.js
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('ProcessInputsAndOutputsCtrl', function () {
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.process = {
+        inputs: []
+      };
+      controller = $controller('ProcessInputsAndOutputsCtrl', {
+        $scope: scope,
+        feedsList: []
+      });
+    }));
+
+
+    describe('addInput', function() {
+
+      it('Should add a new empty input', function() {
+        expect(scope.process.inputs.length).toEqual(0);
+
+        scope.addInput();
+
+        expect(scope.process.inputs.length).toEqual(1);
+      });
+
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessPropertiesControllerSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessPropertiesControllerSpec.js b/falcon-ui/app/test/controllers/process/ProcessPropertiesControllerSpec.js
new file mode 100644
index 0000000..91364b5
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessPropertiesControllerSpec.js
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+
+  describe('ProcessPropertiesCtrl', function () {
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+
+      controller = $controller('ProcessPropertiesCtrl', {
+        $scope: scope,
+        $state: {}
+      });
+    }));
+
+    describe('Desc', function() {
+
+      it('Should', function() {
+      });
+
+    });
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
new file mode 100644
index 0000000..78cf26a
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessRootCtrlSpec.js
@@ -0,0 +1,136 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope;
+  var controller;
+  var controllerProvider;
+  var entityFactoryMock;
+  var serializerMock;
+
+  describe('ProcessRootCtrl', function () {
+
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      scope = $rootScope.$new();
+      scope.models = {};
+      controllerProvider = $controller;
+      entityFactoryMock = jasmine.createSpyObj('EntityFactory', ['newEntity']);
+      serializerMock = jasmine.createSpyObj('EntitySerializer', ['preDeserialize']);
+
+      controller = $controller('ProcessRootCtrl', {
+        $scope: scope,
+        $state: {
+          $current:{
+            name: 'forms.process.general'
+          },
+          go: angular.noop
+        },
+        EntityFactory: entityFactoryMock,
+        EntitySerializer: serializerMock
+      });
+    }));
+
+
+    it('Should be of type process', function() {
+      expect(scope.entityType).toBe('process');
+    });
+
+    it('Should be initialized properly', function() {
+      scope.init();
+
+      expect(scope.editXmlDisabled).toBe(true);
+    });
+
+    it('Should toggle editXmlDisable value to true', function() {
+      scope.editXmlDisabled = false;
+
+      scope.toggleEditXml();
+
+      expect(scope.editXmlDisabled).toBe(true);
+    });
+
+    it('Should return true when the current state is the general view', function() {
+      expect(scope.isActive('forms.process.general')).toBe(true);
+    });
+
+    it('Should return true when the current state is not the general view', function() {
+      expect(scope.isActive('forms.process.properties')).toBe(false);
+    });
+
+    it('Should deserialize the entity if the xml is found on the scope', function() {
+
+      controller = createController();
+      var createdProcess =  {};
+      var deserialzedProcess =  {};
+      var processModel = {name: 'ProcessName'};
+      serializerMock.preDeserialize.andReturn(deserialzedProcess);
+      entityFactoryMock.newEntity.andReturn(createdProcess);
+      scope.models.processModel = processModel;
+
+      var process = scope.loadOrCreateEntity();
+
+      expect(serializerMock.preDeserialize).toHaveBeenCalledWith(processModel, 'process');
+      expect(process).toNotBe(createdProcess);
+      expect(process).toBe(deserialzedProcess);
+    });
+
+    it('Should not deserialize the entity if the xml is not found on the scope', function() {
+      controller = createController();
+      var createdProcess =  {};
+      var deserialzedProcess =  {};
+      serializerMock.preDeserialize.andReturn(deserialzedProcess);
+      entityFactoryMock.newEntity.andReturn(createdProcess);
+
+      var process = scope.loadOrCreateEntity();
+
+      expect(serializerMock.preDeserialize).not.toHaveBeenCalled();
+      expect(process).toBe(createdProcess);
+      expect(process).toNotBe(deserialzedProcess);
+    });
+
+    it('Should clear the processModel from the scope', function() {
+      controller = createController();
+      entityFactoryMock.newEntity.andReturn({});
+      scope.models.processModel = {};
+
+      scope.loadOrCreateEntity();
+
+      expect(scope.models.processModel).toBe(null);
+    });
+
+
+  });
+
+  function createController() {
+    return controllerProvider('ProcessRootCtrl', {
+      $scope: scope,
+      $state: {
+        $current:{
+          name: 'forms.process.general'
+        },
+        go: angular.noop
+      },
+      EntityFactory: entityFactoryMock,
+      EntitySerializer: serializerMock
+    });
+  }
+
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js b/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
new file mode 100644
index 0000000..67990d9
--- /dev/null
+++ b/falcon-ui/app/test/controllers/process/ProcessSummaryCtrlSpec.js
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  var scope, controller, falconServiceMock;
+
+  describe('ProcessSummaryCtrl', function () {
+    beforeEach(module('app.controllers.process'));
+
+    beforeEach(inject(function($q, $rootScope, $controller) {
+      falconServiceMock = jasmine.createSpyObj('Falcon', ['postUpdateEntity', 'postSubmitEntity', 'logRequest', 'logResponse']);
+
+      scope = $rootScope.$new();
+      scope.process = {};
+      scope.entityType = 'process';
+      controller = $controller('ProcessSummaryCtrl', {
+        $scope: scope,
+        Falcon: falconServiceMock,
+        $state: {
+          $current:{
+            name: 'main.forms.feed.general'
+          },
+          go: angular.noop
+        }
+      });
+    }));
+
+
+    describe('saveEntity', function() {
+      it('Should save the update the entity if in edit mode', function() {
+        falconServiceMock.postUpdateEntity.andReturn(successResponse({}));
+        scope.editingMode = true;//---this line doesnt work
+        scope.$parent.cloningMode = false;
+        scope.process = { name:  'ProcessOne'};
+        scope.xml = '<process/>';
+
+        scope.saveEntity();
+
+        expect(scope.editingMode).toBe(false);
+        expect(falconServiceMock.postSubmitEntity).not.toHaveBeenCalled();
+        expect(falconServiceMock.postUpdateEntity).toHaveBeenCalledWith('<process/>', 'process', 'ProcessOne');
+      });
+
+      it('Should save the update the entity if in cloning mode', function() {
+        falconServiceMock.postSubmitEntity.andReturn(successResponse({}));
+        scope.cloningMode = true;//---this line doesnt work
+        scope.$parent.cloningMode = true;
+        scope.process = { name:  'ProcessOne'};
+        scope.xml = '<process/>';
+
+        scope.saveEntity();
+
+        expect(scope.cloningMode).toBe(false);
+        expect(falconServiceMock.postSubmitEntity).toHaveBeenCalledWith('<process/>', 'process');
+        expect(falconServiceMock.postUpdateEntity).not.toHaveBeenCalled();
+      });
+
+    });
+
+    function successResponse(value) {
+      var fakePromise = {};
+      fakePromise.success = function(callback) {
+        callback(value);
+        return fakePromise;
+      };
+      fakePromise.error = angular.noop;
+      return fakePromise;
+    }
+
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/directives/DirectivesSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/directives/DirectivesSpec.js b/falcon-ui/app/test/directives/DirectivesSpec.js
new file mode 100644
index 0000000..e21cb60
--- /dev/null
+++ b/falcon-ui/app/test/directives/DirectivesSpec.js
@@ -0,0 +1,134 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+  
+  describe('tagFilter used in entities list', function () {
+    beforeEach(module('app.directives'));
+ 
+    it('should adds empty tags if not normalized', inject(function (tagFilterFilter) {
+      expect(tagFilterFilter([{name:'ABCD'}])).toEqual([{name:'ABCD', list:{tag:[""]}}]);
+      expect(tagFilterFilter([{name:'ABCD', list:{}}])).toEqual([{name:'ABCD', list:{tag:[""]}}]); 
+      expect(tagFilterFilter([{name:'DEFG', list:[]}])).toEqual([{name:'DEFG', list:{tag:[""]}}]); 
+    }));
+    it('should not replace values if exists', inject(function (tagFilterFilter) {
+      expect(tagFilterFilter([{name:'ABCD', list:{tag:["TEST"]}}])).not.toEqual([{name:'ABCD', list:{tag:[""]}}]);
+      expect(tagFilterFilter([{name:'ABCD', list:{tag:["TEST"]}}])).toEqual([{name:'ABCD', list:{tag:["TEST"]}}]);
+    }));
+ 
+  });
+  
+  describe('Frequency Directive', function () {
+
+    var element, scope, compile, falconServiceMock, entitiesListController;
+    var windowMock, encoderServiceMock;
+
+    beforeEach(module('app.directives'));
+
+
+    beforeEach(inject(function($rootScope, $compile, $controller) {
+      falconServiceMock = jasmine.createSpyObj('Falcon', ['getEntityDefinition', 'logRequest', 'logResponse']);
+      encoderServiceMock = jasmine.createSpyObj('EncoderService', ['encode']);
+      windowMock = createWindowMock();
+
+      scope = $rootScope.$new();
+      compile = $compile;
+
+      entitiesListController = $controller('EntitiesListCtrl', {
+        $scope: scope,
+        Falcon: falconServiceMock,
+        EncodeService: encoderServiceMock,
+        $window: windowMock
+      });
+
+    }));
+    
+    it('Should render 2 hours', function() {
+      scope.someFrequency = {unit: 'hours', quantity: 2};
+      element = newElement('<frequency value="someFrequency" prefix="at"/>', scope);
+
+      expect(element.text()).toBe('at 2 hours');
+    });
+
+    it('Should render "Not specified"', function() {
+      scope.someFrequency = {unit: 'hours', quantity: null};
+      element = newElement('<frequency value="someFrequency"/>', scope);
+
+      expect(element.text()).toBe('Not specified');
+    });
+
+    describe('EntitiesListController', function() {
+      it('Should invoke the entity definition service', function() {
+        falconServiceMock.getEntityDefinition.andReturn(successResponse({}));
+        var type = 'feed';
+        var name = 'FeedOne';
+
+        scope.downloadEntity(type, name);
+
+        expect(falconServiceMock.getEntityDefinition).toHaveBeenCalledWith(type, name);
+      });
+
+      it('Should encode the response', function() {
+        var type = 'feed';
+        var name = 'FeedOne';
+        falconServiceMock.getEntityDefinition.andReturn(successResponse({}));
+
+
+        scope.downloadEntity(type, name);
+
+        expect(encoderServiceMock.encode).toHaveBeenCalled();
+      });
+
+      it('Should do a full page reload to a data uri to trigger the download', function() {
+        falconServiceMock.getEntityDefinition.andReturn(successResponse({}));
+        encoderServiceMock.encode.andReturn('[encodedResponse]');
+        windowMock.location.href = '';
+
+        scope.downloadEntity('feed', 'FeedOne');
+
+        expect(windowMock.location.href).toBe('data:application/octet-stream,[encodedResponse]');
+      });
+    });
+
+    function successResponse(value) {
+      var fakePromise = {};
+      fakePromise.success = function(callback) {
+        callback(value);
+        return fakePromise;
+      };
+      fakePromise.error = angular.noop;
+      return fakePromise;
+    }
+
+    function newElement(html) {
+      var element = compile(html)(scope);
+      scope.$digest();
+      return element;
+    }
+
+    function createWindowMock() {
+     return {
+       location: {
+         href: ''
+       }
+     };
+    }
+
+  });
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/directives/EntitySummaryDirectiveSpec.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/directives/EntitySummaryDirectiveSpec.js b/falcon-ui/app/test/directives/EntitySummaryDirectiveSpec.js
new file mode 100644
index 0000000..a2d150f
--- /dev/null
+++ b/falcon-ui/app/test/directives/EntitySummaryDirectiveSpec.js
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+
+  describe('Entity Summary Directive', function () {
+
+    var scope, compile, controller;
+
+    beforeEach(module('app.directives.entity'));
+
+    beforeEach(inject(function($rootScope, $compile, $controller) {
+      scope = $rootScope.$new();
+      compile = $compile;
+      scope.entities = [{"type":"feed","name":"feedOne","status":"SUBMITTED"},{"type":"feed","name":"feedTwo","status":"SUBMITTED"},{"type":"feed","name":"feedThree","status":"SUBMITTED"}, {"type":"FEED","name":"rawEmailFeed","status":"RUNNING","list":{"tag":["externalSystem=USWestEmailServers","classification=secure"]}},{"type":"FEED","name":"cleansedEmailFeed","status":"RUNNING","list":{"tag":["owner=USMarketing","classification=Secure","externalSource=USProdEmailServers","externalTarget=BITools"]}}];
+      controller = $controller('EntitySummaryCtrl', {
+        $scope: scope 
+      });
+    }));
+
+    describe('EntitySummaryCtrl', function() {
+    
+      it('Should determine correct list of status', function() {
+
+        scope.calculateAmount();
+        expect(scope.entities.length).toEqual(5);       
+        expect(scope.statusCount).toEqual({ SUBMITTED : 3, RUNNING : 2, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : scope.entities.length});
+        
+        scope.entities = [{"type":"feed","name":"feedOne","status":"SUSPENDED"},{"type":"feed","name":"feedTwo","status":"SUSPENDED"},{"type":"feed","name":"feedThree","status":"SUBMITTED"}, {"type":"FEED","name":"rawEmailFeed","status":"RUNNING","list":{"tag":["externalSystem=USWestEmailServers","classification=secure"]}},{"type":"FEED","name":"cleansedEmailFeed","status":"RUNNING","list":{"tag":["owner=USMarketing","classification=Secure","externalSource=USProdEmailServers","externalTarget=BITools"]}}];
+        scope.calculateAmount();      
+        expect(scope.statusCount).toEqual({ SUBMITTED : 1, RUNNING : 2, SUSPENDED : 2, UNKNOWN : 0, TOTAL_AMOUNT : scope.entities.length});
+
+        scope.entities = [{"type":"feed","name":"feedOne","status":"NEWSTATUS"},{"type":"feed","name":"feedTwo","status":"NEWSTATUS"},{"type":"feed","name":"feedThree","status":"SUBMITTED"}, {"type":"FEED","name":"rawEmailFeed","status":"RUNNING","list":{"tag":["externalSystem=USWestEmailServers","classification=secure"]}},{"type":"FEED","name":"cleansedEmailFeed","status":"ANOTHERNEWSTATUS","list":{"tag":["owner=USMarketing","classification=Secure","externalSource=USProdEmailServers","externalTarget=BITools"]}}];
+        scope.calculateAmount();       
+        expect(scope.statusCount).toEqual({ SUBMITTED : 1, RUNNING : 1, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : scope.entities.length, NEWSTATUS:2, ANOTHERNEWSTATUS: 1});
+      
+      });
+      it('Should return empty default list of status', function() {
+        
+        scope.entities = [];     
+        scope.calculateAmount();
+        expect(scope.entities.length).toEqual(0);       
+        expect(scope.statusCount).toEqual({ SUBMITTED : 0, RUNNING : 0, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : scope.entities.length});
+        
+        scope.entities = "";     
+        scope.calculateAmount();
+        expect(scope.entities.length).toEqual(0);       
+        expect(scope.statusCount).toEqual({ SUBMITTED : 0, RUNNING : 0, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : 0});
+      
+      });
+      it('Should return empty default but one in total itemas in entities.length', function() {
+        
+        scope.entities = [{}];     
+        scope.calculateAmount(); 
+        expect(scope.statusCount).toEqual({ SUBMITTED : 0, RUNNING : 0, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : 1});
+      
+      });
+      it('Should ignore undefined from adding it to statuses but allow the rest', function() {
+        
+        scope.entities = [{"type":"feed"},{"type":"feed","status":"NEWSTATUS"}, {"type":"feed","status":"RUNNING"}];     
+        scope.calculateAmount();
+        expect(scope.entities.length).toEqual(3);       
+        expect(scope.statusCount).toEqual({ SUBMITTED : 0, RUNNING : 1, SUSPENDED : 0, UNKNOWN : 0, TOTAL_AMOUNT : 3, NEWSTATUS: 1});  
+        
+        scope.entities = [{"type":["feed"]},{"type":"feed","name":"feedOne","status":"UNKNOWN"},{"type":"feed","name":"feedTwo","status":"TESTSTATUS"}];     
+        scope.calculateAmount(); 
+        expect(scope.statusCount).toEqual({ SUBMITTED : 0, RUNNING : 0, SUSPENDED : 0, UNKNOWN : 1, TOTAL_AMOUNT : 3, TESTSTATUS: 1});
+      
+      });
+    });
+
+  });
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/e2e/ProcessE2E.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/e2e/ProcessE2E.js b/falcon-ui/app/test/e2e/ProcessE2E.js
new file mode 100644
index 0000000..9cb1586
--- /dev/null
+++ b/falcon-ui/app/test/e2e/ProcessE2E.js
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function () {
+  'use strict';
+
+  var createProcessButton = element(by.id('createProcessButton'));
+  var editXmlButton = element(by.id('editXmlButton'));
+  var fieldWrapper = element(by.id('fieldWrapper'));
+  var xmlPreviewArea = element(by.model('prettyXml'));
+  var nextButton = element(by.id('nextButton'));
+
+  var nameField = element(by.id('entityNameField'));
+  var tagsSection = element(by.id('tagsSection'));
+  var engineSection = element(by.id('engineSection'));
+  var engineVersionField = element(by.id('engineVersionField'));
+  var workflowNameField = element(by.id('workflowNameField'));
+  var pigEngineRadio = element(by.id('pigEngineRadio'));
+  var pigVersionOption = element(by.id('pigVersion1'));
+  var pathField = element(by.id('pathField'));
+
+
+  beforeEach(function() {
+    browser.get('http://localhost.localdomain:3000');
+  });
+
+  describe('Process Entity', function() {
+
+    describe('Create', function() {
+      it('Should navigate to the entry form when clicking the Process on the navigation bar', function() {
+
+        createProcessButton.click();
+
+        var title = element(by.id('formTitle'));
+
+        expect(title.getText()).toEqual('New Process');
+      });
+
+      it('Should present the xml disabled', function() {
+        createProcessButton.click();
+
+        expect(fieldWrapper.isEnabled()).toBe(true);
+        expect(xmlPreviewArea.isEnabled()).toBe(false);
+      });
+
+      it('Should toggle the disable mode between the form and the xml edit field when pressing the edit xml button--', function() {
+        createProcessButton.click();
+
+        editXmlButton.click();
+        expect(xmlPreviewArea.isEnabled()).toBe(true);
+
+        editXmlButton.click();
+        expect(xmlPreviewArea.isEnabled()).toBe(false);
+      });
+
+      it('Should present the general information fields', function() {
+        createProcessButton.click();
+
+        expect(nameField).toBeTruthy();
+        expect(tagsSection).toBeTruthy();
+        expect(workflowNameField).toBeTruthy();
+        expect(engineSection).toBeTruthy();
+        expect(engineVersionField).toBeTruthy();
+        expect(pathField).toBeTruthy();
+      });
+
+      it('Should navigate to the Timing and Properties page', function() {
+        createProcessButton.click();
+
+        nameField.sendKeys('ProcessName');
+        workflowNameField.sendKeys('emailCleanseWorkflow')
+        pigEngineRadio.click();
+        pathField.sendKeys('/user/ambari-qa/falcon/demo/apps/pig/id.pig');
+        pigVersionOption.click();
+
+        nextButton.click();
+      });
+
+    });
+  });
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/e2e/protractor.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/e2e/protractor.js b/falcon-ui/app/test/e2e/protractor.js
new file mode 100644
index 0000000..02b9fd5
--- /dev/null
+++ b/falcon-ui/app/test/e2e/protractor.js
@@ -0,0 +1,7 @@
+exports.config = {
+  seleniumAddress: 'http://localhost:4444/wd/hub',
+  specs: ['*E2E.js'],
+  capabilities: {
+    'browserName': 'firefox'
+  }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/lib/jasmine-2.0.2/boot.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/lib/jasmine-2.0.2/boot.js b/falcon-ui/app/test/lib/jasmine-2.0.2/boot.js
new file mode 100644
index 0000000..406145e
--- /dev/null
+++ b/falcon-ui/app/test/lib/jasmine-2.0.2/boot.js
@@ -0,0 +1,120 @@
+/**
+ Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
+
+ If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
+
+ The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.
+
+ [jasmine-gem]: http://github.com/pivotal/jasmine-gem
+ */
+
+(function() {
+
+  /**
+   * ## Require &amp; Instantiate
+   *
+   * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
+   */
+  window.jasmine = jasmineRequire.core(jasmineRequire);
+
+  /**
+   * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
+   */
+  jasmineRequire.html(jasmine);
+
+  /**
+   * Create the Jasmine environment. This is used to run all specs in a project.
+   */
+  var env = jasmine.getEnv();
+
+  /**
+   * ## The Global Interface
+   *
+   * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
+   */
+  var jasmineInterface = jasmineRequire.interface(jasmine, env);
+
+  /**
+   * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
+   */
+  if (typeof window == "undefined" && typeof exports == "object") {
+    extend(exports, jasmineInterface);
+  } else {
+    extend(window, jasmineInterface);
+  }
+
+  /**
+   * ## Runner Parameters
+   *
+   * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
+   */
+
+  var queryString = new jasmine.QueryString({
+    getWindowLocation: function() { return window.location; }
+  });
+
+  var catchingExceptions = queryString.getParam("catch");
+  env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
+
+  /**
+   * ## Reporters
+   * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
+   */
+  var htmlReporter = new jasmine.HtmlReporter({
+    env: env,
+    onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); },
+    getContainer: function() { return document.body; },
+    createElement: function() { return document.createElement.apply(document, arguments); },
+    createTextNode: function() { return document.createTextNode.apply(document, arguments); },
+    timer: new jasmine.Timer()
+  });
+
+  /**
+   * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results  from JavaScript.
+   */
+  env.addReporter(jasmineInterface.jsApiReporter);
+  env.addReporter(htmlReporter);
+
+  /**
+   * Filter which specs will be run by matching the start of the full name against the `spec` query param.
+   */
+  var specFilter = new jasmine.HtmlSpecFilter({
+    filterString: function() { return queryString.getParam("spec"); }
+  });
+
+  env.specFilter = function(spec) {
+    return specFilter.matches(spec.getFullName());
+  };
+
+  /**
+   * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.
+   */
+  window.setTimeout = window.setTimeout;
+  window.setInterval = window.setInterval;
+  window.clearTimeout = window.clearTimeout;
+  window.clearInterval = window.clearInterval;
+
+  /**
+   * ## Execution
+   *
+   * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
+   */
+  var currentWindowOnload = window.onload;
+
+  window.onload = function() {
+    if (currentWindowOnload) {
+      currentWindowOnload();
+    }
+    htmlReporter.initialize();
+    env.execute();
+  };
+
+  /**
+   * Helper function for readability above.
+   */
+  function extend(destination, source) {
+    for (var property in source) destination[property] = source[property];
+    return destination;
+  }
+
+}());

http://git-wip-us.apache.org/repos/asf/falcon/blob/c4df0a5e/falcon-ui/app/test/lib/jasmine-2.0.2/console.js
----------------------------------------------------------------------
diff --git a/falcon-ui/app/test/lib/jasmine-2.0.2/console.js b/falcon-ui/app/test/lib/jasmine-2.0.2/console.js
new file mode 100644
index 0000000..78b5615
--- /dev/null
+++ b/falcon-ui/app/test/lib/jasmine-2.0.2/console.js
@@ -0,0 +1,166 @@
+/*
+Copyright (c) 2008-2014 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+function getJasmineRequireObj() {
+  if (typeof module !== 'undefined' && module.exports) {
+    return exports;
+  } else {
+    window.jasmineRequire = window.jasmineRequire || {};
+    return window.jasmineRequire;
+  }
+}
+
+getJasmineRequireObj().console = function(jRequire, j$) {
+  j$.ConsoleReporter = jRequire.ConsoleReporter();
+};
+
+getJasmineRequireObj().ConsoleReporter = function() {
+
+  var noopTimer = {
+    start: function(){},
+    elapsed: function(){ return 0; }
+  };
+
+  function ConsoleReporter(options) {
+    var print = options.print,
+      showColors = options.showColors || false,
+      onComplete = options.onComplete || function() {},
+      timer = options.timer || noopTimer,
+      specCount,
+      failureCount,
+      failedSpecs = [],
+      pendingCount,
+      ansi = {
+        green: '\x1B[32m',
+        red: '\x1B[31m',
+        yellow: '\x1B[33m',
+        none: '\x1B[0m'
+      };
+
+    this.jasmineStarted = function() {
+      specCount = 0;
+      failureCount = 0;
+      pendingCount = 0;
+      print('Started');
+      printNewline();
+      timer.start();
+    };
+
+    this.jasmineDone = function() {
+      printNewline();
+      for (var i = 0; i < failedSpecs.length; i++) {
+        specFailureDetails(failedSpecs[i]);
+      }
+
+      if(specCount > 0) {
+        printNewline();
+
+        var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' +
+          failureCount + ' ' + plural('failure', failureCount);
+
+        if (pendingCount) {
+          specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount);
+        }
+
+        print(specCounts);
+      } else {
+        print('No specs found');
+      }
+
+      printNewline();
+      var seconds = timer.elapsed() / 1000;
+      print('Finished in ' + seconds + ' ' + plural('second', seconds));
+
+      printNewline();
+
+      onComplete(failureCount === 0);
+    };
+
+    this.specDone = function(result) {
+      specCount++;
+
+      if (result.status == 'pending') {
+        pendingCount++;
+        print(colored('yellow', '*'));
+        return;
+      }
+
+      if (result.status == 'passed') {
+        print(colored('green', '.'));
+        return;
+      }
+
+      if (result.status == 'failed') {
+        failureCount++;
+        failedSpecs.push(result);
+        print(colored('red', 'F'));
+      }
+    };
+
+    return this;
+
+    function printNewline() {
+      print('\n');
+    }
+
+    function colored(color, str) {
+      return showColors ? (ansi[color] + str + ansi.none) : str;
+    }
+
+    function plural(str, count) {
+      return count == 1 ? str : str + 's';
+    }
+
+    function repeat(thing, times) {
+      var arr = [];
+      for (var i = 0; i < times; i++) {
+        arr.push(thing);
+      }
+      return arr;
+    }
+
+    function indent(str, spaces) {
+      var lines = (str || '').split('\n');
+      var newArr = [];
+      for (var i = 0; i < lines.length; i++) {
+        newArr.push(repeat(' ', spaces).join('') + lines[i]);
+      }
+      return newArr.join('\n');
+    }
+
+    function specFailureDetails(result) {
+      printNewline();
+      print(result.fullName);
+
+      for (var i = 0; i < result.failedExpectations.length; i++) {
+        var failedExpectation = result.failedExpectations[i];
+        printNewline();
+        print(indent(failedExpectation.message, 2));
+        print(indent(failedExpectation.stack, 2));
+      }
+
+      printNewline();
+    }
+  }
+
+  return ConsoleReporter;
+};