diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2016-10-25 18:49:20 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2016-11-01 11:46:01 +0000 |
commit | f5ccdbdeccd010b47840cd90f2f8f88c59f4c1da (patch) | |
tree | 6812036ab71b0c40300c8b9d924a2211da320b43 /plans/templates/testplan.html | |
parent | df73087277c1062ae6d1d7f781d5a5a386681ced (diff) |
plans: added test plan rendering script
Change-Id: I3765f688be40dc6fe0a91a9ed6ed72cc3dfd88db
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Diffstat (limited to 'plans/templates/testplan.html')
-rw-r--r-- | plans/templates/testplan.html | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/plans/templates/testplan.html b/plans/templates/testplan.html new file mode 100644 index 0000000..6551b2c --- /dev/null +++ b/plans/templates/testplan.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang=en> + <head> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> + <!-- Optional theme --> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> + <!-- Latest compiled and minified JavaScript --> + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + </head> + <body> + <div class="container"> + <div id="metadata"> + <h1>Metadata</h1> + <table class="table table-striped"> + <thead> + <tr> + <th>Key</th> + <th>Value</th> + </tr> + </thead> + <tbody> + {% for key,value in obj.metadata.items() %} + <tr> + <td>{{ key }}</td> + <td> + {% if value is sequence and value is not string %} + <ul> + {% for item in value %} + <li>{{ item }} + {% endfor %} + </ul> + {% else %} + {{ value }} + {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + <div id="requirements"> + <h1>Requirements</h1> + {% for req in obj.requirements %} + {% set outer_loop = loop %} + <div {% if req.covered %}class="covered"{% else %}class="alert alert-danger"{% endif %}> + <h2>{{ loop.index}} {{ req.name }}</h2> + <h4>Owner: {{ req.owner }}</h4> + {% if req.tests %} + {% if req.tests.manual is defined and req.tests.manual is not none %} + <h3>Manual tests</h3> + {% for test in req.tests.manual %} + <div {% if test.missing %}class="alert alert-danger"{% endif %}> + <h5>{{ outer_loop.index }}.{{ loop.index }}</h5> + {% include "_test_details.html" %} + </div> + {% endfor %} + {% endif %} + {% if req.tests.automated is defined and req.tests.automated is not none %} + <h3>Automated tests</h3> + {% for test in req.tests.automated %} + <div {% if test.missing %}class="alert alert-danger"{% endif %}> + <h5>{{ outer_loop.index }}.{{ loop.index }}</h5> + {% include "_test_details.html" %} + </div> + {% endfor %} + {% endif %} + {% endif %} + </div> + {% endfor %} + </div> + </div> + </body> +</html> |