Merge "(Bug 45355) Read of arbitrary files through mwdoc-filter.php"
[lhc/web/wiklou.git] / tests / selenium / installer / MediaWikiButtonsAvailabilityTestCase.php
1 <?php
2
3 /**
4 * MediaWikiButtonsAvailabilityTestCase
5 *
6 * @file
7 * @ingroup Maintenance
8 * Copyright (C) 2010 Nadeesha Weerasinghe <nadeesha@calcey.com>
9 * http://www.calcey.com/
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * http://www.gnu.org/copyleft/gpl.html
25 *
26 * @addtogroup Maintenance
27 *
28 */
29
30
31 require_once ( __DIR__ . '/MediaWikiInstallationCommonFunction.php' );
32
33 /**
34 * Test Case ID : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
35 * Test Case Name :'Back' and 'Continue' button availability
36 * Version : MediaWiki 1.18alpha
37 */
38
39 class MediaWikiButtonsAvailabilityTestCase extends MediaWikiInstallationCommonFunction {
40 function setUp() {
41 parent::setUp();
42 }
43
44 // Verify only 'Continue' button available on 'Language' page
45 public function testOnlyContinueButtonAvailability() {
46 parent::navigateLanguagePage();
47
48 // Verify only 'Continue' button avaialble
49 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
50
51 // 'Back' button is not avaialble
52 $this->assertElementNotPresent( "submit-back" );
53 }
54
55 // Verify 'Continue' and 'Back' buttons availability
56 public function testBothButtonsAvailability() {
57 // Verify buttons availability on 'Welcome to MediaWiki' page
58 parent::navigateWelcometoMediaWikiPage();
59 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
60 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
61 parent::restartInstallation();
62
63 // Verify buttons availability on 'Connect to Database' page
64 parent::navigateConnetToDatabasePage();
65 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
66 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
67 parent::restartInstallation();
68
69 // Verify buttons availability on 'Database settings' page
70 $databaseName = DB_NAME_PREFIX . "_db_settings";
71 parent::navigateDatabaseSettingsPage( $databaseName );
72 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
73 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
74 parent::restartInstallation();
75
76 // Verify buttons availability on 'Name' page
77 $databaseName = DB_NAME_PREFIX . "_name";
78 parent::navigateNamePage( $databaseName );
79 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
80 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
81 parent::restartInstallation();
82
83 // Verify buttons availability on 'Options' page
84 $databaseName = DB_NAME_PREFIX . "_options";
85 parent::navigateOptionsPage( $databaseName );
86 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
87 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
88 parent::restartInstallation();
89
90 // Verify buttons availability on 'Install' page
91 $databaseName = DB_NAME_PREFIX . "_install";
92 parent::navigateInstallPage( $databaseName );
93 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
94 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
95 }
96 }