-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests.html
93 lines (93 loc) · 3.51 KB
/
tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta property="og:image" content="images/logo.png" />
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css">
<link rel="stylesheet" href="https://bootswatch.com/4/solar/bootstrap.min.css"/>
<style>
html {font-size: 100%;}
svg text {cursor: default;}
</style>
<title>Tests "Puzzle duel"</title>
</head>
<body>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"
integrity="sha256-oI+elz+sIm+jpn8F/qEspKoKveTc5uKeFHNNVexe6d8="
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"
integrity="sha256-1fEPhSsRKlFKGfK3eO710tEweHh1fwokU5wFGDHO+vg="
crossorigin="anonymous"
></script>
<script src="js/jquery.rateit.js"></script>
<script>
requirejs.config({baseUrl: 'js'});
</script>
<div class="container">
<div class="row">
<div class="col-12 col-lg-10 m-auto">
<div class="card d-none">
<svg id="mainGrid"
class="col-xs-12 text-center" style="overflow: visible; z-index: 90;">
Sorry, but your browser is not supported. Try to setup the new version.
</svg>
</div>
<div class="card">
<button id="runTests" type="button" class="btn btn-primary mb-3 ml-3">Run all tests</button>
<table id="suits">
</table>
</div>
</div>
</div>
</div>
<script src="tests/test_suite_lib.js"></script>
<script src="js/locale_ru.js"></script>
<script>
var testSuiteCounter = 0;
$("#runTests").click(() => allTestSuites.forEach(suite => {suite.exec(true);}));
$(document).ready(function () {
requirejs(["tests/all_tests.js"], () => {});
setTimeout(show_tests, 100);
});
function show_tests() {
if (typeof allTestSuites == "undefined") {
return;
}
if (allTestSuites.length <= testSuiteCounter) {
return;
}
testSuiteCounter = allTestSuites.length;
$("#suits").empty();
allTestSuites.sort((s1, s2) => s1.name < s2.name?-1:1);
for (let i=0;i < allTestSuites.length; i++) {
let suite = allTestSuites[i];
$("#suits").append("<tr><td>" + suite.name + "</td><td><button id='runTests"+i+"' type='button' class='btn btn-primary mb-3 ml-3'>Run</button></td></tr>");
$("#runTests"+i).click(() => suite.exec());
};
setTimeout(show_tests, 100);
}
</script>
</body>
</html>