summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krotscheck <krotscheck@gmail.com>2015-06-16 11:59:43 -0700
committerMichael Krotscheck <krotscheck@gmail.com>2015-06-17 12:19:32 -0700
commit4beaf29f6e2269250200eeb57bf03b9d22b42213 (patch)
tree359efe164cf0b954dbad34e5a4db11c98abfe72c
parentfc2f3628e4db11cad2f3dfd8cb75486c0d10bc49 (diff)
Added test execution in Firefox.
This adds capturing and executing tests in the Firefox browser. It also adds the use of the jasmine-jquery framework to permit easier detection of DOM elements in a rendered directive, as the present method does not play well with Firefox' tendency to randomly reorder attribute positions. Testing with Firefox is already supported in infra. Change-Id: Ifc81e1b243975536ee40e627c1e4a164855fe85c
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Timur Sufiev <tsufiev@mirantis.com> Workflow+1: Timur Sufiev <tsufiev@mirantis.com> Submitted-by: Jenkins Submitted-at: Mon, 22 Jun 2015 15:55:06 +0000 Reviewed-on: https://review.openstack.org/192366 Project: stackforge/merlin Branch: refs/heads/master
-rw-r--r--karma-unit.conf.js8
-rw-r--r--merlin/test/js/directivesSpec.js2
-rw-r--r--package.json12
3 files changed, 13 insertions, 9 deletions
diff --git a/karma-unit.conf.js b/karma-unit.conf.js
index 2a2d800..87b08ad 100644
--- a/karma-unit.conf.js
+++ b/karma-unit.conf.js
@@ -23,15 +23,17 @@ module.exports = function (config) {
23 23
24 basePath: '', 24 basePath: '',
25 25
26 frameworks: ['jasmine'], 26 frameworks: ['jasmine-jquery','jasmine'],
27 27
28 browsers: [ 'PhantomJS', 'Chrome'], 28 browsers: [ 'PhantomJS', 'Chrome', 'Firefox'],
29 29
30 plugins: [ 30 plugins: [
31 'karma-jasmine', 31 'karma-jasmine',
32 'karma-phantomjs-launcher', 32 'karma-phantomjs-launcher',
33 'karma-chrome-launcher', 33 'karma-chrome-launcher',
34 'karma-ng-html2js-preprocessor' 34 'karma-firefox-launcher',
35 'karma-ng-html2js-preprocessor',
36 'karma-jasmine-jquery'
35 ], 37 ],
36 38
37 files: [ 39 files: [
diff --git a/merlin/test/js/directivesSpec.js b/merlin/test/js/directivesSpec.js
index fd8fcc4..7a3df8e 100644
--- a/merlin/test/js/directivesSpec.js
+++ b/merlin/test/js/directivesSpec.js
@@ -245,7 +245,7 @@ describe('merlin directives', function() {
245 $scope.$digest(); 245 $scope.$digest();
246 246
247 expect(element1.html()).toContain('<textarea'); 247 expect(element1.html()).toContain('<textarea');
248 expect(element2.html()).toContain('<input type="number"'); 248 expect(element2).toContainElement('input[type=number]');
249 }); 249 });
250 250
251 it('field is not rendered until the corresponding template has been served', function() { 251 it('field is not rendered until the corresponding template has been served', function() {
diff --git a/package.json b/package.json
index 0569628..f0fc170 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,8 @@
9 "grunt-cli": "0.1.13", 9 "grunt-cli": "0.1.13",
10 "grunt-connect-proxy": "0.1.11", 10 "grunt-connect-proxy": "0.1.11",
11 "grunt-contrib-clean": "0.6.0", 11 "grunt-contrib-clean": "0.6.0",
12 "grunt-contrib-concat": "0.5.1",
13 "grunt-contrib-uglify": "0.8.1",
12 "grunt-contrib-watch": "0.6.1", 14 "grunt-contrib-watch": "0.6.1",
13 "grunt-env": "0.4.1", 15 "grunt-env": "0.4.1",
14 "grunt-eslint": "7.0.1", 16 "grunt-eslint": "7.0.1",
@@ -19,16 +21,16 @@
19 "grunt-shell": "1.1.1", 21 "grunt-shell": "1.1.1",
20 "grunt-usemin": "2.4.0", 22 "grunt-usemin": "2.4.0",
21 "grunt-webfont": "0.4.8", 23 "grunt-webfont": "0.4.8",
22 "grunt-contrib-concat": "0.5.1",
23 "grunt-contrib-uglify": "0.8.1",
24 "grunt-karma": "0.10.1",
25 "jasmine-core": "^2.2.0", 24 "jasmine-core": "^2.2.0",
25 "jasmine-jquery": "2.1.0",
26 "karma": "0.12.31", 26 "karma": "0.12.31",
27 "karma-chrome-launcher": "0.1.12", 27 "karma-chrome-launcher": "0.1.12",
28 "karma-cli": "0.0.4", 28 "karma-cli": "0.0.4",
29 "karma-firefox-launcher": "^0.1.6",
29 "karma-jasmine": "0.3.5", 30 "karma-jasmine": "0.3.5",
30 "karma-phantomjs-launcher": "0.1.4", 31 "karma-jasmine-jquery": "0.1.1",
31 "karma-ng-html2js-preprocessor": "0.1" 32 "karma-ng-html2js-preprocessor": "0.1",
33 "karma-phantomjs-launcher": "0.1.4"
32 }, 34 },
33 "main": "Gruntfile.js", 35 "main": "Gruntfile.js",
34 "dependencies": { 36 "dependencies": {