diff --git a/app/.htaccess b/app/.htaccess
old mode 100755
new mode 100644
diff --git a/app/app.js b/app/app.js
old mode 100755
new mode 100644
diff --git a/app/config/apiMapping.js b/app/config/apiMapping.js
old mode 100755
new mode 100644
index 5d022ec..45ec0dc
--- a/app/config/apiMapping.js
+++ b/app/config/apiMapping.js
@@ -55,59 +55,112 @@ var apiMapping = {
'method': 'update'
}
},
- VersionManagementSoftware: {
+ RemoteProjectManager: {
validations: true,
lazy: true,
- channel: '/channel/version-management-software',
+ channel: '/channel/remote-project-manager',
all: {
'endpoint': '/private/queue',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'GET'
},
create: {
'endpoint': '/private/queue',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'POST'
},
update: {
'endpoint': '/private/queue',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'PUT'
},
remove: {
'endpoint': '/private/queue',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'DELETE'
},
listen: {
'endpoint': '/channel',
- 'controller': 'version-management-software'
+ 'controller': 'remote-project-manager'
},
types: {
'endpoint': '/channel',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': 'types/',
'httpMethod': 'GET'
},
scaffolding: {
'endpoint': '/channel',
- 'controller': 'version-management-software',
+ 'controller': 'remote-project-manager',
'method': 'scaffolding/:type/',
'httpMethod': 'GET'
}
},
- VersionProject: {
+ Status: {
+ validations: true,
+ lazy: true,
+ channel: '/channel/status',
all: {
'endpoint': '/private/queue',
- 'controller': 'projects'
+ 'controller': 'status',
+ 'method': '',
+ 'httpMethod': 'GET'
},
- getByScopeId: {
+ create: {
'endpoint': '/private/queue',
- 'controller': 'projects'
+ 'controller': 'status',
+ 'method': '',
+ 'httpMethod': 'POST'
+ },
+ update: {
+ 'endpoint': '/private/queue',
+ 'controller': 'status',
+ 'method': '',
+ 'httpMethod': 'PUT'
+ },
+ remove: {
+ 'endpoint': '/private/queue',
+ 'controller': 'status',
+ 'method': '',
+ 'httpMethod': 'DELETE'
+ },
+ listen: {
+ 'endpoint': '/channel',
+ 'controller': 'status'
+ }
+ },
+ RemoteProjects: {
+ all: {
+ 'endpoint': '/private/queue',
+ 'controller': 'projects/remote'
+ },
+ listen: {
+ 'endpoint': '/channel',
+ 'controller': 'projects/remote'
+ }
+ },
+ ProjectsStats: {
+ all: {
+ 'endpoint': '/private/queue',
+ 'controller': 'projects/stats'
+ },
+ listen: {
+ 'endpoint': '/channel',
+ 'controller': 'projects/stats'
+ }
+ },
+ ActiveSprints: {
+ all: {
+ 'endpoint': '/private/queue',
+ 'controller': 'sprints/active'
+ },
+ listen: {
+ 'endpoint': '/channel',
+ 'controller': 'sprints/active'
}
}
};
\ No newline at end of file
diff --git a/app/config/appConfig.js b/app/config/appConfig.js
index fc5981b..aedcc7d 100644
--- a/app/config/appConfig.js
+++ b/app/config/appConfig.js
@@ -1,38 +1,39 @@
var appConfig = {
- 'version': '1.0.0',
+ 'version': '1.0.0',
- 'allowAnonymous': true,
+ 'allowAnonymous': true,
- 'anonymousRole': 'ROLE_ANONYMOUS',
+ 'anonymousRole': 'ROLE_ANONYMOUS',
- // Set this to the webService if mocking AuthService
+ // Set this to the webService if mocking AuthService
- 'authService': 'https://labs.library.tamu.edu/auth3',
- 'webService': 'http://localhost:9000',
+ 'authService': 'https://labs.library.tamu.edu/auth3',
+ 'webService': 'http://localhost:9001',
- 'storageType': 'session',
+ 'storageType': 'session',
- 'logging': {
- 'log': true,
- 'info': true,
- 'warn': true,
- 'error': true,
- 'debug': true
- },
+ 'logging': {
+ 'log': true,
+ 'info': true,
+ 'warn': true,
+ 'error': true,
+ 'debug': true
+ },
- 'stompDebug': false,
+ 'stompDebug': false,
- /*
- Determines the type of connection stomp will attempt to make with the service.
- TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource,
- htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling,
- jsonp-polling
- */
- 'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'],
+ /*
+ Determines the type of connection stomp will attempt to make with the service.
+ TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource,
+ htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling,
+ jsonp-polling
+ */
+ 'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'],
- // Set this to 'admin' or 'user' if using mock AuthService
- // otherwise set to null or false
+ // Set this to 'admin' or 'user' if using mock AuthService
+ // otherwise set to null or false
- 'mockRole': null
-};
+ 'mockRole': null
+
+};
\ No newline at end of file
diff --git a/app/config/routes.js b/app/config/routes.js
old mode 100755
new mode 100644
index 31dcd15..4510ddc
--- a/app/config/routes.js
+++ b/app/config/routes.js
@@ -1,17 +1,12 @@
app.config(function ($routeProvider) {
$routeProvider.
when('/management', {
- redirectTo: '/management/projects',
- access: ["ROLE_ADMIN", "ROLE_MANGER"]
+ redirectTo: '/management/projects'
}).
when('/management/:tab', {
templateUrl: 'views/management.html',
access: ["ROLE_ADMIN", "ROLE_MANGER"]
}).
- when('/projects', {
- templateUrl: '/views/management/projects.html',
- access: ["ROLE_ADMIN", "ROLE_MANGER"]
- }).
when('/home', {
redirectTo: '/'
}).
diff --git a/app/config/runTime.js b/app/config/runTime.js
old mode 100755
new mode 100644
diff --git a/app/controllers/activeSprintsController.js b/app/controllers/activeSprintsController.js
new file mode 100644
index 0000000..f10a389
--- /dev/null
+++ b/app/controllers/activeSprintsController.js
@@ -0,0 +1,69 @@
+app.controller('ActiveSprintsController', function ($controller, $sce, $scope, ActiveSprintsService, StatusRepo) {
+
+ angular.extend(this, $controller('AbstractController', {
+ $scope: $scope
+ }));
+
+ if (sessionStorage.selected === undefined) {
+ sessionStorage.selected = 0;
+ }
+
+ var trusted = {};
+
+ $scope.statuses = StatusRepo.getAll();
+
+ $scope.activeSprints = ActiveSprintsService.getActiveSprints();
+
+ $scope.select = function (index) {
+ sessionStorage.selected = index;
+ };
+
+ $scope.kanbanHeader = function () {
+ return $scope.getSelectedSprint() ? $scope.getSelectedSprint().project + ": " + $scope.getSelectedSprint().name : "Select Sprint Above";
+ };
+
+ $scope.getSprintEstimateTotal = function (sprint) {
+ var total = 0;
+ for (var i in sprint.cards) {
+ var card = sprint.cards[i];
+ if (card.estimate) {
+ total += card.estimate;
+ }
+ }
+ return total;
+ };
+
+ $scope.getStatusEstimateTotal = function (status) {
+ var total = 0;
+ var sprint = $scope.getSelectedSprint();
+ for (var i in sprint.cards) {
+ var card = sprint.cards[i];
+ if (card.status === status.identifier && card.estimate) {
+ total += card.estimate;
+ }
+ }
+ return total;
+ };
+
+ $scope.getAvatarUrl = function (assignee) {
+ return appConfig.webService + "/images/" + assignee.avatar;
+ };
+
+ $scope.getHtmlContent = function (content) {
+ return trusted[content] || (trusted[content] = $sce.trustAsHtml(content));
+ };
+
+ $scope.getSelectedSprint = function () {
+ return $scope.activeSprints.length > 0 ? $scope.activeSprints[sessionStorage.selected] : undefined;
+ };
+
+ ActiveSprintsService.updated.then(null, null, function () {
+ if ($scope.activeSprints.length > 0) {
+ while (sessionStorage.selected >= $scope.activeSprints.length) {
+ sessionStorage.selected--;
+ }
+ $scope.select(sessionStorage.selected);
+ }
+ });
+
+});
\ No newline at end of file
diff --git a/app/controllers/managementController.js b/app/controllers/managementController.js
deleted file mode 100644
index 6b96b37..0000000
--- a/app/controllers/managementController.js
+++ /dev/null
@@ -1,7 +0,0 @@
-app.controller('ManagementController', function ($controller, $scope) {
-
- angular.extend(this, $controller('AbstractController', {
- $scope: $scope
- }));
-
-});
\ No newline at end of file
diff --git a/app/controllers/projectController.js b/app/controllers/projectController.js
index b0392c4..e37d08c 100644
--- a/app/controllers/projectController.js
+++ b/app/controllers/projectController.js
@@ -1,11 +1,9 @@
-app.controller('ProjectController', function ($controller, $scope, $rootScope, NgTableParams, ApiResponseActions, Project, ProjectRepo, VersionManagementSoftwareRepo, VersionProjectService) {
+app.controller('ProjectController', function ($controller, $scope, ApiResponseActions, ProjectRepo, RemoteProjectManagerRepo, RemoteProjectsService) {
angular.extend(this, $controller('AbstractController', {
$scope: $scope
}));
- $scope.vmses = VersionManagementSoftwareRepo.getAll();
-
$scope.projects = ProjectRepo.getAll();
$scope.projectToCreate = ProjectRepo.getScaffold();
@@ -32,12 +30,12 @@ app.controller('ProjectController', function ($controller, $scope, $rootScope, N
$scope.createProject = function () {
ProjectRepo.create($scope.projectToCreate).then(function (res) {
if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
- $scope.cancelCreateProject();
+ $scope.resetCreateProject();
}
});
};
- $scope.cancelCreateProject = function () {
+ $scope.resetCreateProject = function () {
angular.extend($scope.projectToCreate, ProjectRepo.getScaffold());
$scope.resetProjectForms();
};
@@ -78,64 +76,30 @@ app.controller('ProjectController', function ($controller, $scope, $rootScope, N
});
};
- var buildTable = function () {
- var allProjects = ProjectRepo.getAll();
- $scope.tableParams = new NgTableParams({
- count: allProjects.length,
- sorting: {
- name: 'asc'
- }
- }, {
- counts: [],
- total: 0,
- getData: function (params) {
- return $scope.projects;
- }
- });
- };
+ if ($scope.isManager() || $scope.isAdmin()) {
+ $scope.remoteProjectManagers = RemoteProjectManagerRepo.getAll();
- $scope.vmsVersionProjects = {};
+ $scope.remoteProjects = RemoteProjectsService.getRemoteProjects();
- var getVmsById = function (id) {
- VersionProjectService.getAll(id).then(function (versionProjects) {
- $scope.vmsVersionProjects[id] = versionProjects;
- });
- };
+ $scope.getRemoteProjectManagerRemoteProjects = function (remoteProjectManagerId) {
+ return $scope.remoteProjects[remoteProjectManagerId];
+ };
- VersionManagementSoftwareRepo.ready().then(function () {
- for (var i in $scope.vmses) {
- if (i !== 'visibleColumnCount') {
- getVmsById($scope.vmses[i].id);
+ RemoteProjectManagerRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function () {
+ $scope.remoteProjectManagers.length = 0;
+ var remoteProjectManagers = RemoteProjectManagerRepo.getAll();
+ for (var i in remoteProjectManagers) {
+ $scope.remoteProjectManagers.push(remoteProjectManagers[i]);
}
- }
- });
-
- $scope.getVmsVersionProjects = function (vmsId) {
- return $scope.vmsVersionProjects[vmsId];
- };
-
- $scope.getVmsVersionProjects = function (vmsId) {
- return $scope.vmsVersionProjects[vmsId];
- };
+ });
+ }
- $scope.getVersionProject = function (project) {
- if (project.scopeId && project.versionManagementSoftware && !project.versionProject) {
- project.versionProject = {};
- VersionProjectService.getByScopeId(project.versionManagementSoftware.id, project.scopeId).then(function (versionProject) {
- angular.extend(project, {
- versionProject: versionProject
- });
- });
+ ProjectRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function () {
+ $scope.projects.length = 0;
+ var projects = ProjectRepo.getAll();
+ for (var i in projects) {
+ $scope.projects.push(projects[i]);
}
- return project.versionProject;
- };
-
- ProjectRepo.ready().then(function () {
- buildTable();
- });
-
- ProjectRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function (arg) {
- buildTable();
});
});
\ No newline at end of file
diff --git a/app/controllers/remoteProjectManagerController.js b/app/controllers/remoteProjectManagerController.js
new file mode 100644
index 0000000..affc44a
--- /dev/null
+++ b/app/controllers/remoteProjectManagerController.js
@@ -0,0 +1,101 @@
+app.controller('RemoteProjectManagerController', function ($controller, $scope, ApiResponseActions, RemoteProjectManagerRepo) {
+
+ angular.extend(this, $controller('AbstractController', {
+ $scope: $scope
+ }));
+
+ $scope.remoteProjectManagers = RemoteProjectManagerRepo.getAll();
+
+ $scope.remoteProjectManagerToCreate = RemoteProjectManagerRepo.getScaffold();
+
+ $scope.remoteProjectManagerToEdit = {};
+ $scope.remoteProjectManagerToDelete = {};
+
+ RemoteProjectManagerRepo.getTypes().then(function (types) {
+ $scope.serviceTypes = types;
+ $scope.resetRemoteProjectManagerForms();
+ });
+
+ $scope.remoteProjectManagerForms = {
+ validations: RemoteProjectManagerRepo.getValidations(),
+ getResults: RemoteProjectManagerRepo.getValidationResults
+ };
+
+ $scope.resetRemoteProjectManagerForms = function () {
+ RemoteProjectManagerRepo.clearValidationResults();
+ for (var key in $scope.remoteProjectManagerForms) {
+ if ($scope.remoteProjectManagerForms[key] !== undefined && !$scope.remoteProjectManagerForms[key].$pristine && $scope.remoteProjectManagerForms[key].$setPristine) {
+ $scope.remoteProjectManagerForms[key].$setPristine();
+ }
+ }
+ $scope.closeModal();
+ };
+
+ $scope.createRemoteProjectManager = function () {
+ RemoteProjectManagerRepo.create($scope.remoteProjectManagerToCreate).then(function (res) {
+ if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
+ $scope.resetCreateRemoteProjectManager();
+ }
+ });
+ };
+
+ $scope.resetCreateRemoteProjectManager = function () {
+ $scope.remoteProjectManagerToCreate = RemoteProjectManagerRepo.getScaffold();
+ $scope.resetRemoteProjectManagerForms();
+ };
+
+ $scope.editRemoteProjectManager = function (remoteProjectManager) {
+ $scope.remoteProjectManagerToEdit = angular.copy(remoteProjectManager);
+ $scope.openModal('#editRemoteProjectManagerModal');
+ };
+
+ $scope.updateRemoteProjectManager = function () {
+ $scope.remoteProjectManagerToEdit.dirty(true);
+ $scope.remoteProjectManagerToEdit.save().then(function (res) {
+ if (angular.fromJson(res.body).meta.status === "SUCCESS") {
+ $scope.cancelEditRemoteProjectManager();
+ }
+ });
+ };
+
+ $scope.cancelEditRemoteProjectManager = function () {
+ $scope.remoteProjectManagerToEdit.refresh();
+ $scope.resetRemoteProjectManagerForms();
+ };
+
+ $scope.confirmDeleteRemoteProjectManager = function (remoteProjectManager) {
+ $scope.remoteProjectManagerToDelete = remoteProjectManager;
+ $scope.openModal('#deleteRemoteProjectManagerModal');
+ };
+
+ $scope.cancelDeleteRemoteProjectManager = function () {
+ $scope.remoteProjectManagerToDelete = {};
+ $scope.closeModal();
+ };
+
+ $scope.deleteRemoteProjectManager = function (remoteProjectManager) {
+ RemoteProjectManagerRepo.delete(remoteProjectManager).then(function (res) {
+ if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
+ $scope.cancelDeleteRemoteProjectManager();
+ }
+ });
+ };
+
+ $scope.typeSettings = function (type) {
+ for (var i in $scope.serviceTypes) {
+ if ($scope.serviceTypes[i].value === type) {
+ return $scope.serviceTypes[i].scaffold;
+ }
+ }
+ return [];
+ };
+
+ RemoteProjectManagerRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function () {
+ $scope.remoteProjectManagers.length = 0;
+ var remoteProjectManagers = RemoteProjectManagerRepo.getAll();
+ for (var i in remoteProjectManagers) {
+ $scope.remoteProjectManagers.push(remoteProjectManagers[i]);
+ }
+ });
+
+});
\ No newline at end of file
diff --git a/app/controllers/statusController.js b/app/controllers/statusController.js
new file mode 100644
index 0000000..2a326fa
--- /dev/null
+++ b/app/controllers/statusController.js
@@ -0,0 +1,110 @@
+app.controller('StatusController', function ($controller, $scope, ApiResponseActions, StatusRepo) {
+
+ angular.extend(this, $controller('AbstractController', {
+ $scope: $scope
+ }));
+
+ $scope.statuses = StatusRepo.getAll();
+
+ $scope.statusToCreate = StatusRepo.getScaffold();
+
+ $scope.statusToDelete = {};
+
+ $scope.statusForms = {
+ validations: StatusRepo.getValidations(),
+ getResults: StatusRepo.getValidationResults
+ };
+
+ $scope.resetStatusForms = function () {
+ StatusRepo.clearValidationResults();
+ for (var key in $scope.statusForms) {
+ if ($scope.statusForms[key] !== undefined && !$scope.statusForms[key].$pristine && $scope.statusForms[key].$setPristine) {
+ $scope.statusForms[key].$setPristine();
+ }
+ }
+ $scope.closeModal();
+ };
+
+ $scope.resetStatusForms();
+
+ $scope.createStatus = function () {
+ sanatizeMapping($scope.statusToCreate);
+ StatusRepo.create($scope.statusToCreate).then(function (res) {
+ if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
+ $scope.resetCreateStatus();
+ }
+ });
+ };
+
+ $scope.resetCreateStatus = function () {
+ angular.extend($scope.statusToCreate, StatusRepo.getScaffold());
+ $scope.resetStatusForms();
+ };
+
+ $scope.editStatus = function (status) {
+ $scope.statusToEdit = status;
+ if ($scope.statusToEdit.mapping.length === 0) {
+ $scope.statusToEdit.mapping.push('');
+ }
+ $scope.openModal('#editStatusModal');
+ };
+
+ $scope.updateStatus = function () {
+ sanatizeMapping($scope.statusToEdit);
+ $scope.statusToEdit.dirty(true);
+ $scope.statusToEdit.save().then(function (res) {
+ if (angular.fromJson(res.body).meta.status === "SUCCESS") {
+ $scope.cancelEditStatus();
+ }
+ });
+ };
+
+ $scope.addMatch = function (status) {
+ status.mapping.push('');
+ };
+
+ $scope.removeMatch = function (status, index) {
+ status.mapping.splice(index, 1);
+ };
+
+ $scope.cancelEditStatus = function () {
+ $scope.statusToEdit.refresh();
+ $scope.statusToEdit = {};
+ $scope.resetStatusForms();
+ };
+
+ $scope.confirmDeleteStatus = function (status) {
+ $scope.statusToDelete = status;
+ $scope.openModal('#deleteStatusModal');
+ };
+
+ $scope.cancelDeleteStatus = function () {
+ $scope.statusToDelete = {};
+ $scope.closeModal();
+ };
+
+ $scope.deleteStatus = function (status) {
+ StatusRepo.delete(status).then(function (res) {
+ if (angular.fromJson(res.body).meta.status === "SUCCESS") {
+ $scope.cancelDeleteStatus();
+ }
+ });
+ };
+
+ var sanatizeMapping = function (status) {
+ for (var i = status.mapping.length - 1; i >= 0; i--) {
+ if (status.mapping[i].trim().length === 0) {
+ status.mapping.splice(i, 1);
+ }
+ }
+ };
+
+ StatusRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function () {
+ $scope.statuses.length = 0;
+ var statuses = StatusRepo.getAll();
+ for (var i in statuses) {
+ $scope.statuses.push(statuses[i]);
+ }
+ });
+
+});
\ No newline at end of file
diff --git a/app/controllers/userRepoController.js b/app/controllers/userRepoController.js
old mode 100755
new mode 100644
diff --git a/app/controllers/versionManagementSoftwareController.js b/app/controllers/versionManagementSoftwareController.js
deleted file mode 100644
index 3f0a6f1..0000000
--- a/app/controllers/versionManagementSoftwareController.js
+++ /dev/null
@@ -1,116 +0,0 @@
-app.controller('VersionManagementSoftwareController', function ($controller, $scope, $filter, $rootScope, ApiResponseActions, NgTableParams, VersionManagementSoftware, VersionManagementSoftwareRepo) {
-
- angular.extend(this, $controller('AbstractController', {
- $scope: $scope
- }));
-
- $scope.vmses = VersionManagementSoftwareRepo.getAll();
-
- $scope.vmsToCreate = VersionManagementSoftwareRepo.getScaffold();
-
- $scope.vmsToEdit = {};
- $scope.vmsToDelete = {};
-
- VersionManagementSoftwareRepo.getTypes().then(function (types) {
- $scope.serviceTypes = types;
- });
-
- $scope.vmsForms = {
- validations: VersionManagementSoftwareRepo.getValidations(),
- getResults: VersionManagementSoftwareRepo.getValidationResults
- };
-
- $scope.resetVmsForms = function () {
- VersionManagementSoftwareRepo.clearValidationResults();
- for (var key in $scope.vmsForms) {
- if ($scope.vmsForms[key] !== undefined && !$scope.vmsForms[key].$pristine && $scope.vmsForms[key].$setPristine) {
- $scope.vmsForms[key].$setPristine();
- }
- }
- $scope.closeModal();
- };
-
- $scope.resetVmsForms();
-
- $scope.createVms = function () {
- VersionManagementSoftwareRepo.create($scope.vmsToCreate).then(function (res) {
- if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
- $scope.cancelCreateVms();
- }
- });
- };
-
- $scope.cancelCreateVms = function () {
- $scope.vmsToCreate = VersionManagementSoftwareRepo.getScaffold();
- $scope.resetVmsForms();
- };
-
- $scope.editVms = function (vms) {
- $scope.vmsToEdit = angular.copy(vms);
- $scope.openModal('#editVmsModal');
- };
-
- $scope.updateVms = function () {
- $scope.vmsToEdit.dirty(true);
- $scope.vmsToEdit.save().then(function () {
- $scope.cancelEditVms();
- });
- };
-
- $scope.cancelEditVms = function () {
- $scope.vmsToEdit.refresh();
- $scope.resetVmsForms();
- };
-
- $scope.confirmDeleteVms = function (vms) {
- $scope.vmsToDelete = vms;
- $scope.openModal('#deleteVmsModal');
- };
-
- $scope.cancelDeleteVms = function () {
- $scope.vmsToDelete = {};
- $scope.closeModal();
- };
-
- $scope.deleteVms = function (vms) {
- VersionManagementSoftwareRepo.delete(vms).then(function (res) {
- if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
- $scope.cancelDeleteVms();
- }
- });
- };
-
- $scope.typeSettings = function (type) {
- for (var i in $scope.serviceTypes) {
- if ($scope.serviceTypes[i].value === type) {
- return $scope.serviceTypes[i].scaffold;
- }
- }
- return [];
- };
-
- var buildTable = function () {
- var allVmses = VersionManagementSoftwareRepo.getAll();
- $scope.tableParams = new NgTableParams({
- count: allVmses.length,
- sorting: {
- name: 'ASC'
- }
- }, {
- counts: [],
- total: 0,
- getData: function (params) {
- return $scope.vmses;
- }
- });
- };
-
- VersionManagementSoftwareRepo.ready().then(function () {
- buildTable();
- });
-
- VersionManagementSoftwareRepo.listen([ApiResponseActions.CREATE, ApiResponseActions.DELETE, ApiResponseActions.UPDATE], function (arg) {
- buildTable();
- });
-
-});
\ No newline at end of file
diff --git a/app/directives/remoteProjectManagerFormDirective.js b/app/directives/remoteProjectManagerFormDirective.js
new file mode 100644
index 0000000..7cdf011
--- /dev/null
+++ b/app/directives/remoteProjectManagerFormDirective.js
@@ -0,0 +1,58 @@
+app.directive('remoteProjectManagerForm', function () {
+ return {
+ templateUrl: 'views/directives/remoteProjectManagerForm.html',
+ restrict: 'E',
+ replace: false,
+ scope: {
+ 'managementSettings': '=',
+ 'model': '='
+ },
+ link: function ($scope) {
+
+ var isAuthRequired = function () {
+ for (var i in $scope.managementSettings) {
+ var key = $scope.managementSettings[i].key;
+ if (key === 'password' || key === 'token') {
+ return true;
+ }
+ }
+ };
+
+ var hasToken = function () {
+ for (var key in $scope.model.settings) {
+ var value = $scope.model.settings[key];
+ if (key === 'token' && value !== undefined && value.length > 0) {
+ return true;
+ }
+ }
+ };
+
+ $scope.auth = {
+ useToken: hasToken(),
+ required: isAuthRequired()
+ };
+
+ $scope.inputSetting = function (setting) {
+ var display = true;
+ if ($scope.auth.useToken) {
+ if (setting.key === 'username' || setting.key === 'password') {
+ display = false;
+ }
+ } else {
+ if (setting.key === 'token') {
+ display = false;
+ }
+ }
+ return display;
+ };
+
+ $scope.clearAuthSettings = function () {
+ for (var key in $scope.model.settings) {
+ if (key === 'token' || key === 'username' || key === 'password') {
+ $scope.model.settings[key] = '';
+ }
+ }
+ };
+ }
+ };
+});
\ No newline at end of file
diff --git a/app/directives/vmsFormDirective.js b/app/directives/vmsFormDirective.js
deleted file mode 100644
index 08d6715..0000000
--- a/app/directives/vmsFormDirective.js
+++ /dev/null
@@ -1,12 +0,0 @@
-app.directive('vmsForm', function () {
- return {
- templateUrl: 'views/directives/vmsForm.html',
- restrict: 'E',
- replace: false,
- scope: {
- 'managementSettings': '=',
- 'model': '='
- },
- link: function ($scope) {}
- };
-});
\ No newline at end of file
diff --git a/app/index.html b/app/index.html
old mode 100755
new mode 100644
index 3545ec7..da3defd
--- a/app/index.html
+++ b/app/index.html
@@ -46,9 +46,9 @@
Id | +Name | +Project | +Number of Cards | +Total Points | +
---|---|---|---|---|
{{sprint.id}} | +{{sprint.name}} | +{{sprint.project}} | +{{sprint.cards.length}} | +{{getSprintEstimateTotal(sprint)}} | +
{{card.name}}
+Project | +Total Backlog Items | +Feature Count | +Defect Count | +Request Count | +Issue Count | +
---|---|---|---|---|---|
{{project.name}} | +{{project.stats.backlogItemCount}} | +{{project.stats.featureCount}} | +{{project.stats.defectCount}} | +{{project.stats.requestCount}} | +{{project.stats.issueCount}} | +
Project | +Remote Project Manager | +Remote Project | +Scope Id | +Actions | +|||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{project.name}} | -{{project.versionManagementSoftware.name}} | -{{getVersionProject(project).name}} | +{{project.remoteProjectManager.name}} | +{{project.remoteProject.name}} | {{project.scopeId}} |
diff --git a/app/views/management/remoteProjectManager.html b/app/views/management/remoteProjectManager.html
new file mode 100644
index 0000000..a98978d
--- /dev/null
+++ b/app/views/management/remoteProjectManager.html
@@ -0,0 +1,32 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/views/management/statuses.html b/app/views/management/statuses.html
new file mode 100644
index 0000000..4133a08
--- /dev/null
+++ b/app/views/management/statuses.html
@@ -0,0 +1,25 @@
++ +
+
+
+
\ No newline at end of file
diff --git a/app/views/management/users.html b/app/views/management/users.html
index 7660816..be64748 100644
--- a/app/views/management/users.html
+++ b/app/views/management/users.html
@@ -2,10 +2,10 @@
+ +
-
+
-
\ No newline at end of file
diff --git a/app/views/management/versionManagementSoftware.html b/app/views/management/versionManagementSoftware.html
deleted file mode 100644
index dbe5206..0000000
--- a/app/views/management/versionManagementSoftware.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
+
-
-
\ No newline at end of file
+UsersUsers
-
-
-
\ No newline at end of file
diff --git a/app/views/modals/addProjectModal.html b/app/views/modals/addProjectModal.html
index 557a593..931a612 100644
--- a/app/views/modals/addProjectModal.html
+++ b/app/views/modals/addProjectModal.html
@@ -1,5 +1,7 @@
- -
-
+
@@ -8,33 +10,27 @@ Create ProjectCreate Project
-
\ No newline at end of file
diff --git a/app/views/modals/editProjectModal.html b/app/views/modals/editProjectModal.html
index 19502b1..3c28168 100644
--- a/app/views/modals/editProjectModal.html
+++ b/app/views/modals/editProjectModal.html
@@ -1,5 +1,7 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/views/modals/addRemoteProjectManagerModal.html b/app/views/modals/addRemoteProjectManagerModal.html
new file mode 100644
index 0000000..ff8e9cc
--- /dev/null
+++ b/app/views/modals/addRemoteProjectManagerModal.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/modals/addStatusModal.html b/app/views/modals/addStatusModal.html
new file mode 100644
index 0000000..5fd0e07
--- /dev/null
+++ b/app/views/modals/addStatusModal.html
@@ -0,0 +1,41 @@
+Create Remote Project Manager+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/modals/addVmsModal.html b/app/views/modals/addVmsModal.html
deleted file mode 100644
index cd2276d..0000000
--- a/app/views/modals/addVmsModal.html
+++ /dev/null
@@ -1,43 +0,0 @@
-Create Status+
-
-
-
-
\ No newline at end of file
diff --git a/app/views/modals/deleteRemoteProjectManagerModal.html b/app/views/modals/deleteRemoteProjectManagerModal.html
new file mode 100644
index 0000000..12e8fc8
--- /dev/null
+++ b/app/views/modals/deleteRemoteProjectManagerModal.html
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/app/views/modals/deleteVmsModal.html b/app/views/modals/deleteStatusModal.html
similarity index 60%
rename from app/views/modals/deleteVmsModal.html
rename to app/views/modals/deleteStatusModal.html
index 92e6d34..d3f68ea 100644
--- a/app/views/modals/deleteVmsModal.html
+++ b/app/views/modals/deleteStatusModal.html
@@ -1,14 +1,16 @@
-Create Version Management Software-
-
+
@@ -7,37 +9,30 @@ Edit ProjectEdit Project
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/modals/editRemoteProjectManagerModal.html b/app/views/modals/editRemoteProjectManagerModal.html
new file mode 100644
index 0000000..cb4102a
--- /dev/null
+++ b/app/views/modals/editRemoteProjectManagerModal.html
@@ -0,0 +1,24 @@
+
-
-
-
-
-
+
+
+
-
+
+
+
+
\ No newline at end of file
diff --git a/app/views/modals/editStatusModal.html b/app/views/modals/editStatusModal.html
new file mode 100644
index 0000000..f47785e
--- /dev/null
+++ b/app/views/modals/editStatusModal.html
@@ -0,0 +1,43 @@
+Edit Remote Project Manager+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/modals/editVmsModal.html b/app/views/modals/editVmsModal.html
deleted file mode 100644
index 5e18ae0..0000000
--- a/app/views/modals/editVmsModal.html
+++ /dev/null
@@ -1,44 +0,0 @@
-Edit Status+
-
-
-
-
\ No newline at end of file
diff --git a/app/views/theme.html b/app/views/theme.html
old mode 100755
new mode 100644
diff --git a/karma.conf.js b/karma.conf.js
old mode 100755
new mode 100644
diff --git a/package-lock.json b/package-lock.json
index 3e158e4..564d1c2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3965,12 +3965,6 @@
"integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=",
"dev": true
},
- "jasmine-promise-matchers": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/jasmine-promise-matchers/-/jasmine-promise-matchers-2.5.0.tgz",
- "integrity": "sha1-TBvf85qk8bBKtxzawluSt7LhpjA=",
- "dev": true
- },
"jasminewd2": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz",
@@ -6253,7 +6247,7 @@
"dev": true
},
"weaver-ui-core": {
- "version": "git+https://github.com/TAMULib/Weaver-UI-Core.git#329868fbfa1a8d4edcd5ca67994aa6269c3dfaa6",
+ "version": "git+https://github.com/TAMULib/Weaver-UI-Core.git#7f24204645998e80f10d8efc6f53cda947a92884",
"requires": {
"angular": "1.6.5",
"angular-loader": "1.6.5",
diff --git a/package.json b/package.json
old mode 100755
new mode 100644
index 9a0e27d..598a7fa
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "project-management",
- "private": true,
+ "private": false,
"version": "1.0.0",
"description": "A UI for managing projects",
"repository": "https://github.com/TAMULib/ProjectManagementUI.git",
@@ -36,7 +36,6 @@
"grunt-karma-coveralls": "2.5.4",
"grunt-sass": "2.0.0",
"grunt-usemin": "3.1.1",
- "jasmine-promise-matchers": "2.5.0",
"jshint-stylish": "2.2.1",
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
@@ -47,4 +46,4 @@
"karma-ng-html2js-preprocessor": "1.0.0",
"protractor": "5.1.2"
}
-}
\ No newline at end of file
+}
diff --git a/tests/e2e/auth-spec.js b/tests/e2e/auth-spec.js
old mode 100755
new mode 100644
diff --git a/tests/e2e/index-spec.js b/tests/e2e/index-spec.js
old mode 100755
new mode 100644
diff --git a/tests/e2e/protractor.conf.js b/tests/e2e/protractor.conf.js
old mode 100755
new mode 100644
diff --git a/tests/e2e/users-spec.js b/tests/e2e/users-spec.js
old mode 100755
new mode 100644
diff --git a/tests/mocks/models/mockAssumedControl.js b/tests/mocks/models/mockAssumedControl.js
old mode 100755
new mode 100644
index 66d8d09..b5761e5
--- a/tests/mocks/models/mockAssumedControl.js
+++ b/tests/mocks/models/mockAssumedControl.js
@@ -29,7 +29,6 @@ var mockAssumedControl3 = {
'status': ''
};
-angular.module('mock.AssumedControl', []).
-service('AssumedControl', function ($q) {
+angular.module('mock.AssumedControl', []).service('AssumedControl', function ($q) {
return this;
});
\ No newline at end of file
diff --git a/tests/mocks/models/mockRemoteProjectManager.js b/tests/mocks/models/mockRemoteProjectManager.js
new file mode 100644
index 0000000..0c72213
--- /dev/null
+++ b/tests/mocks/models/mockRemoteProjectManager.js
@@ -0,0 +1,8 @@
+angular.module('mock.remoteProjectManager', []).service('RemoteProjectManager', function () {
+
+ this.save = function () {};
+ this.dirty = function (bool) {};
+ this.refresh = function () {};
+
+ return this;
+});
\ No newline at end of file
diff --git a/tests/mocks/models/mockStatus.js b/tests/mocks/models/mockStatus.js
new file mode 100644
index 0000000..7b18ce1
--- /dev/null
+++ b/tests/mocks/models/mockStatus.js
@@ -0,0 +1,10 @@
+angular.module('mock.status', []).service('Status', function () {
+
+ this.mapping = [];
+
+ this.save = function () {};
+ this.dirty = function (bool) {};
+ this.refresh = function () {};
+
+ return this;
+});
\ No newline at end of file
diff --git a/tests/mocks/models/mockUser.js b/tests/mocks/models/mockUser.js
old mode 100755
new mode 100644
index 5a5a012..7047ec8
--- a/tests/mocks/models/mockUser.js
+++ b/tests/mocks/models/mockUser.js
@@ -28,7 +28,6 @@ var mockUser3 = {
"netId": "jsmith"
};
-angular.module('mock.user', []).
-service('User', function ($q) {
+angular.module('mock.user', []).service('User', function ($q) {
return this;
});
\ No newline at end of file
diff --git a/tests/mocks/models/mockVersionManagementSoftware.js b/tests/mocks/models/mockVersionManagementSoftware.js
deleted file mode 100644
index 0c41c38..0000000
--- a/tests/mocks/models/mockVersionManagementSoftware.js
+++ /dev/null
@@ -1,9 +0,0 @@
-angular.module('mock.versionManagementSoftware', []).service('VersionManagementSoftware', function() {
- var VersionManagementSoftware = this;
-
- this.save = function() {};
- this.dirty = function(bool) {};
- this.refresh = function() {};
-
- return VersionManagementSoftware;
-});
\ No newline at end of file
diff --git a/tests/mocks/repo/mockProjectRepo.js b/tests/mocks/repo/mockProjectRepo.js
index 4ba0243..8de924d 100644
--- a/tests/mocks/repo/mockProjectRepo.js
+++ b/tests/mocks/repo/mockProjectRepo.js
@@ -53,6 +53,10 @@ angular.module('mock.projectRepo', []).service('ProjectRepo', function ($q) {
}
};
+ this.reset = function () {
+
+ };
+
this.ready = function () {
var defer = $q.defer();
defer.resolve();
diff --git a/tests/mocks/repo/mockRemoteProjectManagerRepo.js b/tests/mocks/repo/mockRemoteProjectManagerRepo.js
new file mode 100644
index 0000000..739ef54
--- /dev/null
+++ b/tests/mocks/repo/mockRemoteProjectManagerRepo.js
@@ -0,0 +1,90 @@
+var mockRemoteProjectManageres = [{
+ "id": 1,
+ "name": "Test 1",
+ "type": "VERSION_ONE",
+ "settings": {
+ "password": "password1",
+ "url": "url1",
+ "username": "username1"
+ }
+},
+{
+ "id": 2,
+ "name": "Test 2",
+ "type": "VERSION_ONE",
+ "settings": {
+ "password": "password2",
+ "url": "url2",
+ "username": "username2"
+ }
+},
+{
+ "id": 3,
+ "name": "Test 3",
+ "type": "VERSION_ONE",
+ "settings": {
+ "password": "password3",
+ "url": "url3",
+ "username": "username3"
+ }
+}
+];
+
+angular.module('mock.remoteProjectManagerRepo', []).service('RemoteProjectManagerRepo', function ($q) {
+
+this.scaffold = {};
+
+this.list = mockRemoteProjectManageres;
+
+this.getAll = function () {
+ var defer = $q.defer();
+ defer.resolve(this.list);
+ return defer.promise;
+};
+
+this.findById = function (id) {
+ for (var i in this.list) {
+ if (this.list[i].id === id) {
+ return this.list[i];
+ }
+ }
+};
+
+this.getScaffold = function (defaults) {
+ if (!defaults) defaults = {};
+ return angular.copy(angular.extend(this.scaffold, defaults));
+};
+
+this.getTypes = function () {
+ var defer = $q.defer();
+ defer.resolve();
+ return defer.promise;
+};
+
+this.create = function (remoteProjectManager) {
+ var defer = $q.defer();
+ remoteProjectManager.id = this.list.length + 1;
+ this.list.push(remoteProjectManager);
+ defer.resolve(remoteProjectManager);
+ return defer.promise;
+};
+
+this.getValidations = function () {};
+
+this.clearValidationResults = function () {};
+
+this.ready = function () {
+ var defer = $q.defer();
+ defer.resolve();
+ return defer.promise;
+};
+
+this.getTypeScaffolding = function (type) {};
+
+this.listen = function () {};
+
+this.delete = function () {};
+
+return this;
+
+});
\ No newline at end of file
diff --git a/tests/mocks/repo/mockStatusRepo.js b/tests/mocks/repo/mockStatusRepo.js
new file mode 100644
index 0000000..899b152
--- /dev/null
+++ b/tests/mocks/repo/mockStatusRepo.js
@@ -0,0 +1,105 @@
+var mockStatuses = [{
+ "id": 1,
+ "identifier": "None",
+ "mapping": [
+ "None",
+ "Future"
+ ]
+ },
+ {
+ "id": 2,
+ "identifier": "In Progress",
+ "mapping": [
+ "In Progress"
+ ]
+ },
+ {
+ "id": 3,
+ "identifier": "Done",
+ "mapping": [
+ "Done"
+ ]
+ },
+ {
+ "id": 4,
+ "identifier": "Accepted",
+ "mapping": [
+ "Accepted"
+ ]
+ }
+];
+
+angular.module('mock.statusRepo', []).service('StatusRepo', function ($q) {
+
+ this.list = mockStatuses;
+
+ this.create = function (project) {
+ var defer = $q.defer();
+ project.id = this.list.length + 1;
+ this.list.push(project);
+ defer.resolve(project);
+ return defer.promise;
+ };
+
+ this.update = function (project) {
+ var defer = $q.defer();
+ for (var i in this.list) {
+ if (this.list[i].id === project.id) {
+ angular.extend(this.list[i], project);
+ project = this.list[i];
+ break;
+ }
+ }
+ defer.resolve(project);
+ return defer.promise;
+ };
+
+ this.delete = function (project) {};
+
+ this.getAll = function () {
+ var defer = $q.defer();
+ defer.resolve(this.list);
+ return defer.promise;
+ };
+
+ this.findById = function (id) {
+ for (var i in this.list) {
+ if (this.list[i].id === id) {
+ return this.list[i];
+ }
+ }
+ };
+
+ this.ready = function () {
+ var defer = $q.defer();
+ defer.resolve();
+ return defer.promise;
+ };
+
+ this.scaffold = {
+
+ };
+
+ this.getScaffold = function (defaults) {
+ if (!defaults) defaults = {};
+ return angular.copy(angular.extend(this.scaffold, defaults));
+ };
+
+ var validations = {
+
+ };
+
+ this.getValidations = function () {
+ return validations;
+ };
+
+ this.clearValidationResults = function () {
+
+ };
+
+ this.listen = function () {
+
+ };
+
+ return this;
+});
\ No newline at end of file
diff --git a/tests/mocks/repo/mockUserRepo.js b/tests/mocks/repo/mockUserRepo.js
old mode 100755
new mode 100644
diff --git a/tests/mocks/repo/mockVersionManagementSoftwareRepo.js b/tests/mocks/repo/mockVersionManagementSoftwareRepo.js
deleted file mode 100644
index c06b553..0000000
--- a/tests/mocks/repo/mockVersionManagementSoftwareRepo.js
+++ /dev/null
@@ -1,90 +0,0 @@
-var mockVmses = [{
- "id": 1,
- "name": "Test 1",
- "type": "VERSION_ONE",
- "settings": {
- "password": "password1",
- "url": "url1",
- "username": "username1"
- }
- },
- {
- "id": 2,
- "name": "Test 2",
- "type": "VERSION_ONE",
- "settings": {
- "password": "password2",
- "url": "url2",
- "username": "username2"
- }
- },
- {
- "id": 3,
- "name": "Test 3",
- "type": "VERSION_ONE",
- "settings": {
- "password": "password3",
- "url": "url3",
- "username": "username3"
- }
- }
-];
-
-angular.module('mock.versionManagementSoftwareRepo', []).service('VersionManagementSoftwareRepo', function ($q) {
-
- this.scaffold = {};
-
- this.list = mockVmses;
-
- this.getAll = function () {
- var defer = $q.defer();
- defer.resolve(this.list);
- return defer.promise;
- };
-
- this.findById = function (id) {
- for (var i in this.list) {
- if (this.list[i].id === id) {
- return this.list[i];
- }
- }
- };
-
- this.getScaffold = function (defaults) {
- if (!defaults) defaults = {};
- return angular.copy(angular.extend(this.scaffold, defaults));
- };
-
- this.getTypes = function () {
- var defer = $q.defer();
- defer.resolve();
- return defer.promise;
- };
-
- this.create = function (vms) {
- var defer = $q.defer();
- vms.id = this.list.length + 1;
- this.list.push(vms);
- defer.resolve(vms);
- return defer.promise;
- };
-
- this.getValidations = function () {};
-
- this.clearValidationResults = function () {};
-
- this.ready = function () {
- var defer = $q.defer();
- defer.resolve();
- return defer.promise;
- };
-
- this.getTypeScaffolding = function (type) {};
-
- this.listen = function () {};
-
- this.delete = function () {};
-
- return this;
-
-});
\ No newline at end of file
diff --git a/tests/mocks/services/mockActiveSprintsService.js b/tests/mocks/services/mockActiveSprintsService.js
new file mode 100644
index 0000000..05ac111
--- /dev/null
+++ b/tests/mocks/services/mockActiveSprintsService.js
@@ -0,0 +1,93 @@
+var mockActiveSprints = [{
+ "id": "7820",
+ "name": "Sprint 3",
+ "project": "chronam",
+ "cards": [{
+ "id": "7802",
+ "number": "B-03351",
+ "type": "Feature",
+ "status": "Accepted",
+ "name": "As a Customer I want to see 8 random issues on the front page, so that blank entries don't ever show",
+ "estimate": 2,
+ "assignees": []
+ }, {
+ "id": "7803",
+ "number": "D-01153",
+ "type": "Defect",
+ "status": "Accepted",
+ "name": "Date limiting functionallity in search not working.",
+ "estimate": 3,
+ "assignees": []
+ }, {
+ "id": "7804",
+ "number": "B-03352",
+ "type": "Feature",
+ "status": "Accepted",
+ "name": "Remove route for for viewing MARC records.",
+ "estimate": 0,
+ "assignees": []
+ }, {
+ "id": "7805",
+ "number": "B-03353",
+ "type": "Feature",
+ "status": "Done",
+ "name": "Add pagination to bottom of search results.",
+ "estimate": 0.5,
+ "assignees": []
+ }, {
+ "id": "7806",
+ "number": "B-03354",
+ "type": "Feature",
+ "status": "Accepted",
+ "name": "Add metadata to search results",
+ "estimate": 3,
+ "assignees": []
+ }, {
+ "id": "7854",
+ "number": "B-03367",
+ "type": "Feature",
+ "status": "Done",
+ "name": "Rearrange and remove uneeded fields from advanced search page.",
+ "assignees": []
+ }, {
+ "id": "7856",
+ "number": "B-03369",
+ "type": "Feature",
+ "status": "Accepted",
+ "name": "Search bar should redirect to search results when submitted.",
+ "assignees": []
+ }, {
+ "id": "7859",
+ "number": "D-01155",
+ "type": "Defect",
+ "status": "Accepted",
+ "name": "Batch loading is failing on call to library of congress' website.",
+ "description": "Edit Version Managent Software-Attempting to retrieve an xml file from the LC website, but being denied permission. \nMoved a copy of the file to: \nhttp://php.library.tamu.edu/marc.xml \nAnd now hitting that url for the file. ", + "assignees": [{ + "id": "6616", + "name": "Ryan Laddusaw", + "avatar": "no_avatar.png" + }] + }, { + "id": "7860", + "number": "B-03370", + "type": "Feature", + "status": "Accepted", + "name": "Add advanced search link.", + "assignees": [{ + "id": "6616", + "name": "Ryan Laddusaw", + "avatar": "no_avatar.png" + }] + }] +}]; + +angular.module('mock.activeSprintsService', []).service('ActiveSprintsService', function ($q) { + + this.getActiveSprints = function () { + return mockActiveSprints; + }; + + this.updated = $q.defer().promise; + +}); \ No newline at end of file diff --git a/tests/mocks/services/mockProjectsStatsService.js b/tests/mocks/services/mockProjectsStatsService.js new file mode 100644 index 0000000..7775062 --- /dev/null +++ b/tests/mocks/services/mockProjectsStatsService.js @@ -0,0 +1,478 @@ +var mockProjectsStats = [{ + "id": "1", + "name": "Legacy DSpace", + "requestCount": 22, + "issueCount": 41, + "featureCount": 32, + "defectCount": 0, + "backlogItemCount": 32 +}, { + "id": "2", + "name": "Code Management - Maps", + "requestCount": 0, + "issueCount": 0, + "featureCount": 5, + "defectCount": 0, + "backlogItemCount": 5 +}, { + "id": "3", + "name": "CORAL - Electronic Resource Management", + "requestCount": 2, + "issueCount": 0, + "featureCount": 12, + "defectCount": 8, + "backlogItemCount": 20 +}, { + "id": "4", + "name": "Piper - Automated Ingest", + "requestCount": 8, + "issueCount": 0, + "featureCount": 42, + "defectCount": 0, + "backlogItemCount": 42 +}, { + "id": "5", + "name": "Vireo", + "requestCount": 0, + "issueCount": 0, + "featureCount": 6, + "defectCount": 0, + "backlogItemCount": 6 +}, { + "id": "6", + "name": "Pelican", + "requestCount": 0, + "issueCount": 0, + "featureCount": 43, + "defectCount": 0, + "backlogItemCount": 43 +}, { + "id": "7", + "name": "VIVO", + "requestCount": 0, + "issueCount": 0, + "featureCount": 4, + "defectCount": 0, + "backlogItemCount": 4 +}, { + "id": "8", + "name": "Health Based MSL", + "requestCount": 0, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 +}, { + "id": "9", + "name": "ORCID", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 +}, { + "id": "10", + "name": "MIS Reports", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "11", + "name": "Collaborative Book Reader", + "requestCount": 0, + "issueCount": 0, + "featureCount": 38, + "defectCount": 0, + "backlogItemCount": 38 +}, { + "id": "12", + "name": "DI Internal", + "requestCount": 1, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 +}, { + "id": "13", + "name": "LibCat", + "requestCount": 0, + "issueCount": 0, + "featureCount": 9, + "defectCount": 0, + "backlogItemCount": 9 +}, { + "id": "14", + "name": "Vireo - Undergraduate", + "requestCount": 0, + "issueCount": 1, + "featureCount": 5, + "defectCount": 0, + "backlogItemCount": 5 +}, { + "id": "15", + "name": "Key Database", + "requestCount": 0, + "issueCount": 0, + "featureCount": 13, + "defectCount": 0, + "backlogItemCount": 13 +}, { + "id": "16", + "name": "MyLibrary Application", + "requestCount": 3, + "issueCount": 4, + "featureCount": 25, + "defectCount": 6, + "backlogItemCount": 31 +}, { + "id": "17", + "name": "DSpace", + "requestCount": 5, + "issueCount": 1, + "featureCount": 16, + "defectCount": 3, + "backlogItemCount": 19 +}, { + "id": "18", + "name": "iRODS", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 0, + "backlogItemCount": 18 +}, { + "id": "19", + "name": "Hours Application", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "20", + "name": "MAGPIE", + "requestCount": 9, + "issueCount": 9, + "featureCount": 24, + "defectCount": 1, + "backlogItemCount": 25 +}, { + "id": "21", + "name": "Directory App Rewrite", + "requestCount": 6, + "issueCount": 11, + "featureCount": 6, + "defectCount": 2, + "backlogItemCount": 8 +}, { + "id": "22", + "name": "Digital Asset Management Ecosystem", + "requestCount": 0, + "issueCount": 2, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 +}, { + "id": "23", + "name": "Applications", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "24", + "name": "Legacy Projects", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "25", + "name": "Subject Librarians", + "requestCount": 7, + "issueCount": 2, + "featureCount": 4, + "defectCount": 1, + "backlogItemCount": 5 +}, { + "id": "26", + "name": "Dev Ops", + "requestCount": 0, + "issueCount": 0, + "featureCount": 2, + "defectCount": 1, + "backlogItemCount": 3 +}, { + "id": "27", + "name": "DSpace UI Prototype", + "requestCount": 0, + "issueCount": 0, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 +}, { + "id": "28", + "name": "Library Cascade", + "requestCount": 0, + "issueCount": 0, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 +}, { + "id": "29", + "name": "Instructional Request Manager - Old", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "30", + "name": "Weaver (Spring/Angular Frameworks)", + "requestCount": 0, + "issueCount": 1, + "featureCount": 24, + "defectCount": 0, + "backlogItemCount": 24 +}, { + "id": "31", + "name": "Sugar CRM UI rewrite", + "requestCount": 0, + "issueCount": 2, + "featureCount": 2, + "defectCount": 0, + "backlogItemCount": 2 +}, { + "id": "32", + "name": "Catalog Services", + "requestCount": 1, + "issueCount": 0, + "featureCount": 9, + "defectCount": 0, + "backlogItemCount": 9 +}, { + "id": "33", + "name": "Digital Aggieland Portal", + "requestCount": 0, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 +}, { + "id": "34", + "name": "Instructional Apps", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 5, + "backlogItemCount": 23 +}, { + "id": "35", + "name": "Instructional Statistics Manager - Old", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "36", + "name": "Instructional Database", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "37", + "name": "Automatic Metadata Assignment", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "38", + "name": "Semi-Automatic NALT Indexer", + "requestCount": 8, + "issueCount": 0, + "featureCount": 5, + "defectCount": 1, + "backlogItemCount": 6 +}, { + "id": "39", + "name": "Development", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "40", + "name": "Development Services", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 +}, { + "id": "41", + "name": "Application Services", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 +}, { + "id": "42", + "name": "VersionOne Service", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 0, + "backlogItemCount": 1 +}, { + "id": "43", + "name": "Sugar", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 2, + "backlogItemCount": 3 +}, { + "id": "44", + "name": "PHP MicroServices", + "requestCount": 0, + "issueCount": 0, + "featureCount": 4, + "defectCount": 0, + "backlogItemCount": 4 +}, { + "id": "45", + "name": "SharePoint", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 0, + "backlogItemCount": 1 +}, { + "id": "46", + "name": "SFFRD", + "requestCount": 0, + "issueCount": 0, + "featureCount": 5, + "defectCount": 5, + "backlogItemCount": 10 +}, { + "id": "47", + "name": "Instructional Request Manager", + "requestCount": 5, + "issueCount": 2, + "featureCount": 5, + "defectCount": 1, + "backlogItemCount": 6 +}, { + "id": "48", + "name": "Instructional Statistics Manager", + "requestCount": 2, + "issueCount": 0, + "featureCount": 4, + "defectCount": 1, + "backlogItemCount": 5 +}, { + "id": "49", + "name": "Organization Chart", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 1, + "backlogItemCount": 19 +}, { + "id": "50", + "name": "Library Service Status System", + "requestCount": 1, + "issueCount": 0, + "featureCount": 34, + "defectCount": 4, + "backlogItemCount": 38 +}, { + "id": "51", + "name": "Fedora", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "52", + "name": "Spotlight", + "requestCount": 2, + "issueCount": 0, + "featureCount": 19, + "defectCount": 2, + "backlogItemCount": 21 +}, { + "id": "53", + "name": "IIIF Generation Service", + "requestCount": 1, + "issueCount": 0, + "featureCount": 2, + "defectCount": 1, + "backlogItemCount": 3 +}, { + "id": "54", + "name": "chronam", + "requestCount": 1, + "issueCount": 0, + "featureCount": 10, + "defectCount": 2, + "backlogItemCount": 12 +}, { + "id": "55", + "name": "Cap", + "requestCount": 0, + "issueCount": 0, + "featureCount": 11, + "defectCount": 0, + "backlogItemCount": 11 +}, { + "id": "56", + "name": "SAGE", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 +}, { + "id": "57", + "name": "Project Management Service", + "requestCount": 0, + "issueCount": 0, + "featureCount": 17, + "defectCount": 1, + "backlogItemCount": 18 +}]; + +angular.module('mock.projectsStatsService', []).service('ProjectsStatsService', function ($q) { + + this.getProjectsStats = function () { + return mockProjectsStats; + }; + + this.getById = function (id) { + return $q(function (resolve, reject) { + for (var i in projectsStats) { + if (projectsStats[i].id == id) { + resolve(projectsStats[i]); + } + } + reject(undefined); + }); + }; + + this.ready = $q.defer().promise; + +}); \ No newline at end of file diff --git a/tests/mocks/services/mockRemoteProjectService.js b/tests/mocks/services/mockRemoteProjectService.js new file mode 100644 index 0000000..58fe20d --- /dev/null +++ b/tests/mocks/services/mockRemoteProjectService.js @@ -0,0 +1,480 @@ +var mockRemoteProjects = { + "1": [{ + "id": "1934", + "name": "Legacy DSpace", + "requestCount": 22, + "issueCount": 41, + "featureCount": 32, + "defectCount": 0, + "backlogItemCount": 32 + }, { + "id": "3781", + "name": "Code Management - Maps", + "requestCount": 0, + "issueCount": 0, + "featureCount": 5, + "defectCount": 0, + "backlogItemCount": 5 + }, { + "id": "3783", + "name": "CORAL - Electronic Resource Management", + "requestCount": 2, + "issueCount": 0, + "featureCount": 12, + "defectCount": 8, + "backlogItemCount": 20 + }, { + "id": "3786", + "name": "Piper - Automated Ingest", + "requestCount": 8, + "issueCount": 0, + "featureCount": 42, + "defectCount": 0, + "backlogItemCount": 42 + }, { + "id": "3789", + "name": "Vireo", + "requestCount": 0, + "issueCount": 0, + "featureCount": 6, + "defectCount": 0, + "backlogItemCount": 6 + }, { + "id": "3798", + "name": "Pelican", + "requestCount": 0, + "issueCount": 0, + "featureCount": 43, + "defectCount": 0, + "backlogItemCount": 43 + }, { + "id": "3816", + "name": "VIVO", + "requestCount": 0, + "issueCount": 0, + "featureCount": 4, + "defectCount": 0, + "backlogItemCount": 4 + }, { + "id": "3930", + "name": "Health Based MSL", + "requestCount": 0, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 + }, { + "id": "3968", + "name": "ORCID", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 + }, { + "id": "4114", + "name": "MIS Reports", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "4182", + "name": "Collaborative Book Reader", + "requestCount": 0, + "issueCount": 0, + "featureCount": 38, + "defectCount": 0, + "backlogItemCount": 38 + }, { + "id": "4262", + "name": "DI Internal", + "requestCount": 1, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 + }, { + "id": "4391", + "name": "LibCat", + "requestCount": 0, + "issueCount": 0, + "featureCount": 9, + "defectCount": 0, + "backlogItemCount": 9 + }, { + "id": "4557", + "name": "Vireo - Undergraduate", + "requestCount": 0, + "issueCount": 1, + "featureCount": 5, + "defectCount": 0, + "backlogItemCount": 5 + }, { + "id": "4731", + "name": "Key Database", + "requestCount": 0, + "issueCount": 0, + "featureCount": 13, + "defectCount": 0, + "backlogItemCount": 13 + }, { + "id": "4871", + "name": "MyLibrary Application", + "requestCount": 3, + "issueCount": 4, + "featureCount": 25, + "defectCount": 6, + "backlogItemCount": 31 + }, { + "id": "4889", + "name": "DSpace", + "requestCount": 5, + "issueCount": 1, + "featureCount": 16, + "defectCount": 3, + "backlogItemCount": 19 + }, { + "id": "4912", + "name": "iRODS", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 0, + "backlogItemCount": 18 + }, { + "id": "4965", + "name": "Hours Application", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "5070", + "name": "MAGPIE", + "requestCount": 9, + "issueCount": 9, + "featureCount": 24, + "defectCount": 1, + "backlogItemCount": 25 + }, { + "id": "5270", + "name": "Directory App Rewrite", + "requestCount": 6, + "issueCount": 11, + "featureCount": 6, + "defectCount": 2, + "backlogItemCount": 8 + }, { + "id": "5342", + "name": "Digital Asset Management Ecosystem", + "requestCount": 0, + "issueCount": 2, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 + }, { + "id": "5523", + "name": "Applications", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "5524", + "name": "Legacy Projects", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "5525", + "name": "Subject Librarians", + "requestCount": 7, + "issueCount": 2, + "featureCount": 4, + "defectCount": 1, + "backlogItemCount": 5 + }, { + "id": "5798", + "name": "Dev Ops", + "requestCount": 0, + "issueCount": 0, + "featureCount": 2, + "defectCount": 1, + "backlogItemCount": 3 + }, { + "id": "5870", + "name": "DSpace UI Prototype", + "requestCount": 0, + "issueCount": 0, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 + }, { + "id": "5910", + "name": "Library Cascade", + "requestCount": 0, + "issueCount": 0, + "featureCount": 8, + "defectCount": 0, + "backlogItemCount": 8 + }, { + "id": "5962", + "name": "Instructional Request Manager - Old", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "6004", + "name": "Weaver (Spring/Angular Frameworks)", + "requestCount": 0, + "issueCount": 1, + "featureCount": 24, + "defectCount": 0, + "backlogItemCount": 24 + }, { + "id": "6029", + "name": "Sugar CRM UI rewrite", + "requestCount": 0, + "issueCount": 2, + "featureCount": 2, + "defectCount": 0, + "backlogItemCount": 2 + }, { + "id": "6126", + "name": "Catalog Services", + "requestCount": 1, + "issueCount": 0, + "featureCount": 9, + "defectCount": 0, + "backlogItemCount": 9 + }, { + "id": "6157", + "name": "Digital Aggieland Portal", + "requestCount": 0, + "issueCount": 0, + "featureCount": 10, + "defectCount": 0, + "backlogItemCount": 10 + }, { + "id": "6368", + "name": "Instructional Apps", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 5, + "backlogItemCount": 23 + }, { + "id": "6369", + "name": "Instructional Statistics Manager - Old", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "6373", + "name": "Instructional Database", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "6486", + "name": "Automatic Metadata Assignment", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "6487", + "name": "Semi-Automatic NALT Indexer", + "requestCount": 8, + "issueCount": 0, + "featureCount": 5, + "defectCount": 1, + "backlogItemCount": 6 + }, { + "id": "6620", + "name": "Development", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "6625", + "name": "Development Services", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 + }, { + "id": "6626", + "name": "Application Services", + "requestCount": 0, + "issueCount": 0, + "featureCount": 3, + "defectCount": 0, + "backlogItemCount": 3 + }, { + "id": "6627", + "name": "VersionOne Service", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 0, + "backlogItemCount": 1 + }, { + "id": "6629", + "name": "Sugar", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 2, + "backlogItemCount": 3 + }, { + "id": "6664", + "name": "PHP MicroServices", + "requestCount": 0, + "issueCount": 0, + "featureCount": 4, + "defectCount": 0, + "backlogItemCount": 4 + }, { + "id": "6828", + "name": "SharePoint", + "requestCount": 0, + "issueCount": 0, + "featureCount": 1, + "defectCount": 0, + "backlogItemCount": 1 + }, { + "id": "7001", + "name": "SFFRD", + "requestCount": 0, + "issueCount": 0, + "featureCount": 5, + "defectCount": 5, + "backlogItemCount": 10 + }, { + "id": "7036", + "name": "Instructional Request Manager", + "requestCount": 5, + "issueCount": 2, + "featureCount": 5, + "defectCount": 1, + "backlogItemCount": 6 + }, { + "id": "7037", + "name": "Instructional Statistics Manager", + "requestCount": 2, + "issueCount": 0, + "featureCount": 4, + "defectCount": 1, + "backlogItemCount": 5 + }, { + "id": "7400", + "name": "Organization Chart", + "requestCount": 0, + "issueCount": 0, + "featureCount": 18, + "defectCount": 1, + "backlogItemCount": 19 + }, { + "id": "7509", + "name": "Library Service Status System", + "requestCount": 1, + "issueCount": 0, + "featureCount": 34, + "defectCount": 4, + "backlogItemCount": 38 + }, { + "id": "7516", + "name": "Fedora", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "7517", + "name": "Spotlight", + "requestCount": 2, + "issueCount": 0, + "featureCount": 19, + "defectCount": 2, + "backlogItemCount": 21 + }, { + "id": "7529", + "name": "IIIF Generation Service", + "requestCount": 1, + "issueCount": 0, + "featureCount": 2, + "defectCount": 1, + "backlogItemCount": 3 + }, { + "id": "7797", + "name": "chronam", + "requestCount": 1, + "issueCount": 0, + "featureCount": 10, + "defectCount": 2, + "backlogItemCount": 12 + }, { + "id": "7869", + "name": "Cap", + "requestCount": 0, + "issueCount": 0, + "featureCount": 11, + "defectCount": 0, + "backlogItemCount": 11 + }, { + "id": "7934", + "name": "SAGE", + "requestCount": 0, + "issueCount": 0, + "featureCount": 0, + "defectCount": 0, + "backlogItemCount": 0 + }, { + "id": "7948", + "name": "Project Management Service", + "requestCount": 0, + "issueCount": 0, + "featureCount": 17, + "defectCount": 1, + "backlogItemCount": 18 + }] +}; + +angular.module('mock.remoteProjectService', []).service('RemoteProjectsService', function ($q) { + + this.getRemoteProjects = function () { + return mockRemoteProjects; + }; + + this.getByScopeId = function (remoteProjectManagerId, scopeId) { + return $q(function (resolve, reject) { + for (var i in mockRemoteProjects[remoteProjectManagerId]) { + if (mockRemoteProjects[remoteProjectManagerId][i].id === scopeId) { + resolve(mockRemoteProjects[remoteProjectManagerId][i]); + } + } + reject(undefined); + }); + }; + + this.ready = $q.defer().promise; + +}); \ No newline at end of file diff --git a/tests/mocks/services/mockStorageService.js b/tests/mocks/services/mockStorageService.js new file mode 100644 index 0000000..96942e6 --- /dev/null +++ b/tests/mocks/services/mockStorageService.js @@ -0,0 +1,3 @@ +angular.module('mock.storageService', []).service('StorageService', function ($q) { + +}); \ No newline at end of file diff --git a/tests/mocks/services/mockUserService.js b/tests/mocks/services/mockUserService.js new file mode 100644 index 0000000..a67c18c --- /dev/null +++ b/tests/mocks/services/mockUserService.js @@ -0,0 +1,18 @@ +angular.module('mock.userService', []).service('UserService', function ($q) { + + this.userEvents = function () { + var defer = $q.defer(); + return defer.promise; + } + + this.getCurrentUser = function () { + return {}; + } + + this.userReady = function () { + return $q(function (resolve) { + resolve(); + }); + } + +}); \ No newline at end of file diff --git a/tests/mocks/services/mockVersionProjectService.js b/tests/mocks/services/mockVersionProjectService.js deleted file mode 100644 index d2f0d28..0000000 --- a/tests/mocks/services/mockVersionProjectService.js +++ /dev/null @@ -1,15 +0,0 @@ -angular.module('mock.versionProjectService', []).service('VersionProjectService', function ($q) { - - this.getAll = function (vmsId) { - return $q(function (resolve, reject) { - resolve([]); - }); - }; - - this.getByScopeId = function (vmsId, scopeId) { - return $q(function (resolve, reject) { - resolve({}); - }); - }; - -}); \ No newline at end of file diff --git a/tests/mocks/services/mockauthservice.js b/tests/mocks/services/mockauthservice.js old mode 100755 new mode 100644 diff --git a/tests/mocks/services/mockwsapi.js b/tests/mocks/services/mockwsapi.js old mode 100755 new mode 100644 index 863d9f0..b02815f --- a/tests/mocks/services/mockwsapi.js +++ b/tests/mocks/services/mockwsapi.js @@ -2,6 +2,42 @@ angular.module('mock.wsApi', []).service('WsApi', function ($q) { this.fetch = function (apiReq) { var defer = $q.defer(); + if (apiReq === apiMapping.ActiveSprints.all) { + defer.resolve({ + body: angular.toJson({ + meta: { + status: "SUCCESS" + }, + payload: { + "ArrayList |