-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_start.html
77 lines (58 loc) · 2.66 KB
/
test_start.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
<!DOCTYPE html>
<!-- The document type declaration for HTML5 -->
<html lang="en">
<!-- The root element of the HTML page, with the language set to English -->
<head>
<!-- The head element contains meta information and links to stylesheets and scripts -->
<meta charset="UTF-8">
<!-- Specifies the character encoding for the HTML document -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Makes the website responsive by setting the viewport to the device's width and initial zoom level -->
<title>Testing framework</title>
<!-- The title of the HTML document -->
<link rel="stylesheet" href="css/test_css.css"/>
<!-- Linking to an external stylesheet for styling the HTML document -->
</head>
<body>
<!-- The body element contains the content of the HTML document -->
<h1>Testing Start page</h1>
<!-- Main heading for the webpage -->
<h2>How it works:</h2>
<!-- Subheading explaining the functionality of the webpage -->
<ul>
<!-- Unordered list explaining how the testing start page works -->
<li>Run Test button to show results.</li>
<li>Clear button to clear results</li>
</ul>
<h2>Unit Tests</h2>
<!-- Subheading for the unit tests section -->
<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>
<!-- Paragraph with a link to the testing API -->
<div id="loader" class="loader" hidden></div>
<!-- Hidden loader element to show when waiting for API response -->
<!-- Handle test start -->
<h3>Testing <code>/start</code></h3>
<!-- Subheading for testing the /start endpoint -->
<!--<form>
<label for="name-input">Enter name: </label>
<input id="name-input">
</form>-->
<!-- Commented out form element for accepting the user's input, not currently used -->
<button id="buttonTestStart" class="button" onclick="handleTestStart()">Run Test</button>
<!-- Button for running the test and calling the handleTestStart function -->
<button id="buttonClearStart" class="button" onclick="document.getElementById('tH').innerHTML = 'Messages to show up here...'">Clear</button>
<!-- Button for clearing the results by setting the 'tH' div content back to the default message -->
<hr>
<!-- Horizontal rule for separating sections -->
<div id="tH" class="errorMessage">
<!-- Div element where the test results will be displayed -->
Messages to show up here...
</div>
<hr>
<!-- Horizontal rule for separating sections -->
<!-- Load the API JavaScript -->
<!--<script src="th-api.js"></script>-->
<script src="js/th-test-api.js"></script>
<!-- Link to the external JavaScript file for handling the testing API -->
</body>
</html>