mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
Add test directory
This commit is contained in:
18
awx/ui/client/test/karma.conf.js
Normal file
18
awx/ui/client/test/karma.conf.js
Normal file
@@ -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'
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
||||||
20
awx/ui/client/test/panel.spec.js
Normal file
20
awx/ui/client/test/panel.spec.js
Normal file
@@ -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('<at-panel></at-panel>')($rootScope);
|
||||||
|
|
||||||
|
$rootScope.$digest();
|
||||||
|
|
||||||
|
console.log(element.html());
|
||||||
|
//expect(element.html()).toContain('<nav class="navbar navbar-default" role="navigation">');
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user