Merge branch 'bug/14103' into release/0.10.2
[ganeti_webmgr.git] / view-me-to-run-js-tests.html
blob67ad4d42ea19b722f3eba8bfd155c263c8606a60
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html>
5 <head>
6 <script
7 src="http://code.jquery.com/jquery-latest.js"></script>
8 <link rel="stylesheet"
9 href="http://code.jquery.com/qunit/git/qunit.css"
10 type="text/css" media="screen" />
11 <script type="text/javascript"
12 src="http://code.jquery.com/qunit/git/qunit.js"></script>
14 <!-- Files to be tested. -->
15 <script
16 src="ganeti_web/media/js/job_status.js"></script>
18 <!-- Tests. -->
19 <script>
20 $(document).ready(function() {
22 module("job_status");
24 test("cap_first single word", 1, function() {
25 strictEqual(cap_first("test"), "Test");
26 });
28 test("cap_first multiple words", 1, function() {
29 strictEqual(cap_first("test string"), "Test String");
30 });
32 test("format_op no replacements", 1, function() {
33 strictEqual(format_op("OP_TEST", "Status"), "Test: Status");
34 });
36 test("format_op one replacement", 1, function() {
37 strictEqual(format_op("OP_TEST_STRING", "derps"),
38 "Test String: Derps");
39 });
40 });
41 </script>
43 </head>
44 <body>
45 <h1 id="qunit-header">GWM JS Tests</h1>
46 <h2 id="qunit-banner"></h2>
47 <div id="qunit-testrunner-toolbar"></div>
48 <h2 id="qunit-userAgent"></h2>
49 <ol id="qunit-tests"></ol>
50 <div id="qunit-fixture"></div>
51 </body>
52 </html>