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