diff --git a/awx/ui/client/components/_common.less b/awx/ui/client/components/_common.less
deleted file mode 100644
index 160fcac71c..0000000000
--- a/awx/ui/client/components/_common.less
+++ /dev/null
@@ -1,17 +0,0 @@
-.at-Button(@bg, @bg-hover: @bg, @color, @color-hover: @color) {
- color: @color;
- background-color: @bg;
- padding: @at-padding-xs @at-padding-md;
- padding-bottom: @at-padding-xs + 1;
-
- &:hover {
- color: @color-hover;
- background-color: @bg-hover;
- }
-}
-
-.at-Button--success { .at-Button(@at-success, @at-success-dark, @at-white) }
-.at-Button--link { .at-Button(@at-link, @at-link-dark, @at-white) }
-.at-Button--danger { .at-Button(@at-danger, @at-danger, @at-white) }
-.at-Button--light { .at-Button(@at-white, @at-gray-light, @at-gray-dark) }
-
diff --git a/awx/ui/client/components/_index.less b/awx/ui/client/components/_index.less
index e90b33419f..b863e39645 100644
--- a/awx/ui/client/components/_index.less
+++ b/awx/ui/client/components/_index.less
@@ -1,4 +1,3 @@
-@import '_common';
@import 'badge/_index';
@import 'input/_index';
@import 'panel/_index';
diff --git a/awx/ui/client/components/input/_index.less b/awx/ui/client/components/input/_index.less
index 6d880adce0..68db7cceb3 100644
--- a/awx/ui/client/components/input/_index.less
+++ b/awx/ui/client/components/input/_index.less
@@ -1,29 +1,12 @@
-.at-InputSearch {
-}
-
.at-InputSearch-field {
- .at-placeholder;
+ .at-placeholder(@at-gray-dark);
border-color: @at-gray-light;
background-color: @at-white;
font-size: @at-font-md;
-
- @include placeholder(@at-gray);
}
.at-InputSearch-field:focus {
border-color: @at-gray-light;
}
-.at-Input-searchButton {
- .at-buttonColor;
-
- padding: 4px 10px;
- padding-bottom: 5px;
- font-size: @at-font-lg;
-}
-
-.at-Input-searchButton:hover {
- .at-buttonColorHover;
-}
-
diff --git a/awx/ui/client/components/input/search.partial.html b/awx/ui/client/components/input/search.partial.html
index 94a65d8461..4050a86524 100644
--- a/awx/ui/client/components/input/search.partial.html
+++ b/awx/ui/client/components/input/search.partial.html
@@ -3,7 +3,7 @@
class="form-control at-InputSearch-field"
placeholder="{{ config.placeholder }}" />
-
diff --git a/awx/ui/client/test/index.js b/awx/ui/client/test/index.js
new file mode 100644
index 0000000000..a1c5818eda
--- /dev/null
+++ b/awx/ui/client/test/index.js
@@ -0,0 +1,7 @@
+import 'angular';
+import 'angular-mocks';
+
+import '../components/index.js';
+import './panel.spec.js';
+
+
diff --git a/awx/ui/client/test/karma.conf.js b/awx/ui/client/test/karma.conf.js
index eb164cfc26..80aac96e6b 100644
--- a/awx/ui/client/test/karma.conf.js
+++ b/awx/ui/client/test/karma.conf.js
@@ -1,18 +1,46 @@
+let path = require('path');
+
module.exports = config => {
config.set({
- basePath: '..',
+ basePath: '',
singleRun: true,
- autoWatch: true,
+ autoWatch: false,
+ colors: true,
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
- reporters: ['mocha'],
+ reporters: ['progress'],
files: [
- 'components/**/*.js',
- 'test/*.spec.js'
+ './index.js',
+ '../components/**/*.html'
],
plugins: [
- 'karma-jasmine'
- 'karma-mocha-reporter'
+ 'karma-webpack',
+ 'karma-jasmine',
+ 'karma-phantomjs-launcher',
+ 'karma-ng-html2js-preprocessor'
],
+ preprocessors: {
+ '../components/index.js': 'webpack',
+ '../components/**/*.html': 'ng-html2js',
+ './index.js': 'webpack'
+ },
+ ngHtml2JsPreprocessor: {
+ moduleName: 'at.test.templates',
+ prependPrefix: '/'
+ },
+ webpack: {
+ module: {
+ loaders: [
+ {
+ test: /\.js$/,
+ loader: 'babel',
+ exclude: /node_modules/
+ }
+ ]
+ }
+ },
+ webpackMiddleware: {
+ noInfo: 'errors-only'
+ }
});
};
diff --git a/awx/ui/client/test/panel.spec.js b/awx/ui/client/test/panel.spec.js
index 50d1307867..43669c75bc 100644
--- a/awx/ui/client/test/panel.spec.js
+++ b/awx/ui/client/test/panel.spec.js
@@ -1,20 +1,25 @@
describe('Components | panel', () => {
- var $compile,
- $rootScope;
+ let $compile;
+ let $rootScope;
- beforeEach(module('at.components'));
+ beforeEach(done => {
+ angular.mock.module('at.components')
+ angular.mock.module('at.test.templates');
- beforeEach(inject((_$compile_, _$rootScope_) => {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- }));
+ inject((_$compile_, _$rootScope_) => {
+ $compile = _$compile_;
+ $rootScope = _$rootScope_;
+
+ done();
+ });
+ });
it('should load the navigation partial', function() {
+ console.log($rootScope);
var element = $compile('')($rootScope);
$rootScope.$digest();
- console.log(element.html());
- //expect(element.html()).toContain('