got angular unit tests to pass
This commit is contained in:
parent
d303eb7bdf
commit
0871c70788
10
bower.json
10
bower.json
|
@ -26,14 +26,13 @@
|
||||||
"angular-bootstrap-colorpicker": "~3.0.19",
|
"angular-bootstrap-colorpicker": "~3.0.19",
|
||||||
"angular-ui-router-tabs": "~1.7.0",
|
"angular-ui-router-tabs": "~1.7.0",
|
||||||
"angular-scroll": "^1.0.0",
|
"angular-scroll": "^1.0.0",
|
||||||
"angular-sanitize": "^1.5.3",
|
"angular-sanitize": "1.4.14",
|
||||||
"v-button": "^1.1.1",
|
"v-button": "^1.1.1",
|
||||||
"angular-busy": "^4.1.3",
|
"angular-input-stars": "https://github.com/tellform/angular-input-stars.git#master",
|
||||||
"angular-input-stars": "https://github.com/whitef0x0/angular-input-stars.git#master",
|
|
||||||
"raven-js": "^3.0.4",
|
"raven-js": "^3.0.4",
|
||||||
"tableExport.jquery.plugin": "^1.5.1",
|
"tableExport.jquery.plugin": "^1.5.1",
|
||||||
"js-yaml": "^3.6.1",
|
"js-yaml": "^3.6.1",
|
||||||
"angular-ui-select": "https://github.com/whitef0x0/ui-select.git#compiled",
|
"angular-ui-select": "https://github.com/tellform/ui-select.git#compiled",
|
||||||
"angular-translate": "~2.11.0",
|
"angular-translate": "~2.11.0",
|
||||||
"ng-translate": "*",
|
"ng-translate": "*",
|
||||||
"deep-diff": "^0.3.4",
|
"deep-diff": "^0.3.4",
|
||||||
|
@ -48,7 +47,8 @@
|
||||||
"angular-bootstrap": "^0.14.0",
|
"angular-bootstrap": "^0.14.0",
|
||||||
"angular": "1.4.14",
|
"angular": "1.4.14",
|
||||||
"angular-ui-select": "compiled",
|
"angular-ui-select": "compiled",
|
||||||
"jspdf": "~1.0.178"
|
"jspdf": "~1.0.178",
|
||||||
|
"angular-sanitize": "1.4.14"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"BOWER-PACKAGE": {
|
"BOWER-PACKAGE": {
|
||||||
|
|
|
@ -329,7 +329,7 @@ module.exports = function(grunt) {
|
||||||
grunt.option('force', true);
|
grunt.option('force', true);
|
||||||
|
|
||||||
// A Task for loading the configuration object
|
// A Task for loading the configuration object
|
||||||
/*grunt.task.registerTask('loadConfig', 'Task that loads the config into a grunt option.', function() {
|
grunt.task.registerTask('loadConfig', 'Task that loads the config into a grunt option.', function() {
|
||||||
require('./config/init')();
|
require('./config/init')();
|
||||||
var config = require('./config/config');
|
var config = require('./config/config');
|
||||||
console.log(config);
|
console.log(config);
|
||||||
|
@ -337,7 +337,7 @@ module.exports = function(grunt) {
|
||||||
grunt.config.set('applicationJavaScriptFiles', config.assets.js);
|
grunt.config.set('applicationJavaScriptFiles', config.assets.js);
|
||||||
grunt.config.set('formApplicationJavaScriptFiles', config.assets.form_js);
|
grunt.config.set('formApplicationJavaScriptFiles', config.assets.form_js);
|
||||||
grunt.config.set('applicationCSSFiles', config.assets.css);
|
grunt.config.set('applicationCSSFiles', config.assets.css);
|
||||||
});*/
|
});
|
||||||
|
|
||||||
// Code coverage tasks.
|
// Code coverage tasks.
|
||||||
grunt.registerTask('coveralls', ['env:test','mocha_istanbul:coveralls']);
|
grunt.registerTask('coveralls', ['env:test','mocha_istanbul:coveralls']);
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
"socket.io-redis": "^1.0.0",
|
"socket.io-redis": "^1.0.0",
|
||||||
"swig": "~1.4.1",
|
"swig": "~1.4.1",
|
||||||
"uuid-token-generator": "^0.5.0",
|
"uuid-token-generator": "^0.5.0",
|
||||||
"wildcard-subdomains": "github:whitef0x0/wildcard-subdomains"
|
"wildcard-subdomains": "github:tellform/wildcard-subdomains"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"all-contributors-cli": "^4.3.0",
|
"all-contributors-cli": "^4.3.0",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Init the application configuration module for AngularJS application
|
// Init the application configuration module for AngularJS application
|
||||||
(function() {
|
var ApplicationConfiguration = (function() {
|
||||||
// Init module configuration options
|
// Init module configuration options
|
||||||
var applicationModuleName = 'NodeForm';
|
var applicationModuleName = 'NodeForm';
|
||||||
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource', 'TellForm.templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm.templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate'];
|
||||||
|
|
||||||
// Add a new vertical module
|
// Add a new vertical module
|
||||||
var registerModule = function(moduleName, dependencies) {
|
var registerModule = function(moduleName, dependencies) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<header data-ng-include="'/static/modules/core/views/header.client.view.html'"></header>
|
<header data-ng-include="'/static/modules/core/views/header.client.view.html'"></header>
|
||||||
|
|
||||||
<div class="container" cg-busy="{promise:updatePromise,templateUrl:'modules/forms/admin/views/directiveViews/cgBusy/update-form-message-TypeB.html',message:'Updating form...', backdrop:false, wrapperClass:'.busy-updating-wrapper'}"></div>
|
<div class="container"></div>
|
||||||
|
|
||||||
<section class="admin-form">
|
<section class="admin-form">
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<div>
|
|
||||||
<div style="text-align:center;font-size:26px;position:absolute;top:100px;width:100%;text-shadow:1px 1px 2px white, -1px -1px 2px white,-4px 4px 4px white,-4px 4px 4px white">{{$message}}</div>
|
|
||||||
</div>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<!-- cgBusy Template -->
|
|
||||||
<div>
|
|
||||||
<div style="text-align: center; font-size: 20px;position: fixed; bottom: 0; right: 55px; background-color: gray; color: white; padding: 5px 15px 5px 10px; z-index: 10;">{{$message}}</div>
|
|
||||||
</div>
|
|
|
@ -90,7 +90,7 @@
|
||||||
// The injector ignores leading and trailing underscores here (i.e. _$httpBackend_).
|
// The injector ignores leading and trailing underscores here (i.e. _$httpBackend_).
|
||||||
// This allows us to inject a service but then attach it to a variable
|
// This allows us to inject a service but then attach it to a variable
|
||||||
// with the same name as the service.
|
// with the same name as the service.
|
||||||
beforeEach(inject(function($controller, $rootScope, _$state_, _$location_, _$stateParams_, _$httpBackend_, CurrentForm) {
|
beforeEach(inject(function($controller, $rootScope, _$state_, _$httpBackend_, CurrentForm) {
|
||||||
// Set a new global scope
|
// Set a new global scope
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
|
|
||||||
|
@ -98,9 +98,7 @@
|
||||||
CurrentForm.setForm(sampleForm);
|
CurrentForm.setForm(sampleForm);
|
||||||
|
|
||||||
// Point global variables to injected services
|
// Point global variables to injected services
|
||||||
$stateParams = _$stateParams_;
|
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
$location = _$location_;
|
|
||||||
$state = _$state_;
|
$state = _$state_;
|
||||||
|
|
||||||
$httpBackend.whenGET(/\.html$/).respond('');
|
$httpBackend.whenGET(/\.html$/).respond('');
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
var sampleForgotToken = 'c2e8f74455cdccc454dfef941ff315fa4f7b1f0a';
|
var sampleForgotToken = 'c2e8f74455cdccc454dfef941ff315fa4f7b1f0a';
|
||||||
var sampleCredentials = {
|
var sampleCredentials = {
|
||||||
username: sampleUser.username,
|
username: sampleUser.username,
|
||||||
password: sampleUser.password,
|
password: sampleUser.password
|
||||||
};
|
};
|
||||||
|
|
||||||
var samplePasswordDetails = {
|
var samplePasswordDetails = {
|
||||||
newPassword: sampleUser.password,
|
newPassword: sampleUser.password,
|
||||||
verifyPassword: sampleUser.password,
|
verifyPassword: sampleUser.password
|
||||||
};
|
};
|
||||||
|
|
||||||
// The $resource service augments the response object with methods for updating and deleting the resource.
|
// The $resource service augments the response object with methods for updating and deleting the resource.
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
it('User.resetPassword() should send GET request to /auth/forgot/:token', function() {
|
it('User.resetPassword() should send GET request to /auth/forgot/:token', function() {
|
||||||
|
|
||||||
//Set POST response
|
//Set POST response
|
||||||
$httpBackend.expect('GET', '/auth/password/'+sampleForgotToken).respond(200);
|
$httpBackend.expect('POST', '/auth/reset/'+sampleForgotToken).respond(200);
|
||||||
|
|
||||||
//Run Service Logic to Test
|
//Run Service Logic to Test
|
||||||
User.resetPassword(samplePasswordDetails, sampleForgotToken);
|
User.resetPassword(samplePasswordDetails, sampleForgotToken);
|
||||||
|
|
Loading…
Reference in a new issue