Fixed tests
diff --git a/views/ngXosLib/karma.conf.ci.js b/views/ngXosLib/karma.conf.ci.js
index 3bd017c..0726edd 100644
--- a/views/ngXosLib/karma.conf.ci.js
+++ b/views/ngXosLib/karma.conf.ci.js
@@ -18,8 +18,7 @@
// hack to avoid testing backbone implementation (they need to be removed)
viewFiles = viewFiles
.filter(f => f.indexOf('xosAdminSite') === -1)
- .filter(f => f.indexOf('xosCord') === -1)
- .filter(f => f.indexOf('xosHpc') === -1);
+ .filter(f => f.indexOf('xosCord') === -1);
viewFiles = viewFiles.filter(f => f.indexOf('js') >= 0).filter(f => f.match(/^xos[A-Z][a-z]+/)).map(f => `${viewDir}${f}`);
@@ -99,7 +98,7 @@
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['dots', 'junit', 'coverage'],
+ reporters: ['dots', 'mocha', 'junit', 'coverage'],
junitReporter: {
outputDir: 'test-result',
diff --git a/views/ngXosViews/hpc/spec/sample.test.js b/views/ngXosViews/hpc/spec/sample.test.js
index 53f9dca..9949b08 100644
--- a/views/ngXosViews/hpc/spec/sample.test.js
+++ b/views/ngXosViews/hpc/spec/sample.test.js
@@ -1,6 +1,6 @@
'use strict';
-describe('The User List', () => {
+describe('The Hpc View', () => {
var scope, element, isolatedScope, httpBackend;
@@ -8,30 +8,17 @@
beforeEach(module('templates'));
beforeEach(inject(function($httpBackend, $compile, $rootScope){
-
- httpBackend = $httpBackend;
- // Setting up mock request
- $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
- {
- email: 'matteo.scandolo@gmail.com',
- firstname: 'Matteo',
- lastname: 'Scandolo'
- }
- ]);
-
+
scope = $rootScope.$new();
- element = angular.element('<users-list></users-list>');
+ element = angular.element('<hpcs-list></hpcs-list>');
$compile(element)(scope);
scope.$digest();
isolatedScope = element.isolateScope().vm;
}));
- it('should load 1 users', () => {
- httpBackend.flush();
- expect(isolatedScope.users.length).toBe(1);
- expect(isolatedScope.users[0].email).toEqual('matteo.scandolo@gmail.com');
- expect(isolatedScope.users[0].firstname).toEqual('Matteo');
- expect(isolatedScope.users[0].lastname).toEqual('Scandolo');
+ it('should define 2 tables', () => {
+ expect(isolatedScope.routerConfig).toBeDefined();
+ expect(isolatedScope.cacheConfig).toBeDefined();
});
});
\ No newline at end of file