-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_question.html
68 lines (52 loc) · 2.07 KB
/
test_question.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
<!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"/> <!-- Link to the external CSS file for styling -->
</head>
<body>
<h1>Testing Question page</h1>
<h2>How it works:</h2>
<ul>
<!-- Instructions on how the test works -->
<li>Choose the Type of Question.</li>
<li>Run Test button to show results.</li>
<li>Clear button to clear results</li>
<li>Submit buttons will produce no 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 Question -->
<h3>Testing <code>/question</code></h3>
<!-- Dropdown to select question type -->
<label for="question-type"></label><select id="question-type">
<option value="BOOLEAN">BOOLEAN</option>
<option value="INTEGER">INTEGER</option>
<option value="NUMERIC">NUMERIC</option>
<option value="MCQ">MCQ</option>
<option value="TEXT">TEXT</option>
</select>
<!-- Buttons to run the test and clear the results -->
<button id="buttonTestQuestion" class="button" onclick="handleTestQuestion()">Run Test</button>
<button id="buttonClearQuestion" class="button" onclick="clearTestQuestion()">Clear</button>
<hr>
<!-- Container to display the questions -->
<div id="buttons">
Questions to show up here...
</div>
<!-- Container to display any messages -->
<div id="message"></div>
<!-- Container to display the answer question message -->
<div id="answerQuestionMessage"></div>
<!-- Container for treasure hunts (not used in this context) -->
<div id="treasureHunts"></div>
<hr>
<!-- Load the API JavaScript -->
<!--<script src="th-api.js"></script>-->
<script src="js/th-test-api.js" defer></script> <!-- Link to the external JavaScript file to handle the test logic -->
</body>
</html>