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.
This commit is contained in:
dandds 2019-09-25 10:10:09 -04:00
parent e0565e5b9a
commit 8d7c7a0d6e
4 changed files with 9 additions and 3 deletions

View File

@ -15,7 +15,7 @@
<div class="card__title">
<span class="h4" v-html='clinTitle'></span>
<button
v-if='$parent.clinIndex > 0'
v-if='clinIndex > 0'
class="icon-link icon-link__remove-clin"
v-on:click="openModal(removeModalId)"
type="button">

View File

@ -60,7 +60,7 @@
<div class="clin-card" v-if="showClin">
<div class="card__title">
<span class="h4" v-html="clinTitle"></span>
<button class="icon-link icon-link__remove-clin" type="button" v-if="$parent.clinIndex &gt; 0" v-on:click="openModal(removeModalId)">
<button class="icon-link icon-link__remove-clin" type="button" v-if="clinIndex &gt; 0" v-on:click="openModal(removeModalId)">
<span aria-hidden="true" class="icon icon--x"><svg viewbox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 2l12 12M14 15c-.256 0-.512-.098-.707-.293l-12-12c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l12 12c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293zm0-13L2 14"></path><path d="M2 15c-.256 0-.512-.098-.707-.293-.391-.391-.391-1.023 0-1.414l12-12c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-12 12C2.512 14.902 2.256 15 2 15z"></path></svg>
</span>
</button>
@ -192,7 +192,7 @@
</div>
</div>
<div class="h5 clin-card__title">Percent Obligated</div>
<p v-html="percentObligated"></p>
<p id="percent-obligated" v-html="percentObligated"></p>
<hr/>
<div class="form-row">
<div class="h4 clin-card__title">

View File

@ -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

View File

@ -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 $?