From 90b3378725319ae7e53905937e2118f8dcc49ec5 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Tue, 25 Apr 2017 11:54:56 -0400 Subject: [PATCH] Add test directory --- awx/ui/client/test/karma.conf.js | 18 ++++++++++++++++++ awx/ui/client/test/panel.spec.js | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 awx/ui/client/test/karma.conf.js create mode 100644 awx/ui/client/test/panel.spec.js diff --git a/awx/ui/client/test/karma.conf.js b/awx/ui/client/test/karma.conf.js new file mode 100644 index 0000000000..eb164cfc26 --- /dev/null +++ b/awx/ui/client/test/karma.conf.js @@ -0,0 +1,18 @@ +module.exports = config => { + config.set({ + basePath: '..', + singleRun: true, + autoWatch: true, + frameworks: ['jasmine'], + browsers: ['PhantomJS'], + reporters: ['mocha'], + files: [ + 'components/**/*.js', + 'test/*.spec.js' + ], + plugins: [ + 'karma-jasmine' + 'karma-mocha-reporter' + ], + }); +}; diff --git a/awx/ui/client/test/panel.spec.js b/awx/ui/client/test/panel.spec.js new file mode 100644 index 0000000000..50d1307867 --- /dev/null +++ b/awx/ui/client/test/panel.spec.js @@ -0,0 +1,20 @@ +describe('Components | panel', () => { + var $compile, + $rootScope; + + beforeEach(module('at.components')); + + beforeEach(inject((_$compile_, _$rootScope_) => { + $compile = _$compile_; + $rootScope = _$rootScope_; + })); + + it('should load the navigation partial', function() { + var element = $compile('')($rootScope); + + $rootScope.$digest(); + + console.log(element.html()); + //expect(element.html()).toContain('