Index: trunk/phase3/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php |
— | — | @@ -38,379 +38,369 @@ |
39 | 39 | |
40 | 40 | |
41 | 41 | class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction { |
42 | | - |
| 42 | + |
43 | 43 | function setUp() { |
44 | 44 | parent::setUp(); |
45 | 45 | } |
46 | | - |
47 | | - |
| 46 | + |
| 47 | + |
48 | 48 | public function testInitialPageUI() { |
49 | | - |
| 49 | + |
50 | 50 | parent::navigateInitialpage(); |
51 | | - |
| 51 | + |
52 | 52 | // MediaWiki logo available |
53 | 53 | $this->assertTrue( $this->isElementPresent( "//img[@alt='The MediaWiki logo']" )); |
54 | | - |
| 54 | + |
55 | 55 | // 'MediaWiki 1.18alpha' text available |
56 | 56 | $this->assertEquals( "MediaWiki 1.18alpha", $this->getText( "//h1" )); |
57 | | - |
| 57 | + |
58 | 58 | // 'LocalSettings.php not found.' text available |
59 | 59 | $this->assertEquals( "LocalSettings.php not found.", $this->getText( "//p[1]" )); |
60 | | - |
| 60 | + |
61 | 61 | // 'Please set up the wiki first' text available |
62 | 62 | $this->assertEquals( "Please set up the wiki first.", $this->getText( "//p[2]" )); |
63 | | - |
| 63 | + |
64 | 64 | // 'set up the wiki' link available |
65 | 65 | $this->assertTrue($this->isElementPresent( "link=set up the wiki" )); |
66 | 66 | } |
67 | | - |
68 | | - |
| 67 | + |
| 68 | + |
69 | 69 | public function testlanguagePageUI() { |
70 | | - |
| 70 | + |
71 | 71 | parent::navigateLanguagePage(); |
72 | | - |
| 72 | + |
73 | 73 | // Verify 'Language' heading |
74 | 74 | $this->assertEquals( "Language", $this->getText( LINK_DIV."h2" )); |
75 | | - |
| 75 | + |
76 | 76 | // 'Your language' label available |
77 | 77 | $this->assertEquals( "Your language:", |
78 | 78 | $this->getText( LINK_FORM."div[1]/div[1]/label" )); |
79 | | - |
| 79 | + |
80 | 80 | // 'Your language' dropdown available |
81 | 81 | $this->assertTrue( $this->isElementPresent( "UserLang" )); |
82 | | - |
| 82 | + |
83 | 83 | // 'Wiki language' label available |
84 | 84 | $this->assertEquals( "Wiki language:", |
85 | 85 | $this->getText( LINK_FORM."div[2]/div[1]/label" )); |
86 | | - |
| 86 | + |
87 | 87 | // 'Wiki language' dropdown available |
88 | 88 | $this->assertTrue($this->isElementPresent( "ContLang" )); |
89 | 89 | } |
90 | | - |
91 | | - |
| 90 | + |
| 91 | + |
92 | 92 | public function testWelcometoMediaWikiUI() { |
93 | | - |
| 93 | + |
94 | 94 | parent::navigateWelcometoMediaWikiPage(); |
95 | | - |
| 95 | + |
96 | 96 | // Verify 'Welcome to MediaWiki!' heading |
97 | 97 | $this->assertEquals( "Welcome to MediaWiki!", |
98 | 98 | $this->getText( LINK_DIV."h2" )); |
99 | | - |
| 99 | + |
100 | 100 | // Verify environment ok text displayed. |
101 | 101 | $this->assertEquals( "The environment has been checked.You can install MediaWiki.", |
102 | | - $this->getText( LINK_DIV."div[7]/span" )); |
| 102 | + $this->getText( LINK_DIV."div[6]/span" )); |
103 | 103 | } |
104 | | - |
105 | | - |
| 104 | + |
| 105 | + |
106 | 106 | public function testConnectToDatabaseUI() { |
107 | | - |
| 107 | + |
108 | 108 | parent::navigateConnetToDatabasePage(); |
109 | | - |
| 109 | + |
110 | 110 | // 'MYSQL radio button available |
111 | 111 | $this->assertEquals( "MySQL", |
112 | 112 | $this->getText( LINK_FORM."div[2]/div[2]/ul/li[1]/label" )); |
113 | 113 | $this->assertTrue( $this->isElementPresent( LINK_FORM."div[2]/div[2]/ul/li[1]" )); |
114 | | - |
| 114 | + |
115 | 115 | // 'SQLite' radio button available |
116 | 116 | $this->assertTrue( $this->isElementPresent( LINK_FORM."div[2]/div[2]/ul/li[2]" )); |
117 | 117 | $this->assertEquals( "SQLite", $this->getText( LINK_FORM."div[2]/div[2]/ul/li[2]/label ")); |
118 | | - |
| 118 | + |
119 | 119 | // 'Database host' label available |
120 | 120 | $this->assertEquals( "Database host:", $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/label" )); |
121 | | - |
| 121 | + |
122 | 122 | // 'Database host' text box default to 'localhost' |
123 | 123 | $this->assertEquals( "localhost", $this->getValue( "mysql_wgDBserver" )); |
124 | | - |
| 124 | + |
125 | 125 | // 'Identify this wiki' section available |
126 | 126 | $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" )); |
127 | | - |
| 127 | + |
128 | 128 | // 'Identify this wiki' label available |
129 | 129 | $this->assertEquals( "Identify this wiki", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" )); |
130 | | - |
| 130 | + |
131 | 131 | // 'Database name' lable available |
132 | 132 | $this->assertEquals( "Database name:", |
133 | 133 | $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/label" )); |
134 | | - |
| 134 | + |
135 | 135 | // Verify 'Database name:' text box is default to 'my_wiki' |
136 | 136 | $this->assertEquals( "my_wiki", $this->getValue( "mysql_wgDBname" )); |
137 | | - |
| 137 | + |
138 | 138 | // Verify 'Database table prefix:' label available |
139 | 139 | $this->assertEquals( "Database table prefix:", |
140 | 140 | $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/label" )); |
141 | | - |
| 141 | + |
142 | 142 | // 'User account for installation' section available |
143 | 143 | $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" )); |
144 | | - |
| 144 | + |
145 | 145 | // 'User account for installation' label available |
146 | 146 | $this->assertEquals( "User account for installation", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" )); |
147 | | - |
| 147 | + |
148 | 148 | // 'Database username' label available |
149 | 149 | $this->assertEquals( "Database username:", |
150 | 150 | $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/label" )); |
151 | | - |
| 151 | + |
152 | 152 | // 'Database username' text box defaults to 'root' |
153 | 153 | $this->assertEquals("root", $this->getValue( "mysql__InstallUser" )); |
154 | | - |
| 154 | + |
155 | 155 | // 'Database password' label available |
156 | 156 | $this->assertEquals( "Database password:", |
157 | 157 | $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/label" )); |
158 | 158 | } |
159 | | - |
160 | | - |
161 | | - |
| 159 | + |
| 160 | + |
| 161 | + |
162 | 162 | public function testDatabaseSettingsUI() { |
163 | | - |
| 163 | + |
164 | 164 | $databaseName = DB_NAME_PREFIX."_db_settings_UI"; |
165 | 165 | parent::navigateDatabaseSettingsPage( $databaseName ); |
166 | | - |
| 166 | + |
167 | 167 | // 'Database settings' text available. |
168 | 168 | $this->assertEquals( "Database settings", $this->getText( LINK_DIV."h2" )); |
169 | | - |
| 169 | + |
170 | 170 | // 'Database account for web access' section available |
171 | 171 | $this->assertTrue( $this->isElementPresent( LINK_FORM."fieldset" )); |
172 | | - |
| 172 | + |
173 | 173 | // 'Database account for web access' label available |
174 | 174 | $this->assertEquals( "Database account for web access", $this->getText( LINK_FORM."fieldset/legend" )); |
175 | | - |
| 175 | + |
176 | 176 | // 'Use the same account as for installation' check box available |
177 | 177 | $this->assertEquals( "Use the same account as for installation", $this->getText( LINK_FORM."fieldset/div[1]/label" )); |
178 | | - |
| 178 | + |
179 | 179 | // 'Use the same account as for installation' check box is selected by default |
180 | 180 | $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" )); |
181 | | - |
| 181 | + |
182 | 182 | // 'Use the same account as for installation' check box deselected |
183 | 183 | $this->click( "mysql__SameAccount" ); |
184 | | - |
| 184 | + |
185 | 185 | // verify 'Use the same account as for installation' check box is not selected |
186 | 186 | $this->assertEquals( "off", $this->getValue( "mysql__SameAccount" )); |
187 | | - |
| 187 | + |
188 | 188 | // 'Database username' label available |
189 | 189 | $this->assertEquals( "Database username:", $this->getText( "//div[@id='dbOtherAccount']/div[1]/div[1]/label" )); |
190 | | - |
| 190 | + |
191 | 191 | // 'Database username' text box is default to the 'wikiuser' |
192 | 192 | $this->assertEquals( "wikiuser", $this->getValue( "mysql_wgDBuser" )); |
193 | | - |
| 193 | + |
194 | 194 | // 'Database password' label available |
195 | 195 | $this->assertEquals( "Database password:", $this->getText( "//div[@id='dbOtherAccount']/div[2]/div[1]/label" )); |
196 | | - |
| 196 | + |
197 | 197 | // 'Create the account if it does not already exist' label available |
198 | 198 | $this->assertEquals( "Create the account if it does not already exist", $this->getText( "//div[@id='dbOtherAccount']/div[4]/label" )); |
199 | | - |
| 199 | + |
200 | 200 | // 'Create the account if it does not already exist' check box is not selected by default |
201 | 201 | $this->assertEquals( "off" , $this->getValue( "mysql__CreateDBAccount" )); |
202 | | - |
| 202 | + |
203 | 203 | // 'Create the account if it does not already exist' check box selected |
204 | 204 | $this->click( "mysql__CreateDBAccount" ); |
205 | | - |
| 205 | + |
206 | 206 | // Verify 'Create the account if it does not already exist' check box is selected |
207 | 207 | $this->assertEquals( "on" , $this->getValue( "mysql__CreateDBAccount" )); |
208 | 208 | $this->click( "mysql__SameAccount" ); |
209 | 209 | $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" )); |
210 | | - |
| 210 | + |
211 | 211 | // 'Storage engine' label available |
212 | 212 | $this->assertEquals( "Storage engine:", |
213 | 213 | $this->getText( LINK_FORM."div[1]/div[1]/label")); |
214 | | - |
| 214 | + |
215 | 215 | // 'InnoDB' label available |
216 | 216 | $this->assertEquals( "InnoDB", |
217 | 217 | $this->getText( LINK_FORM."div[1]/div[2]/ul/li[1]/label" )); |
218 | | - |
| 218 | + |
219 | 219 | // 'InnoDB' radio button available |
220 | 220 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlEngine_InnoDB" )); |
221 | | - |
| 221 | + |
222 | 222 | // 'MyISAM' label available |
223 | 223 | $this->assertEquals( "MyISAM", $this->getText( LINK_FORM."div[1]/div[2]/ul/li[2]/label" )); |
224 | | - |
| 224 | + |
225 | 225 | // 'MyISAM' radio button available |
226 | 226 | $this->assertTrue($this->isElementPresent( "mysql__MysqlEngine_MyISAM" )); |
227 | | - |
| 227 | + |
228 | 228 | // 'Database character set' label available |
229 | 229 | $this->assertEquals( "Database character set:", |
230 | 230 | $this->getText( LINK_FORM."div[3]/div[1]/label" )); |
231 | | - |
| 231 | + |
232 | 232 | // 'Binary' radio button available |
233 | 233 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_binary" )); |
234 | | - |
| 234 | + |
235 | 235 | // 'Binary' radio button available |
236 | 236 | $this->assertEquals( "Binary", $this->getText( LINK_FORM."div[3]/div[2]/ul/li[1]/label" )); |
237 | | - |
| 237 | + |
238 | 238 | // 'UTF-8' radio button available |
239 | 239 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_utf8" )); |
240 | | - |
| 240 | + |
241 | 241 | // 'UTF-8' label available |
242 | 242 | $this->assertEquals( "UTF-8", $this->getText( LINK_FORM."div[3]/div[2]/ul/li[2]/label" )); |
243 | | - |
| 243 | + |
244 | 244 | // 'Binary' radio button is selected |
245 | 245 | $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" )); |
246 | 246 | } |
247 | | - |
248 | | - |
249 | | - |
| 247 | + |
| 248 | + |
| 249 | + |
250 | 250 | public function testNamePageUI() { |
251 | | - |
| 251 | + |
252 | 252 | $databaseName = DB_NAME_PREFIX."_name_UI"; |
253 | 253 | parent::navigateNamePage($databaseName); |
254 | | - |
| 254 | + |
255 | 255 | // 'Name of wiki' text box available |
256 | 256 | $this->assertEquals( "Name of wiki:", |
257 | 257 | $this->getText( LINK_FORM."div[1]/div[1]/label" )); |
258 | | - |
| 258 | + |
259 | 259 | $this->assertTrue( $this->isElementPresent( "config_wgSitename" )); |
260 | | - |
| 260 | + |
261 | 261 | // 'Project namespace' label available |
262 | 262 | $this->assertEquals( "Project namespace:", |
263 | 263 | $this->getText( LINK_FORM."div[2]/div[1]/label" )); |
264 | | - |
| 264 | + |
265 | 265 | // 'Same as the wiki name' radio button available |
266 | 266 | $this->assertTrue( $this->isElementPresent( "config__NamespaceType_site-name" )); |
267 | | - |
| 267 | + |
268 | 268 | // 'Project' radio button available |
269 | 269 | $this->assertTrue( $this->isElementPresent( "config__NamespaceType_generic" )); |
270 | | - |
| 270 | + |
271 | 271 | // 'Project' radio button available |
272 | 272 | $this->assertTrue( $this->isElementPresent( "config__NamespaceType_other" )); |
273 | | - |
| 273 | + |
274 | 274 | // 'Same as the wiki name' label available |
275 | 275 | $this->assertEquals( "Same as the wiki name:", |
276 | 276 | $this->getText( LINK_FORM."div[2]/div[2]/ul/li[1]/label" )); |
277 | | - |
| 277 | + |
278 | 278 | // 'Project' label available |
279 | 279 | $this->assertEquals("Project", |
280 | 280 | $this->getText( LINK_FORM."div[2]/div[2]/ul/li[2]/label" )); |
281 | | - |
| 281 | + |
282 | 282 | // 'Project' label available |
283 | 283 | $this->assertEquals( "Other (specify)", |
284 | 284 | $this->getText( LINK_FORM."div[2]/div[2]/ul/li[3]/label" )); |
285 | | - |
| 285 | + |
286 | 286 | // 'Same as the wiki name' radio button selected by default |
287 | 287 | $this->assertEquals( "on", $this->getValue( "config__NamespaceType_site-name" )); |
288 | | - |
| 288 | + |
289 | 289 | // 'Administrator account' section available |
290 | 290 | $this->assertTrue( $this->isElementPresent( LINK_FORM."fieldset" )); |
291 | | - |
| 291 | + |
292 | 292 | // 'Administrator account' label available |
293 | 293 | $this->assertEquals( "Administrator account", |
294 | 294 | $this->getText( LINK_FORM."fieldset/legend" )); |
295 | | - |
| 295 | + |
296 | 296 | // 'Your Name' label available |
297 | 297 | $this->assertEquals( "Your name:", |
298 | 298 | $this->getText( LINK_FORM."fieldset/div[1]/div[1]/label" )); |
299 | | - |
| 299 | + |
300 | 300 | // 'Your Name' text box available |
301 | 301 | $this->assertTrue( $this->isElementPresent( "config__AdminName" )); |
302 | | - |
| 302 | + |
303 | 303 | // 'Password' label available |
304 | 304 | $this->assertEquals( "Password:", |
305 | 305 | $this->getText( LINK_FORM."fieldset/div[2]/div[1]/label" )); |
306 | | - |
| 306 | + |
307 | 307 | // 'Password' text box available |
308 | 308 | $this->assertTrue( $this->isElementPresent( "config__AdminPassword" )); |
309 | | - |
| 309 | + |
310 | 310 | // 'Password again' label available |
311 | 311 | $this->assertEquals( "Password again:", |
312 | 312 | $this->getText( LINK_FORM."fieldset/div[3]/div[1]/label" )); |
313 | | - |
| 313 | + |
314 | 314 | // 'Password again' text box available |
315 | 315 | $this->assertTrue( $this->isElementPresent( "config__AdminPassword2" )); |
316 | | - |
| 316 | + |
317 | 317 | // 'Email address' label avaialble |
318 | 318 | $this->assertEquals( "E-mail address:", |
319 | 319 | $this->getText( LINK_FORM."fieldset/div[4]/div[1]/label" )); |
320 | | - |
| 320 | + |
321 | 321 | // 'Email address' text box available |
322 | 322 | $this->assertTrue( $this->isElementPresent( "config__AdminEmail" )); |
323 | | - |
324 | | - // 'Subscribe to the release announcements mailing list. ' check box available |
325 | | - $this->assertTrue( $this->isElementPresent( "config__Subscribe" )); |
326 | | - |
327 | | - // 'Subscribe to the release announcements mailing list. ' label avaialble |
328 | | - $this->assertEquals( "Subscribe to the release announcements mailing list.", |
329 | | - $this->getText( LINK_FORM."fieldset/div[5]/label" )); |
330 | | - |
331 | | - // 'release announcements mailing list' link available |
332 | | - $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" )); |
333 | | - |
| 323 | + |
334 | 324 | // Message displayed |
335 | 325 | $this->assertEquals( "You are almost done! You can now skip the remaining configuration and install the wiki right now.", |
336 | | - $this->getText( LINK_FORM."/div[4]/div[2]" )); |
337 | | - |
| 326 | + $this->getText( LINK_FORM."/div[4]/div[2]/p" )); |
| 327 | + |
338 | 328 | // 'Ask me more questions.' radio button available |
339 | 329 | $this->assertTrue( $this->isElementPresent( "config__SkipOptional_continue" )); |
340 | | - |
| 330 | + |
341 | 331 | // 'Ask me more questions.' label available |
342 | 332 | $this->assertEquals( "Ask me more questions.", |
343 | 333 | $this->getText( LINK_FORM."div[5]/div[2]/ul/li[1]/label" )); |
344 | | - |
| 334 | + |
345 | 335 | // 'I'm bored already, just install the wiki' radio button is avaiable |
346 | 336 | $this->assertTrue( $this->isElementPresent( "config__SkipOptional_skip" )); |
347 | | - |
| 337 | + |
348 | 338 | // 'I'm bored already, just install the wiki' label available |
349 | 339 | $this->assertEquals( "I'm bored already, just install the wiki.", |
350 | 340 | $this->getText( LINK_FORM."div[5]/div[2]/ul/li[2]/label" )); |
351 | | - |
| 341 | + |
352 | 342 | // 'Ask me more questions.' radio button is default selected |
353 | 343 | $this->assertEquals( "on", $this->getValue( "config__SkipOptional_continue" )); |
354 | 344 | } |
355 | | - |
356 | | - |
357 | | - |
| 345 | + |
| 346 | + |
| 347 | + |
358 | 348 | public function testOptionPageUI() { |
359 | | - |
| 349 | + |
360 | 350 | $databaseName = DB_NAME_PREFIX."_options_UI"; |
361 | 351 | parent::navigateOptionsPage($databaseName); |
362 | | - |
| 352 | + |
363 | 353 | // 'Options' label available |
364 | 354 | $this->assertEquals( "Options", $this->getText( LINK_DIV."h2")); |
365 | | - |
| 355 | + |
366 | 356 | // 'Return e-mail address' label available |
367 | 357 | $this->assertEquals( "Return e-mail address:", $this->getText( "//div[@id='emailwrapper']/div[1]/div[1]/label" )); |
368 | | - |
| 358 | + |
369 | 359 | // 'Return e-mail address' text box available |
370 | 360 | $this->assertTrue( $this->isElementPresent( "config_wgPasswordSender" )); |
371 | | - |
| 361 | + |
372 | 362 | // Text 'apache@localhost' is default value of the 'Return e-mail address' text box |
373 | 363 | $this->assertEquals( "apache@localhost", $this->getValue( "config_wgPasswordSender" )); |
374 | | - |
| 364 | + |
375 | 365 | // 'Logo URL' label available |
376 | 366 | $this->assertEquals( "Logo URL:", $this->getText( LINK_FORM."fieldset[2]/div[3]/div[1]/label" )); |
377 | | - |
| 367 | + |
378 | 368 | // 'Logo URL' text box available |
379 | 369 | $this->assertTrue( $this->isElementPresent( "config_wgLogo" )); |
380 | | - |
| 370 | + |
381 | 371 | // Correct path available in the 'Logo URL' text box |
382 | 372 | $this->assertEquals( "/wiki/skins/common/images/wiki.png", $this->getValue( "config_wgLogo" )); |
383 | | - |
| 373 | + |
384 | 374 | // 'Enable file uploads' radio button available |
385 | 375 | $this->assertTrue( $this->isElementPresent( "config_wgEnableUploads" )); |
386 | | - |
| 376 | + |
387 | 377 | // 'Enable file uploads' label available |
388 | 378 | $this->assertEquals( "Enable file uploads", |
389 | 379 | $this->getText( LINK_FORM."fieldset[2]/div[1]/label" )); |
390 | | - |
| 380 | + |
391 | 381 | // 'Enable file uploads' check box is not selected |
392 | 382 | $this->assertEquals( "off", $this->getValue( "config_wgEnableUploads" )); |
393 | | - |
| 383 | + |
394 | 384 | $this->click( "config_wgEnableUploads" ); |
395 | | - |
| 385 | + |
396 | 386 | // 'Directory for deleted files' label available |
397 | 387 | $this->assertEquals( "Directory for deleted files:", |
398 | 388 | $this->getText( "//div[@id='uploadwrapper']/div/div[1]/label" )); |
399 | | - |
| 389 | + |
400 | 390 | // 'Directory for deleted files' text box available |
401 | 391 | $this->assertTrue( $this->isElementPresent( "config_wgDeletedDirectory" )); |
402 | | - |
| 392 | + |
403 | 393 | // Correct path available in the 'Directory for deleted files' text box |
404 | 394 | $this->assertEquals( "C:\\wamp\\www\\".DIRECTORY_NAME."/images/deleted", |
405 | 395 | $this->getValue( "config_wgDeletedDirectory" )); |
406 | 396 | } |
407 | | - |
408 | | - |
409 | | - |
| 397 | + |
| 398 | + |
| 399 | + |
410 | 400 | public function testInstallPageUI() { |
411 | | - |
| 401 | + |
412 | 402 | $databaseName = DB_NAME_PREFIX."_install_UI"; |
413 | 403 | parent::navigateInstallPage( $databaseName ); |
414 | | - |
| 404 | + |
415 | 405 | // Verify installation done messages display |
416 | 406 | $this->assertEquals( "Setting up database... done", |
417 | 407 | $this->getText( LINK_FORM."ul/li[1]" )); |
— | — | @@ -429,92 +419,92 @@ |
430 | 420 | $this->assertEquals( "Creating main page with default content... done", |
431 | 421 | $this->getText( LINK_FORM."ul/li[8]" )); |
432 | 422 | } |
433 | | - |
434 | | - |
435 | | - |
| 423 | + |
| 424 | + |
| 425 | + |
436 | 426 | public function testCompletePageUI() { |
437 | | - |
| 427 | + |
438 | 428 | $databaseName = DB_NAME_PREFIX."_complete_UI"; |
439 | 429 | parent::navigateCompletePage( $databaseName ); |
440 | | - |
| 430 | + |
441 | 431 | // 'Congratulations!' text display |
442 | 432 | $this->assertEquals("Congratulations!", |
443 | 433 | $this->getText( LINK_FORM."div[1]/div[2]/p[1]/b")); |
444 | 434 | // 'LocalSettings.php' generated message display |
445 | 435 | $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.", |
446 | 436 | $this->getText( LINK_FORM."div[1]/div[2]/p[2]" )); |
447 | | - |
| 437 | + |
448 | 438 | // 'Download LocalSettings.php'' link available |
449 | 439 | $this->assertTrue( $this->isElementPresent( "link=Download LocalSettings.php" )); |
450 | | - |
| 440 | + |
451 | 441 | // 'enter your wiki' link available |
452 | | - $this->assertTrue( $this->isElementPresent( "link=enter your wiki" )); |
| 442 | + $this->assertTrue($this->isElementPresent("link=Folder/index.php enter your wiki")); |
453 | 443 | } |
454 | | - |
455 | | - |
456 | | - |
| 444 | + |
| 445 | + |
| 446 | + |
457 | 447 | public function testRestartInstallation() { |
458 | | - |
| 448 | + |
459 | 449 | parent::navigateConnetToDatabasePage(); |
460 | 450 | $this->click( "link=Restart installation" ); |
461 | 451 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
462 | | - |
| 452 | + |
463 | 453 | // Restart installation' label should be available. |
464 | 454 | $this->assertEquals( "Restart installation", $this->getText( LINK_DIV."h2" )); |
465 | | - |
| 455 | + |
466 | 456 | //'Do you want to clear all saved data that you have entered and restart the installation process?' label available |
467 | 457 | $this->assertEquals( "Do you want to clear all saved data that you have entered and restart the installation process?", |
468 | 458 | $this->getText( "//*[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
469 | 459 | // 'Back' button available |
470 | 460 | $this->assertTrue($this->isElementPresent( "submit-back" )); |
471 | | - |
| 461 | + |
472 | 462 | // 'Restart' button available |
473 | 463 | $this->assertTrue($this->isElementPresent( "submit-restart" )); |
474 | 464 | } |
475 | | - |
476 | | - |
477 | | - |
| 465 | + |
| 466 | + |
| 467 | + |
478 | 468 | public function testMediaWikiLogoAvailability() { |
479 | | - |
| 469 | + |
480 | 470 | $databaseName = DB_NAME_PREFIX."_mediawiki_logo"; |
481 | 471 | parent::navigateInitialpage(); |
482 | 472 | parent::mediaWikiLogoPresentInitialScreen(); |
483 | 473 | $this->click( "link=set up the wiki" ); |
484 | 474 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
485 | | - |
| 475 | + |
486 | 476 | // 'Language' page |
487 | 477 | parent::mediaWikiLogoPresent(); |
488 | 478 | parent::clickContinueButton(); |
489 | | - |
| 479 | + |
490 | 480 | // 'Welcome to MediaWiki' page |
491 | 481 | parent::mediaWikiLogoPresent(); |
492 | 482 | parent::clickContinueButton(); |
493 | | - |
| 483 | + |
494 | 484 | // 'Connet to database' page |
495 | 485 | parent::mediaWikiLogoPresent(); |
496 | 486 | $this->type("mysql_wgDBname", $databaseName ); |
497 | 487 | parent::clickContinueButton(); |
498 | | - |
| 488 | + |
499 | 489 | // 'Database setting' page |
500 | 490 | parent::mediaWikiLogoPresent(); |
501 | 491 | parent::clickContinueButton(); |
502 | | - |
| 492 | + |
503 | 493 | // 'Name' page |
504 | 494 | parent::mediaWikiLogoPresent(); |
505 | 495 | parent::completeNamePage(); |
506 | 496 | parent::clickContinueButton(); |
507 | | - |
| 497 | + |
508 | 498 | // 'Options' page |
509 | 499 | parent::mediaWikiLogoPresent(); |
510 | 500 | parent::clickContinueButton(); |
511 | | - |
| 501 | + |
512 | 502 | // 'Install' page |
513 | 503 | parent::mediaWikiLogoPresent(); |
514 | 504 | } |
515 | | - |
516 | | - |
| 505 | + |
| 506 | + |
517 | 507 | public function testRightFramework() { |
518 | | - |
| 508 | + |
519 | 509 | parent::navigateLanguagePage(); |
520 | 510 | // Verfy right framework texts display |
521 | 511 | $this->assertEquals( "Language", |