Skip to content

Commit

Permalink
#4 Update Karma Unit Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Birkner committed Oct 20, 2014
1 parent 5abb172 commit 024d17e
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 141 deletions.
5 changes: 0 additions & 5 deletions client/js/controller/skill_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@

this.skill = '';
};
});

angular.module('project-staffing').filter('firstLetterUppercase', function() {
return function(input) {
return input.charAt(0).toUpperCase() + input.slice(1);
};
});

})();
10 changes: 10 additions & 0 deletions client/js/filters/filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
'use strict';

angular.module('project-staffing').filter('firstLetterUppercase', function() {
return function(input) {
return input.charAt(0).toUpperCase() + input.slice(1);
};
});

})();
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function(config) {
'test/requirejs-main.js',
{pattern: 'test/*.spec.js', included: false},
{pattern: 'node_modules/requirejs/require.js', included: false},
{pattern: 'static/js/app.js', included: false},
{pattern: 'client/js/**/*.js', included: false},
{pattern: 'static/js/lib/angular-animate.js', included: false},
{pattern: 'static/js/lib/angular-route.js', included: false},
{pattern: 'static/js/lib/angular.js', included: false},
Expand Down
258 changes: 132 additions & 126 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,126 +10,6 @@

})();

(function(){
'use strict';

var app = angular.module('employee-directives', []);

app.directive('navigation', function(){
return {
restrict: 'E',
templateUrl: 'navigation.html'
};
});
app.directive('employeeTable', function(){
return {
restrict: 'E',
templateUrl: 'employee-table.html'
};
});
app.directive('employeeList', function(){
return {
restrict: 'E',
templateUrl: 'employee-list.html'
};
});
app.directive('employeeForm', function(){
return {
restrict: 'E',
templateUrl: 'employee-form.html'
};
});
app.directive('skillForm', function(){
return {
restrict: 'E',
templateUrl: 'skill-form.html'
};
});
app.directive('projectForm', function(){
return {
restrict: 'E',
templateUrl: 'project-form.html'
};
});
app.directive('homeaddressForm', function(){
return {
restrict: 'E',
templateUrl: 'homeaddress-form.html'
};
});
app.directive('searchaddressForm', function(){
return {
restrict: 'E',
templateUrl: 'searchaddress-form.html'
};
});
app.directive('customerTable', function() {
return {
restrict : 'E',
templateUrl : 'customer-table.html'
};
});
app.directive('searchCustomerAddressForm', function(){
return {
restrict: 'E',
templateUrl: 'searchcustomeraddress-form.html'
};
});
})();

(function() {
'use strict';

angular
.module('project-staffing')
.config(function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'views/index.html',
})
.when('/timeline', {
templateUrl: 'views/timeline.html',
controller: 'TimelineController',
controllerAs: 'timelineCtrl',
})
.when('/dashboard', {
templateUrl: 'views/dashboard.html',
controller: 'DashboardController',
controllerAs: 'dashboardCtrl',
})
.when('/list-employees', {
templateUrl: 'views/list_employees.html',
controller: 'EmployeeController',
controllerAs: 'employeeCtrl',
})
.when('/add-employee', {
templateUrl: 'views/add_employee.html',
controller: 'EmployeeController',
controllerAs: 'employeeCtrl',
})
.when('/list-customers', {
templateUrl: 'views/list_customers.html',
controller: 'CustomerController',
controllerAs: 'customerCtrl',
})
.when('/staffing', {
templateUrl: 'views/staff_project.html',
controller: 'StaffingController',
controllerAs: 'staffingCtrl',
})
.when('/add-customer', {
templateUrl: 'views/add_customer.html',
controller: 'CustomerController',
controllerAs: 'customerCtrl',
})
.when('/help', {
templateUrl: 'views/help.html',
})
.otherwise({
redirectTo: '/',
});
});
})();

(function() {
'use strict';

Expand Down Expand Up @@ -665,12 +545,7 @@

this.skill = '';
};
});

angular.module('project-staffing').filter('firstLetterUppercase', function() {
return function(input) {
return input.charAt(0).toUpperCase() + input.slice(1);
};

});

})();
Expand Down Expand Up @@ -851,3 +726,134 @@
});

})();

(function(){
'use strict';

var app = angular.module('employee-directives', []);

app.directive('navigation', function(){
return {
restrict: 'E',
templateUrl: 'navigation.html'
};
});
app.directive('employeeTable', function(){
return {
restrict: 'E',
templateUrl: 'employee-table.html'
};
});
app.directive('employeeList', function(){
return {
restrict: 'E',
templateUrl: 'employee-list.html'
};
});
app.directive('employeeForm', function(){
return {
restrict: 'E',
templateUrl: 'employee-form.html'
};
});
app.directive('skillForm', function(){
return {
restrict: 'E',
templateUrl: 'skill-form.html'
};
});
app.directive('projectForm', function(){
return {
restrict: 'E',
templateUrl: 'project-form.html'
};
});
app.directive('homeaddressForm', function(){
return {
restrict: 'E',
templateUrl: 'homeaddress-form.html'
};
});
app.directive('searchaddressForm', function(){
return {
restrict: 'E',
templateUrl: 'searchaddress-form.html'
};
});
app.directive('customerTable', function() {
return {
restrict : 'E',
templateUrl : 'customer-table.html'
};
});
app.directive('searchCustomerAddressForm', function(){
return {
restrict: 'E',
templateUrl: 'searchcustomeraddress-form.html'
};
});
})();

(function() {
'use strict';

angular.module('project-staffing').filter('firstLetterUppercase', function() {
return function(input) {
return input.charAt(0).toUpperCase() + input.slice(1);
};
});

})();

(function() {
'use strict';

angular
.module('project-staffing')
.config(function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'views/index.html',
})
.when('/timeline', {
templateUrl: 'views/timeline.html',
controller: 'TimelineController',
controllerAs: 'timelineCtrl',
})
.when('/dashboard', {
templateUrl: 'views/dashboard.html',
controller: 'DashboardController',
controllerAs: 'dashboardCtrl',
})
.when('/list-employees', {
templateUrl: 'views/list_employees.html',
controller: 'EmployeeController',
controllerAs: 'employeeCtrl',
})
.when('/add-employee', {
templateUrl: 'views/add_employee.html',
controller: 'EmployeeController',
controllerAs: 'employeeCtrl',
})
.when('/list-customers', {
templateUrl: 'views/list_customers.html',
controller: 'CustomerController',
controllerAs: 'customerCtrl',
})
.when('/staffing', {
templateUrl: 'views/staff_project.html',
controller: 'StaffingController',
controllerAs: 'staffingCtrl',
})
.when('/add-customer', {
templateUrl: 'views/add_customer.html',
controller: 'CustomerController',
controllerAs: 'customerCtrl',
})
.when('/help', {
templateUrl: 'views/help.html',
})
.otherwise({
redirectTo: '/',
});
});
})();
Loading

0 comments on commit 024d17e

Please sign in to comment.