Merge "Use Chrome for JS unit tests"

This commit is contained in:
Jenkins 2016-04-12 22:53:15 +00:00 committed by Gerrit Code Review
commit 6ffb2f0216
6 changed files with 20 additions and 24 deletions

View File

@ -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',

View File

@ -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');
});

View File

@ -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 () {

View File

@ -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']);
});

View File

@ -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',

View File

@ -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",