4 * MediaWikiButtonsAvailabilityTestCase
8 * Copyright (C) 2010 Nadeesha Weerasinghe <nadeesha@calcey.com>
9 * http://www.calcey.com/
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.
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.
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
26 * @addtogroup Maintenance
31 require_once ( __DIR__
. '/MediaWikiInstallationCommonFunction.php' );
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
39 class MediaWikiButtonsAvailabilityTestCase
extends MediaWikiInstallationCommonFunction
{
44 // Verify only 'Continue' button available on 'Language' page
45 public function testOnlyContinueButtonAvailability() {
46 parent
::navigateLanguagePage();
48 // Verify only 'Continue' button avaialble
49 $this->assertTrue( $this->isElementPresent( "submit-continue" ) );
51 // 'Back' button is not avaialble
52 $this->assertElementNotPresent( "submit-back" );
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();
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();
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();
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();
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();
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" ) );