From 8d7c7a0d6e43cd83e582c2d8a925564a1556f064 Mon Sep 17 00:00:00 2001 From: dandds Date: Wed, 25 Sep 2019 10:10:09 -0400 Subject: [PATCH] Render Vue component templates as part of test script. Add a command to the test script to output up-to-date Vue component templates. Most of the Vue component tests rely on HTML templates built from Jinja. --- js/test_templates/clin_fields.html | 2 +- js/test_templates/to_form.html | 4 ++-- script/include/run_test | 1 + script/include/test_functions.inc.sh | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/test_templates/clin_fields.html b/js/test_templates/clin_fields.html index c8e4bc0a..e59aaa83 100644 --- a/js/test_templates/clin_fields.html +++ b/js/test_templates/clin_fields.html @@ -15,7 +15,7 @@
@@ -192,7 +192,7 @@
Percent Obligated
-

+


diff --git a/script/include/run_test b/script/include/run_test index 340b9eab..847ad693 100644 --- a/script/include/run_test +++ b/script/include/run_test @@ -45,5 +45,6 @@ if [ "${RUN_PYTHON_TESTS}" = "true" ]; then fi if [ "${RUN_JS_TESTS}" = "true" ]; then + run_python_render_vue_component run_javascript_tests fi diff --git a/script/include/test_functions.inc.sh b/script/include/test_functions.inc.sh index 71574d98..e4e8a401 100644 --- a/script/include/test_functions.inc.sh +++ b/script/include/test_functions.inc.sh @@ -19,6 +19,11 @@ run_python_unit_tests() { return $? } +run_python_render_vue_component() { + run_command "python -m pytest tests/render_vue_component.py --no-cov --no-print-logs --tb=no -q --disable-warnings" + return $? +} + run_javascript_tests() { run_command "yarn test:coverage" return $?