mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
Fix Angular dependency mismatches in package.json
This commit is contained in:
@@ -3,6 +3,7 @@ Gruntfile.js
|
|||||||
karma.*.js
|
karma.*.js
|
||||||
|
|
||||||
etc
|
etc
|
||||||
|
coverage
|
||||||
grunt-tasks
|
grunt-tasks
|
||||||
node_modules
|
node_modules
|
||||||
po
|
po
|
||||||
@@ -10,6 +11,6 @@ static
|
|||||||
templates
|
templates
|
||||||
tests
|
tests
|
||||||
client/**/*.js
|
client/**/*.js
|
||||||
|
test
|
||||||
|
|
||||||
!client/components/**/*.js
|
!client/components/**/*.js
|
||||||
|
|
||||||
|
|||||||
@@ -3,5 +3,3 @@ import 'angular-mocks';
|
|||||||
|
|
||||||
import '../components/index.js';
|
import '../components/index.js';
|
||||||
import './panel.spec.js';
|
import './panel.spec.js';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,14 @@ module.exports = config => {
|
|||||||
'karma-ng-html2js-preprocessor'
|
'karma-ng-html2js-preprocessor'
|
||||||
],
|
],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'../components/index.js': 'webpack',
|
|
||||||
'../components/**/*.html': 'ng-html2js',
|
'../components/**/*.html': 'ng-html2js',
|
||||||
|
'../components/index.js': 'webpack',
|
||||||
'./index.js': 'webpack'
|
'./index.js': 'webpack'
|
||||||
},
|
},
|
||||||
ngHtml2JsPreprocessor: {
|
ngHtml2JsPreprocessor: {
|
||||||
moduleName: 'at.test.templates',
|
moduleName: 'at.test.templates',
|
||||||
prependPrefix: '/'
|
stripPrefix: path.resolve(__dirname, '..'),
|
||||||
|
prependPrefix: 'static/partials'
|
||||||
},
|
},
|
||||||
webpack: {
|
webpack: {
|
||||||
module: {
|
module: {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
describe('Components | panel', () => {
|
describe('Components | panel', () => {
|
||||||
|
|
||||||
let $compile;
|
let $compile;
|
||||||
let $rootScope;
|
let $rootScope;
|
||||||
|
|
||||||
@@ -9,17 +10,13 @@ describe('Components | panel', () => {
|
|||||||
inject((_$compile_, _$rootScope_) => {
|
inject((_$compile_, _$rootScope_) => {
|
||||||
$compile = _$compile_;
|
$compile = _$compile_;
|
||||||
$rootScope = _$rootScope_;
|
$rootScope = _$rootScope_;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load the navigation partial', function() {
|
it('should load the navigation partial', function() {
|
||||||
console.log($rootScope);
|
|
||||||
var element = $compile('<at-panel></at-panel>')($rootScope);
|
var element = $compile('<at-panel></at-panel>')($rootScope);
|
||||||
|
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
|
|
||||||
expect(element.html()).toContain('<nav class="navbar navbar-default" role="navigation">');
|
expect(element.html()).toContain('at-Panel');
|
||||||
});
|
}); });
|
||||||
});
|
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
"test": "karma start karma.conf.js",
|
"test": "karma start karma.conf.js",
|
||||||
"jshint": "grunt clean:jshint jshint:source --no-color",
|
"jshint": "grunt clean:jshint jshint:source --no-color",
|
||||||
"test:ci": "npm run test -- --single-run --reporter junit,dots --browsers=PhantomJS",
|
"test:ci": "npm run test -- --single-run --reporter junit,dots --browsers=PhantomJS",
|
||||||
"lint": "./node_modules/.bin/eslint -c .eslintrc.js ."
|
"lint": "./node_modules/.bin/eslint -c .eslintrc.js .",
|
||||||
|
"component-test": "./node_modules/.bin/karma start client/test/karma.conf.js --silent"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"browser-sync": "^2.14.0",
|
"browser-sync": "^2.14.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user