From 248281406ee868f26ca7af046e7ca1a770c58ee8 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Wed, 21 Oct 2015 13:28:52 +0100 Subject: [PATCH] Don't hide Karma coverage reports This patch updates the file names of the coverage reports so they are visible by default on most systems. Also updates the .gitignore, so the new files are not pushed to the Horizon repo. DocImpact Closes-Bug: 1508526 Change-Id: I3c1c8f4c88819e2f49b60722ea8cc37bdc711b8c --- .gitignore | 1 + doc/source/ref/run_tests.rst | 2 +- doc/source/topics/javascript_testing.rst | 4 ++-- horizon/karma.conf.js | 2 +- openstack_dashboard/karma.conf.js | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6e5ffe032c..e2ddd2fcb0 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ .noseids .DS_STORE coverage.xml +coverage-karma nosetests.xml pep8.txt pylint.txt diff --git a/doc/source/ref/run_tests.rst b/doc/source/ref/run_tests.rst index 45c8cdabbc..87c33243e0 100644 --- a/doc/source/ref/run_tests.rst +++ b/doc/source/ref/run_tests.rst @@ -143,7 +143,7 @@ such features as code coverage. Karma allows developer to run tests live, as it can watch source and test files for changes. The default configuration also performs coverage reports, which are saved -to ``horizon/.coverage-karma/`` and ``openstack_dashboard/.coverage-karma/``. +to ``horizon/coverage-karma/`` and ``openstack_dashboard/coverage-karma/``. To run the Karma tests for Horizon and Dashboard using the `run_tests.sh` script:: diff --git a/doc/source/topics/javascript_testing.rst b/doc/source/topics/javascript_testing.rst index 49a210137b..f3dc314ddd 100644 --- a/doc/source/topics/javascript_testing.rst +++ b/doc/source/topics/javascript_testing.rst @@ -46,8 +46,8 @@ developing, be sure to check the coverage reports on the master branch and compare your development branch; this will help identify missing tests. To generate coverage reports, run ``npm run test``. The coverage reports can be -found at ``horizon/.coverage-karma/`` (framework tests) and -``openstack_dashboard/.coverage-karma/`` (dashboard tests). Load +found at ``horizon/coverage-karma/`` (framework tests) and +``openstack_dashboard/coverage-karma/`` (dashboard tests). Load ``/index.html`` in a browser to view the reports. Writing Tests diff --git a/horizon/karma.conf.js b/horizon/karma.conf.js index bbcfb15543..d3598f9341 100644 --- a/horizon/karma.conf.js +++ b/horizon/karma.conf.js @@ -145,7 +145,7 @@ module.exports = function (config) { coverageReporter: { type: 'html', - dir: '../.coverage-karma/' + dir: '../coverage-karma/' }, // Coverage threshold values. diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js index b20dd38094..d5e284d126 100644 --- a/openstack_dashboard/karma.conf.js +++ b/openstack_dashboard/karma.conf.js @@ -186,7 +186,7 @@ module.exports = function (config) { // Places coverage report in HTML format in the subdirectory below. coverageReporter: { type: 'html', - dir: './.coverage-karma/' + dir: './coverage-karma/' }, // Coverage threshold values.