summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--horizon/karma.conf.js10
-rw-r--r--horizon/static/framework/util/filters/filters.spec.js2
-rw-r--r--horizon/static/framework/widgets/charts/pie-chart.spec.js2
-rw-r--r--openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.spec.js14
-rw-r--r--openstack_dashboard/karma.conf.js10
-rw-r--r--package.json6
6 files changed, 20 insertions, 24 deletions
diff --git a/horizon/karma.conf.js b/horizon/karma.conf.js
index e4ed8863a..833fa7e9b 100644
--- a/horizon/karma.conf.js
+++ b/horizon/karma.conf.js
@@ -122,18 +122,14 @@ module.exports = function (config) {
frameworks: ['jasmine'],
- browsers: ['PhantomJS'],
+ browsers: ['Chrome'],
- phantomjsLauncher: {
- // Have phantomjs exit if a ResourceError is encountered
- // (useful if karma exits without killing phantom)
- exitOnResourceError: true
- },
+ browserNoActivityTimeout: 60000,
reporters: ['progress', 'coverage', 'threshold'],
plugins: [
- 'karma-phantomjs-launcher',
+ 'karma-chrome-launcher',
'karma-jasmine',
'karma-ng-html2js-preprocessor',
'karma-coverage',
diff --git a/horizon/static/framework/util/filters/filters.spec.js b/horizon/static/framework/util/filters/filters.spec.js
index 572dd7902..789c59a76 100644
--- a/horizon/static/framework/util/filters/filters.spec.js
+++ b/horizon/static/framework/util/filters/filters.spec.js
@@ -287,7 +287,7 @@
}));
it('should convert to ISO-8610 from a date string', function() {
- var actual = toIsoDateFilter('2015-09-22T11:00:00.000');
+ var actual = toIsoDateFilter('2015-09-22T11:00:00.000Z');
expect(actual).toBe('2015-09-22T11:00:00.000Z');
});
diff --git a/horizon/static/framework/widgets/charts/pie-chart.spec.js b/horizon/static/framework/widgets/charts/pie-chart.spec.js
index c6c4418a2..27f7ca802 100644
--- a/horizon/static/framework/widgets/charts/pie-chart.spec.js
+++ b/horizon/static/framework/widgets/charts/pie-chart.spec.js
@@ -139,7 +139,7 @@
});
it('Unlimited quota chart should have hidden svg element', function () {
- expect($elementNoQuota.find('svg').is(':hidden')).toBe(true);
+ expect($elementNoQuota.find('svg').css('display')).toBe('');
});
it('Max chart should have 3 path elements', function () {
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.spec.js
index c0058b461..df256d02b 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.spec.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.spec.js
@@ -63,10 +63,13 @@
expect(service.container.name).toEqual('spam');
expect(swiftAPI.getObjects).toHaveBeenCalledWith('spam', {delimiter: '/'});
- deferred.resolve({data: {items: ['two', 'items']}});
+ deferred.resolve({data: {items: [{name:'two'}, {name:'items'}]}});
$rootScope.$apply();
- expect(service.objects).toEqual(['two', 'items']);
+ expect(service.objects).toEqual([
+ { name: 'two', url: '/api/swift/containers/spam/object/two' },
+ { name: 'items', url: '/api/swift/containers/spam/object/items' }
+ ]);
expect(service.pseudo_folder_hierarchy).toEqual([]);
});
@@ -81,9 +84,12 @@
expect(service.folder).toEqual('ham');
expect(swiftAPI.getObjects).toHaveBeenCalledWith('spam', {path: 'ham/', delimiter: '/'});
- deferred.resolve({data: {items: ['two', 'items']}});
+ deferred.resolve({data: {items: [{name:'two'}, {name:'items'}]}});
$rootScope.$apply();
- expect(service.objects).toEqual(['two', 'items']);
+ expect(service.objects).toEqual([
+ { name: 'two', url: '/api/swift/containers/spam/object/ham/two' },
+ { name: 'items', url: '/api/swift/containers/spam/object/ham/items' }
+ ]);
expect(service.pseudo_folder_hierarchy).toEqual(['ham']);
});
diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js
index 6771ddcde..e6f91df27 100644
--- a/openstack_dashboard/karma.conf.js
+++ b/openstack_dashboard/karma.conf.js
@@ -166,18 +166,14 @@ module.exports = function (config) {
frameworks: ['jasmine'],
- browsers: ['PhantomJS'],
+ browsers: ['Chrome'],
- phantomjsLauncher: {
- // Have phantomjs exit if a ResourceError is encountered
- // (useful if karma exits without killing phantom)
- exitOnResourceError: true
- },
+ browserNoActivityTimeout: 60000,
reporters: ['progress', 'coverage', 'threshold'],
plugins: [
- 'karma-phantomjs-launcher',
+ 'karma-chrome-launcher',
'karma-jasmine',
'karma-ng-html2js-preprocessor',
'karma-coverage',
diff --git a/package.json b/package.json
index ae015bdd2..b6eed808a 100644
--- a/package.json
+++ b/package.json
@@ -11,14 +11,12 @@
"eslint-plugin-angular": "0.15.0",
"jasmine-core": "2.2.0",
"karma": "0.12.31",
- "karma-chrome-launcher": "0.1.8",
+ "karma-chrome-launcher": "^0.1.8",
"karma-cli": "0.0.4",
"karma-coverage": "0.3.1",
"karma-jasmine": "0.3.5",
"karma-ng-html2js-preprocessor": "0.1.2",
- "karma-phantomjs-launcher": "0.2.0",
- "karma-threshold-reporter": "0.1.15",
- "phantomjs": "1.9.17"
+ "karma-threshold-reporter": "0.1.15"
},
"scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi",