-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_list.html
54 lines (42 loc) · 1.93 KB
/
test_list.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Testing framework</title>
<link rel="stylesheet" href="css/test_css.css"/>
</head>
<body>
<!-- Main heading for the Testing List page -->
<h1>Testing Lists page</h1>
<!-- Subheading and explanation of how the list works -->
<h2>How it works:</h2>
<ul>
<!-- Instructions on how the test works -->
<li>Enter a number to view sample treasure hunts.</li>
<li>By default if the value is negative or more than 10, the result will be 10 treasure hunts.</li>
<li>Run Test button to show results.</li>
<li>Clear button to clear results.</li>
</ul>
<h2>Unit Tests</h2>
<!-- Information about the Testing API -->
<p>The Unit Tests make use of the corresponding Testing API available at <a href="https://codecyprus.org/th/testing" target="_blank">https://codecyprus.org/th/testing</a>.</p>
<div id="loader" class="loader" hidden></div>
<!--Handle test list-->
<h3>Testing <code>/list</code></h3>
<!--Get user input-->
<label>Enter a test number of treasure hunts: <input id="user_input"></label>
<hr>
<!-- Buttons to run the test and clear the results -->
<button id="buttonTestList" class="button" onclick="handleTestList()">Run Test</button>
<button id="buttonClearList" class="button" onclick="document.getElementById('treasureHunts').innerHTML = 'The results of the test to show up here...';">Clear</button>
<!-- Container to display the results of the test -->
<div id="treasureHunts" class="testMessage">
The results of the test to show up here...
</div>
<hr>
<!--Load the API JavaScript-->
<!--<script src="th-api.js"></script>-->
<script src="js/th-test-api.js"></script> <!-- Link to the external JavaScript file to handle the test logic -->
</body>
</html>