diff --git a/.gitignore b/.gitignore index a0e2987a52..0f07b6eaa4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ awx/projects awx/job_output awx/public/media awx/public/static +awx/ui/tests/test-results.xml awx/ui/static/js/awx.min.js awx/ui/static/js/local_config.js awx/ui/static/css/awx.min.css diff --git a/Makefile b/Makefile index 0bc3af431d..f98d06bd42 100644 --- a/Makefile +++ b/Makefile @@ -240,9 +240,9 @@ test_coverage: coverage_html: coverage html -# Run UI unit tests using Selenium. -test_ui: - $(PYTHON) manage.py test -v2 awx.ui.tests +# Run UI unit tests +test_ui: node_modules + $(GRUNT) karma:ci # Run API unit tests across multiple Python/Django versions with Tox. test_tox: diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index a59c5d69a4..d158fda7ee 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -179,9 +179,6 @@ - - - diff --git a/awx/ui/tests/karma-shared.conf b/awx/ui/tests/karma.conf.js similarity index 92% rename from awx/ui/tests/karma-shared.conf rename to awx/ui/tests/karma.conf.js index c6b88fa008..12a315cf88 100644 --- a/awx/ui/tests/karma-shared.conf +++ b/awx/ui/tests/karma.conf.js @@ -1,8 +1,8 @@ // Karma configuration // Generated on Mon Aug 04 2014 21:17:04 GMT-0400 (EDT) -module.exports = function() { - return { +module.exports = function(config) { + config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', @@ -53,7 +53,11 @@ module.exports = function() { '../static/js/config.js', '../static/js/directives/dashboard-graphs.js', '../static/js/*/*.js', - '../static/js/app.js' + '../static/js/app.js', + '../static/lib/angular-mocks/angular-mocks.js', + '../../../node_modules/ng-midway-tester/src/ngMidwayTester.js', + './unit/*', + './unit/**/*' ], @@ -72,7 +76,7 @@ module.exports = function() { // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], + reporters: ['dots', 'progress'], client: { mocha: { @@ -102,5 +106,5 @@ module.exports = function() { // if true, Karma captures browsers, runs the tests and exits singleRun: false - }; + }); };