1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.libraries;
16
17 import java.util.List;
18
19 import org.htmlunit.WebServerTestCase;
20 import org.junit.jupiter.api.BeforeAll;
21 import org.junit.jupiter.api.Test;
22 import org.openqa.selenium.By;
23 import org.openqa.selenium.WebDriver;
24 import org.openqa.selenium.WebElement;
25
26
27
28
29
30
31
32
33
34
35 public class Prototype150rc1Test extends PrototypeTestBase {
36
37
38
39
40 @BeforeAll
41 public static void startSesrver() throws Exception {
42 SERVER_ = WebServerTestCase.createWebServer("src/test/resources/libraries/prototype/1.5.0-rc1/", null);
43 }
44
45
46
47
48 @Override
49 protected String getVersion() {
50 return "1.5.0-rc1";
51 }
52
53
54
55
56 @Override
57 protected String getBaseUrl() {
58 return URL_FIRST + "test/unit/";
59 }
60
61 @Override
62 protected boolean testFinished(final WebDriver driver) {
63 final List<WebElement> status = driver.findElements(By.cssSelector("div#logsummary"));
64 for (final WebElement webElement : status) {
65 if (!webElement.getText().contains("errors")) {
66 return false;
67 }
68 }
69 return true;
70 }
71
72
73
74
75 @Test
76 public void ajax() throws Exception {
77 test("ajax.html");
78 }
79
80
81
82
83 @Test
84 public void array() throws Exception {
85 test("array.html");
86 }
87
88
89
90
91 @Test
92 public void base() throws Exception {
93 test("base.html");
94 }
95
96
97
98
99 @Test
100 public void dom() throws Exception {
101 test("dom.html");
102 }
103
104
105
106
107 @Test
108 public void elementMixins() throws Exception {
109 test("element_mixins.html");
110 }
111
112
113
114
115 @Test
116 public void enumerable() throws Exception {
117 test("enumerable.html");
118 }
119
120
121
122
123 @Test
124 public void form() throws Exception {
125 test("form.html");
126 }
127
128
129
130
131 @Test
132 public void hash() throws Exception {
133 test("hash.html");
134 }
135
136
137
138
139 @Test
140 public void position() throws Exception {
141 test("position.html");
142 }
143
144
145
146
147 @Test
148 public void range() throws Exception {
149 test("range.html");
150 }
151
152
153
154
155 @Test
156 public void selector() throws Exception {
157 test("selector.html");
158 }
159
160
161
162
163 @Test
164 public void string() throws Exception {
165 test("string.html");
166 }
167 }