From 4beaf29f6e2269250200eeb57bf03b9d22b42213 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Tue, 16 Jun 2015 11:59:43 -0700 Subject: [PATCH] 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 --- karma-unit.conf.js | 8 +++++--- merlin/test/js/directivesSpec.js | 2 +- package.json | 12 +++++++----- 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) { basePath: '', - frameworks: ['jasmine'], + frameworks: ['jasmine-jquery','jasmine'], - browsers: [ 'PhantomJS', 'Chrome'], + browsers: [ 'PhantomJS', 'Chrome', 'Firefox'], plugins: [ 'karma-jasmine', 'karma-phantomjs-launcher', 'karma-chrome-launcher', - 'karma-ng-html2js-preprocessor' + 'karma-firefox-launcher', + 'karma-ng-html2js-preprocessor', + 'karma-jasmine-jquery' ], 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() { $scope.$digest(); expect(element1.html()).toContain('