-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
127 lines (115 loc) · 4.3 KB
/
index.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<form id="lang_form">
<div>
Select programming language
<select id="prog_langs" onchange="changeProgLang()"></select>
</div>
<div id="lang_data">
<div class="radio_line versions">
<div class="radio_line_details">
Version
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line ides">
<div class="radio_line_details">
IDE
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line build_tools">
<div class="radio_line_details">
Build tool
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line web_frameworks">
<div class="radio_line_details">
Web framework
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line rest_frameworks">
<div class="radio_line_details">
REST framework
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line test_frameworks">
<div class="radio_line_details">
Test framework
</div>
<div class="radio_line_data"></div>
</div>
<div class="radio_line assertion_frameworks">
<div class="radio_line_details">
Assertion framework
</div>
<div class="radio_line_data"></div>
</div>
</div>
<br>
<br> <input type="submit" value="Go as beginner" name="go_as_beginner" formaction="pages/home_beginners.html">
<br> Select this one in order to understand basics.
<br> You'll follow step-by-step instructions on how to write your first test, setup webdriver, make api call, etc.
<br> General concepts (start simple -> go complex) will be explained, instead of just showing the "code that works"
here.
<br>
<br> <input type="submit" value="Go as advanced user" name="go_as_advanced" formaction="pages/home_advanced.html">
<br> Select this one if you already know basics, and want to start writing automation test project.
<br> Less explanation, more code.
</form>
P.S. If you can't decide what tool to choose - default selection is recommended.
<script>
const PROG_LANGS = {
"Java": {
"language": "java",
"versions": ["8"],
"ides": ["Intellij Idea"],
"build_tools": ["Gradle", "Maven"],
"web_frameworks": ["Selenium", "Selenide"],
"rest_frameworks": ["Retrofit", "Rest assured"],
"test_frameworks": ["TestNg", "Junit"],
"assertion_frameworks": ["Hamcrest", "AssertJ"]
}
}
function addProgLangs() {
var select = document.getElementById("prog_langs");
Object.keys(PROG_LANGS).forEach(function (lang) {
var option = document.createElement("option");
option.text = lang;
select.add(option);
});
select.value = Object.keys(PROG_LANGS)[0];
select.onchange();
}
function addDataLine(lineClass, data) {
var parent = document.querySelectorAll('.radio_line.' + lineClass + ' .radio_line_data')[0];
data[lineClass].forEach(function (val, index) {
var input = document.createElement("input");
input.setAttribute('type', 'radio');
input.setAttribute('name', lineClass);
input.setAttribute('value', val);
if (index == 0) {
input.checked = true;
}
parent.appendChild(input);
parent.appendChild(document.createTextNode(val));
// parent.appendChild(document.createElement("br"));
});
}
function changeProgLang() {
let lang = document.getElementById("prog_langs").value;
let data = PROG_LANGS[lang];
addDataLine("versions", data);
addDataLine("ides", data);
addDataLine("build_tools", data);
addDataLine("web_frameworks", data);
addDataLine("rest_frameworks", data);
addDataLine("test_frameworks", data);
addDataLine("assertion_frameworks", data);
}
function main() {
addProgLangs();
}
main();
</script>