JavaScript-Test-Framework auf Basis von QUnit
[kivitendo-erp.git] / templates / webpages / js_tests / run.html
1 [%- USE LxERP -%][%- USE L -%]
2 <div>
3  <p>
4   [% LxERP.t8("Only run tests from this file:") %]
5   [% opts = [ [ '', LxERP.t8("– all available test files –") ] ];
6      opts = opts.import(SELF.all_scripts);
7      L.select_tag('file_filter', opts, default=FORM.file_filter) %]
8   [% L.button_tag('run_tests_from();', LxERP.t8('Run tests'), id='run_js_tests_button') %]
9  </p>
10
11  <hr>
12 </div>
13
14 <script type="text/javascript">
15   function run_tests_from() {
16     window.location.href = "controller.pl?action=JSTests/run&file_filter=" + encodeURIComponent($('#file_filter').val());
17     return false;
18   };
19
20   $('#file_filter').change(run_tests_from);
21 </script>
22
23 <div id="qunit"></div>
24 <div id="qunit-fixture"></div>
25 <script src="js/qunit.js"></script>
26 [% FOREACH script = SELF.scripts_to_run %]
27   <script src="[% script %]"></script>
28 [% END %]