Updated the test cases as per the code review comments
authornadeesha <nadeesha@users.mediawiki.org>
Thu, 23 Dec 2010 10:36:22 +0000 (10:36 +0000)
committernadeesha <nadeesha@users.mediawiki.org>
Thu, 23 Dec 2010 10:36:22 +0000 (10:36 +0000)
16 files changed:
tests/installer/MediaWikiButtonsAvailabilityTestCase.php
tests/installer/MediaWikiDifferentDatabaseAccountTestCase.php
tests/installer/MediaWikiDifferntDatabasePrefixTestCase.php
tests/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php
tests/installer/MediaWikiErrorsNamepageTestCase.php
tests/installer/MediaWikiHelpFieldHintTestCase.php
tests/installer/MediaWikiInstallationCommonFunction.php
tests/installer/MediaWikiInstallationConfig.php
tests/installer/MediaWikiInstallerTestSuite.php
tests/installer/MediaWikiMySQLDataBaseTestCase.php
tests/installer/MediaWikiMySQLiteDataBaseTestCase.php
tests/installer/MediaWikiOnAlreadyInstalledTestCase.php
tests/installer/MediaWikiRestartInstallationTestCase.php
tests/installer/MediaWikiRightFrameworkLinksTestCase.php
tests/installer/MediaWikiUpgradeExistingDatabaseTestCase.php
tests/installer/MediaWikiUserInterfaceTestCase.php

index 398d950..fc0d333 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -36,6 +36,7 @@ require_once 'MediaWikiInstallationCommonFunction.php';
  * Version        : MediaWiki 1.18alpha
 */
 
+
 class MediaWikiButtonsAvailabilityTestCase extends MediaWikiInstallationCommonFunction {
 
     function setUp() {
index 9a9e49b..6366158 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -38,13 +38,13 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 
 class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
 
     // Install Mediawiki using 'MySQL' database type.
-    public function testDifferentDatabaseAccount(){
+    public function testDifferentDatabaseAccount() {
 
         $databaseName = DB_NAME_PREFIX."_dif_accounts";
 
@@ -71,14 +71,12 @@ class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCom
         parent::clickContinueButton();
 
         // 'Install' page
-        $this->assertEquals( "Creating database user... done",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" ));
+        $this->assertEquals("Creating database user... done",
+                $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]"));
         parent::clickContinueButton();
 
         // 'Complete' page
-        $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Congratulations!",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
+        parent::completePageSuccessfull();
         $this->chooseCancelOnNextConfirmation();
     }
 }
index 51fb1bb..a5b98d3 100644 (file)
@@ -27,7 +27,7 @@
  *
  */
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -38,16 +38,16 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 
 class MediaWikiDifferntDatabasePrefixTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
     // Install Mediawiki using 'MySQL' database type.
-    public function testDifferentDatabasePrefix(){
+    public function testDifferentDatabasePrefix() {
 
         $databaseName = DB_NAME_PREFIX."_db_prefix";
         parent::navigateInstallPage( $databaseName );
-        
+
         // To 'Options' page
         parent::clickBackButton();
 
@@ -84,9 +84,11 @@ class MediaWikiDifferntDatabasePrefixTestCase extends MediaWikiInstallationCommo
         // Verify already installed warning message
         $this->assertEquals( "Install",
                 $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.",
+        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]" ));
+
         parent::clickContinueButton();
+        parent::completePageSuccessfull();
         $this->chooseCancelOnNextConfirmation();
         parent::restartInstallation();
     }
index 5d2b4ab..4100ba4 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -38,21 +38,22 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 
 class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
     // Verify warning messages for the 'Connet to database' page
-    public function testErrorsConnectToDatabasePage(){
+    public function testErrorsConnectToDatabasePage() {
 
         parent::navigateConnetToDatabasePage();
 
         // Verify warning mesage for invalid database host
         $this->type( "mysql_wgDBserver", INVALID_DB_HOST );
         parent::clickContinueButton();
-        $this->assertEquals( "DB connection error: php_network_getaddresses: getaddrinfo failed: No such host is known. (".INVALID_DB_HOST.").Check the host, username and password below and try again.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
-
+        $this->assertEquals( "DB connection error: php_network_getaddresses: getaddrinfo failed: No such host is known. (".INVALID_DB_HOST.").",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" ));
+        $this->assertEquals( "Check the host, username and password below and try again.",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" ));
         // Verify warning message for the blank database host
         $this->type( "mysql_wgDBserver", "" );
         parent::clickContinueButton();
@@ -65,8 +66,8 @@ class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallation
         // Verify warning message for the invalid database name
         $this->type( "mysql_wgDBname", INVALID_DB_NAME );
         parent::clickContinueButton();
-        $this->assertEquals( "Invalid database name \"".INVALID_DB_NAME."\".Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
+        $this->assertEquals( "Invalid database name \"".INVALID_DB_NAME."\". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p" ));
 
         // Verify warning message for the blank database name
         $this->type( "mysql_wgDBname", "");
@@ -80,7 +81,7 @@ class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallation
         // Verify warning message for the invalid databaase prefix
         $this->type( "mysql_wgDBprefix", INVALID_DB_PREFIX );
         parent::clickContinueButton();
-        $this->assertEquals( "Invalid database prefix \"".INVALID_DB_PREFIX."\".Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).",
+        $this->assertEquals( "Invalid database prefix \"".INVALID_DB_PREFIX."\". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 
         // Valid Database prefix
@@ -89,15 +90,18 @@ class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallation
         // Verify warning message for the invalid database user name
         $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
         parent::clickContinueButton();
-        $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: NO) (localhost).Check the host, username and password below and try again.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
-
+        $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: NO) (localhost).",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" ));
+        $this->assertEquals( "Check the host, username and password below and try again.",
+                $this->getText("//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]"));
 
-        // Verify warning message for the invalid database user name
+        // Verify warning message for the blank database user name
         $this->type( "mysql__InstallUser", "" );
         parent::clickContinueButton();
-        $this->assertEquals( "DB connection error: Access denied for user 'SYSTEM'@'localhost' (using password: NO) (localhost).Check the host, username and password below and try again.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
+        $this->assertEquals( "DB connection error: Access denied for user 'SYSTEM'@'localhost' (using password: NO) (localhost).",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" ));
+        $this->assertEquals( "Check the host, username and password below and try again.",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" ));
 
         // Valid Database username
         $this->type( "mysql__InstallUser",  VALID_DB_USER_NAME );
@@ -105,15 +109,20 @@ class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallation
         // Verify warning message for the invalid password
         $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
         parent::clickContinueButton();
-        $this->assertEquals( "DB connection error: Access denied for user 'root'@'localhost' (using password: YES) (localhost).Check the host, username and password below and try again.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
+
+        $this->assertEquals( "DB connection error: Access denied for user 'root'@'localhost' (using password: YES) (localhost).",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" ));
+        $this->assertEquals( "Check the host, username and password below and try again.",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" ));
 
         // Verify warning message for the invalid username and password
         $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
         $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
         parent::clickContinueButton();
-        $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: YES) (localhost).Check the host, username and password below and try again.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
+        $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: YES) (localhost).",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" ));
+        $this->assertEquals( "Check the host, username and password below and try again.",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" ));
 
         // Valid username and valid password
         $this->type( "mysql__InstallUser", VALID_DB_USER_NAME );
index 2537d9e..842485d 100644 (file)
@@ -33,7 +33,7 @@
  * Version        : MediaWiki 1.18alpha
 */
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunction {
 
@@ -42,7 +42,7 @@ class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunctio
     }
 
     // Verify warning message for the 'Name' page
-    public function testErrorsNamePage(){
+    public function testErrorsNamePage() {
 
         $databaseName  = DB_NAME_PREFIX."_error_name";
 
@@ -73,7 +73,7 @@ class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunctio
         $this->click( "config__NamespaceType_other" );
         $this->type( "config_wgMetaNamespace", INVALID_NAMESPACE );
         parent::clickContinueButton();
-        $this->assertEquals( "The specified namespace \"\" is invalid.Specify a different project namespace.",
+        $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 
 
@@ -82,7 +82,7 @@ class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunctio
         $this->click( "config__NamespaceType_other" );
         $this->type( "config_wgMetaNamespace" , "" );
         parent::clickContinueButton();
-        $this->assertEquals( "The specified namespace \"\" is invalid.Specify a different project namespace.",
+        $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 
 
@@ -103,7 +103,7 @@ class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunctio
         $this->assertEquals( "Enter an administrator username.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 
-
+        $this->type( "config_wgSitename", VALID_WIKI_NAME );
         // Verify warning message for blank 'Password'
         $this->type( "config__AdminName", VALID_YOUR_NAME );
         $this->type( "config__AdminPassword", " " );
index fcc0fff..16520bf 100644 (file)
  * Version        : MediaWiki 1.18alpha
 */
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
 
     // Verify help field availability for the fields
-    public function testMySQLConnectToDatabaseFieldHint(){
+    public function testMySQLConnectToDatabaseFieldHint() {
 
         parent::navigateConnetToDatabasePage();
 
@@ -75,7 +75,7 @@ class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testSQLiteConnectToDatabaseFieldHint(){
+    public function testSQLiteConnectToDatabaseFieldHint() {
 
         parent::navigateConnetToDatabasePage();
         $this->click( "DBType_sqlite" );
@@ -91,7 +91,7 @@ class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testDatabaseSettingsFieldHint(){
+    public function testDatabaseSettingsFieldHint() {
 
         $databaseName = DB_NAME_PREFIX."_db_field";
         parent::navigateDatabaseSettingsPage($databaseName);
@@ -109,7 +109,7 @@ class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testNameFieldHint(){
+    public function testNameFieldHint() {
 
         $databaseName = DB_NAME_PREFIX."_name_field";
         parent::navigateNamePage( $databaseName );
index 55960ed..8262516 100644 (file)
  */
 
 require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
-include 'MediaWikiInstallationConfig.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationConfig.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationMessage.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationVariables.php');
+
 
 class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTestCase {
 
     function setUp() {
-        $this->setBrowser("*chrome");
-        $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/");
+        $this->setBrowser( TEST_BROWSER );
+        $this->setBrowserUrl("http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/");
     }
 
-    
-    public function navigateInitialpage(){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/" );
+
+    public function navigateInitialpage() {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/" );
     }
 
 
     // Navigate to the 'Language' page
-    public function navigateLanguagePage(){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateLanguagePage() {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
     }
 
 
     // Navigate to the 'Welcome to MediaWiki' page
-    public function navigateWelcometoMediaWikiPage(){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateWelcometoMediaWikiPage() {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
         $this->click( "submit-continue ");
         $this->waitForPageToLoad( PAGE_LOAD_TIME );
     }
 
 
     // Navigate yo 'Connect to Database' page
-    public function navigateConnetToDatabasePage(){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateConnetToDatabasePage() {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click( "submit-continue" );
@@ -71,9 +74,9 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Navigate to the 'Database Settings' page
-    public function navigateDatabaseSettingsPage( $databaseName ){
+    public function navigateDatabaseSettingsPage( $databaseName ) {
 
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click("submit-continue");
@@ -90,8 +93,8 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Navigate to the 'Name' page
-    public function navigateNamePage( $databaseName ){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateNamePage( $databaseName ) {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click( "submit-continue" );
@@ -112,10 +115,9 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Navigate 'Options' page
-    public function navigateOptionsPage( $databaseName ){
+    public function navigateOptionsPage( $databaseName ) {
 
-        $upgradeExisting = false;
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click( "submit-continue" );
@@ -146,9 +148,9 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Navigate 'Install' page
-    public function navigateInstallPage( $databaseName ){
-        
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateInstallPage( $databaseName ) {
+
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click( "submit-continue" );
@@ -183,8 +185,8 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Navigate to 'Complete' page
-    public function navigateCompletePage( $databaseName ){
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function navigateCompletePage( $databaseName ) {
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // 'Welcome to MediaWiki!' page
         $this->click( "submit-continue" );
@@ -224,7 +226,7 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Complete the Name page fields
-    public function completeNamePage(){
+    public function completeNamePage() {
         $this->type( "config_wgSitename", NAME_OF_WIKI );
         $this->type( "config__AdminName", ADMIN_USER_NAME);
         $this->type( "config__AdminPassword", ADMIN_PASSWORD );
@@ -236,21 +238,21 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Clicking on the 'Continue' button in any MediaWiki page
-    public function clickContinueButton(){
+    public function clickContinueButton() {
         $this->click( "submit-continue" );
         $this->waitForPageToLoad( PAGE_LOAD_TIME );
     }
 
 
     // Clicking on the 'Back' button in any MediaWiki page
-    public function clickBackButton(){
+    public function clickBackButton() {
         $this->click( "submit-back" );
         $this->waitForPageToLoad( PAGE_LOAD_TIME );
     }
 
 
     // Restarting the installation
-    public function restartInstallation(){
+    public function restartInstallation() {
         $this->click( "link=Restart installation" );
         $this->waitForPageToLoad( PAGE_LOAD_TIME );
         $this->click( "submit-restart" );
@@ -259,13 +261,23 @@ class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTes
 
 
     // Verify 'MediaWiki' logo available in the initial screen
-    public function mediaWikiLogoPresentInitialScreen(){
-        $this->assertTrue($this->isElementPresent("//img[@alt='The MediaWiki logo']"));
+    public function mediaWikiLogoPresentInitialScreen() {
+        $this->assertTrue( $this->isElementPresent( "//img[@alt='The MediaWiki logo']" ));
     }
 
 
     // Verify 'MediaWiki' logo available
-    public function mediaWikiLogoPresent(){
-        $this->assertTrue($this->isElementPresent("//div[@id='p-logo']/a"));
+    public function mediaWikiLogoPresent() {
+        $this->assertTrue( $this->isElementPresent( "//div[@id='p-logo']/a" ));
+    }
+
+
+    public function completePageSuccessfull() {
+        $this->assertEquals( "Complete!",
+                $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
+
+        // 'Congratulations!' text should be available in the 'Complete!' page.
+        $this->assertEquals( "Congratulations!",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[1]/b" ));
     }
 }
index 1bae458..4d0baf0 100644 (file)
  * with current value of the 'DB_NAME_PREFIX'.
  * If you wish to run the suite more than one time, you need to change
  * the value of the 'DB_NAME_PREFIX'.
- */
-define('DB_NAME_PREFIX', "database_name_d" );
-
-// Directory name  should be change
-define('DIRECTORY_NAME', "installertesting");
-
-
-// Port should be change
-define ('PORT', "8080");
-
-// Common variables
-define('PAGE_LOAD_TIME', "80000" );
-
-
-// 'MySQL' database type help field hint
-define('MYSQL_DATABASE_HOST_HELP', "If your database server is on different server, enter the host name or IP address here. \nIf you are using shared web hosting, your hosting provider should give you the correct host name in their documentation. \nIf you are installing on a Windows server and using MySQL, using \"localhost\" may not work for the server name. If it does not, try \"127.0.0.1\" for the local IP address.");
-define('MYSQL_DATABASE_NAME_HELP', "Choose a name that identifies your wiki. It should not contain spaces or hyphens. \nIf you are using shared web hosting, your hosting provider will either give you a specific database name to use or let you create databases via a control panel.");
-define('MYSQL_DATABASE_TABLE_PREFIX_HELP', "Choose a name that identifies your wiki. It should not contain spaces or hyphens.");
-define('MYSQL_DATBASE_USERNAME_HELP', "Enter the username that will be used to connect to the database during the installation process. This is not the username of the MediaWiki account; this is the username for your database.");
-define('MYSQL_DATABASE_PASSWORD_HELP', "Enter the password that will be used to connect to the database during the installation process. This is not the password for the MediaWiki account; this is the password for your database.");
-
-// 'SQLite' database type help field hint
-define('SQLITE_DATA_DIRECTORY_HELP', "SQLite stores all data in a single file. \nThe directory you provide must be writable by the webserver during installation. \nIt should not be accessible via the web, this is why we're not putting it where your PHP files are. \nThe installer will write a .htaccess file along with it, but if that fails someone can gain access to your raw database. That includes raw user data (e-mail addresses, hashed passwords) as well as deleted revisions and other restricted data on the wiki. \nConsider putting the database somewhere else altogether, for example in /var/lib/mediawiki/yourwiki.");
-define('SQLITE_DATABASE_NAME_HELP', "Choose a name that identifies your wiki. Do not use spaces or hyphens. This will be used for the SQLite data file name.");
-
-// 'Database settings' page hel0p field hint
-define('SEARCH_ENGINE_HELP', "InnoDB is almost always the best option, since it has good concurrency support. \nMyISAM may be faster in single-user or read-only installations. MyISAM databases tend to get corrupted more often than InnoDB databases.");
-define('DATABASE_CHARACTER_SET_HELP', "In binary mode, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF-8 mode, and allows you to use the full range of Unicode characters. \nIn UTF-8 mode, MySQL will know what character set your data is in, and can present and convert it appropriately, but it will not let you store characters above the Basic Multilingual Plane.");
-
-// 'Name' page help field hint
-define('NAME_OF_WIKI_HELP', "This will appear in the title bar of the browser and in various other places.");
-define('PROJECT_NAMESPACE_HELP', "Following Wikipedia's example, many wikis keep their policy pages separate from their content pages, in a \"project namespace\". All page titles in this namespace start with a certain prefix, which you can specify here. Traditionally, this prefix is derived from the name of the wiki, but it cannot contain punctuation characters such as \"#\" or \":\".");
-define('USER_NAME_HELP', "Enter your preferred username here, for example \"Joe Bloggs\". This is the name you will use to log in to the wiki.");
-define('EMAIL_ADDRESS_HELP', "Enter an e-mail address here to allow you to receive e-mail from other users on the wiki, reset your password, and be notified of changes to pages on your watchlist.");
-define('SUBSCRIBE_MAILING_LIST_HELP', "This is a low-volume mailing list used for release announcements, including important security announcements. You should subscribe to it and update your MediaWiki installation when new versions come out.");
-
-
-// 'Name' page input values
-define( 'NAME_OF_WIKI', "Site Name");
-define( 'ADMIN_USER_NAME', "My Name" );
-define( 'ADMIN_PASSWORD', "12345" );
-define ( 'ADMIN_RETYPE_PASSWORD', "12345" );
-define ( 'ADMIN_EMAIL_ADDRESS', "nadeesha@calcey.com" );
-
-
-// 'Name' page input values for warning messages
-define( 'VALID_WIKI_NAME', "MyWiki" );
-define( 'VALID_YOUR_NAME', "Nadeesha Weerasinghe" );
-define( 'VALID_PASSWORD', "12345" );
-define( 'VALID_PASSWORD_AGAIN', "12345"  );
-define( 'INVALID_PASSWORD_AGAIN', "123" );
-define( 'VALID_NAMESPACE', "Mynamespace"  );
-define( 'INVALID_NAMESPACE', "##..##" );
-
-
-// 'Database settings' page input values
-define( 'DB_WEB_USER', "different" );
-define('DB_WEB_USER_PASSWORD', "12345" );
-
-
-// 'Connet to database' page input values
-define( 'DATABASE_PREFIX',"databaseprefix" );
-
-
-// 'Connet to database' page input values for warning messages
-define( 'VALID_DB_HOST', "localhost" );
-define( 'INVALID_DB_HOST', "local" );
-define( 'INVALID_DB_NAME', "my-wiki" );
-define ( 'VALID_DB_NAME', "my_wiki1");
-define( 'INVALID_DB_PREFIX', "database prefix" );
-define( 'VALID_DB_PREFIX', "database_prefix");
-define( 'INVALID_DB_USER_NAME', "roots" );
-define( 'VALID_DB_USER_NAME', "root");
-define( 'INVALID_DB_PASSWORD', "12345" );
-
+*/
+define('DB_NAME_PREFIX', "database_name" );
+define('DIRECTORY_NAME', "mediawiki" );
+define ('PORT', "8080" );
+define( 'HOST_NAME', "localhost" );
 
+/*
+ *  Use the followings to run the test suite in different browsers.
+ *  Firefox : *firefox
+ *  IE :  *iexplore
+ *  Google chrome : *googlechrome
+ *  Opera :  *opera
+*/
+define ( 'TEST_BROWSER', "*firefox" );
index 214cb06..3512e5c 100644 (file)
 require_once 'PHPUnit/Framework.php';
 require_once 'PHPUnit/Framework/TestSuite.php';
 
-require_once 'MediaWikiUserInterfaceTestCase.php';
-require_once 'MediaWikiButtonsAvailabilityTestCase.php';
-require_once 'MediaWikiHelpFieldHintTestCase.php';
-require_once 'MediaWikiRightFrameworkLinksTestCase.php';
-require_once 'MediaWikiRestartInstallationTestCase.php';
-require_once 'MediaWikiErrorsConnectToDatabasePageTestCase.php';
-require_once 'MediaWikiErrorsNamepageTestCase.php';
-require_once 'MediaWikiMySQLDataBaseTestCase.php';
-require_once 'MediaWikiMySQLiteDataBaseTestCase.php';
-require_once 'MediaWikiUpgradeExistingDatabaseTestCase.php';
-require_once 'MediaWikiDifferntDatabasePrefixTestCase.php';
-require_once 'MediaWikiDifferentDatabaseAccountTestCase.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiUserInterfaceTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiButtonsAvailabilityTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiHelpFieldHintTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiRightFrameworkLinksTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiRestartInstallationTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiErrorsConnectToDatabasePageTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiErrorsNamepageTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiMySQLDataBaseTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiMySQLiteDataBaseTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiUpgradeExistingDatabaseTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiDifferntDatabasePrefixTestCase.php');
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiDifferentDatabaseAccountTestCase.php');
+
 
 $suite = new PHPUnit_Framework_TestSuite('ArrayTest');
 $result = new PHPUnit_Framework_TestResult;
index 91d22a4..b4a6765 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 01 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -38,12 +38,12 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 
 class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
     // Verify  MediaWiki installation using 'MySQL' database type
-    public function testMySQLDatabaseSuccess(){
+    public function testMySQLDatabaseSuccess() {
 
         $databaseName = DB_NAME_PREFIX."_sql_db";
 
@@ -72,12 +72,7 @@ class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction
         parent::clickContinueButton();
 
         // 'Complete' page
-        $this->assertEquals( "Complete!",
-                $this->getText("//div[@id='bodyContent']/div/div/h2" ));
-
-        // 'Congratulations!' text should be available in the 'Complete!' page.
-        $this->assertEquals( "Congratulations!",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
+        parent::completePageSuccessfull();
         parent::restartInstallation();
     }
 }
index 9a0f272..1bf135d 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 06 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -52,7 +52,7 @@ class MediaWikiMySQLiteDataBaseTestCase extends MediaWikiInstallationCommonFunct
 
         // Select 'SQLite' database type
         $this->assertEquals( "SQLite settings", $this->getText( "//div[@id='DB_wrapper_sqlite']/h3" ));
-        
+
         // Change database name
         $defaultDbName = $this->getText( "sqlite_wgDBname" );
         $this->type( "sqlite_wgDBname", " ");
@@ -73,12 +73,7 @@ class MediaWikiMySQLiteDataBaseTestCase extends MediaWikiInstallationCommonFunct
         parent::clickContinueButton();
 
         // 'Complete' page
-        $this->assertEquals( "Complete!",
-                $this->getText("//div[@id='bodyContent']/div/div/h2" ));
-
-        // 'Congratulations!' text should be available in the 'Complete!' page.
-        $this->assertEquals( "Congratulations!",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
+        parent::completePageSuccessfull();
         parent::restartInstallation();
     }
 }
index d657264..bc1826c 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 
 /*
@@ -64,10 +64,7 @@ class MediaWikiOnAlreadyInstalledTestCase extends MediaWikiInstallationCommonFun
 
         // Complete page
         parent::clickContinueButton();
-
-        // Clicking in the 'Continue' button should display the 'Complete' page with 'Congratulations!' text.
-        $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Congratulations!", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
+        parent::completePageSuccessfull();
         $this->chooseCancelOnNextConfirmation();
         parent::restartInstallation();
     }
index 5102307..d76a014 100644 (file)
@@ -29,7 +29,7 @@
 
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 11, 12 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -82,7 +82,7 @@ class MediaWikiRestartInstallationTestCase extends MediaWikiInstallationCommonFu
 
 
     // Verify cancelling restart
-    public function testCancelRestartInstallation(){
+    public function testCancelRestartInstallation() {
 
         $dbNameBeforeRestart  = DB_NAME_PREFIX."_cancel_restart";
 
@@ -103,7 +103,8 @@ class MediaWikiRestartInstallationTestCase extends MediaWikiInstallationCommonFu
         parent::clickBackButton();
 
         // Navigates to the previous page
-        $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));;
+        $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
+        ;
 
         // 'Connect to database' page
         parent::clickBackButton();
index 6357685..57f62bf 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -40,15 +40,15 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 */
 
 
-class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction{
+class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
-    public function testLinksAvailability(){
-        
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+    public function testLinksAvailability() {
+
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // Verify 'Read me' link availability
         $this->assertTrue($this->isElementPresent( "link=Read me" ));
@@ -60,9 +60,9 @@ class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFu
         $this->assertTrue($this->isElementPresent( "link=Copying" ));
     }
 
-    public function testPageNavigation(){
+    public function testPageNavigation() {
 
-        $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
+        $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" );
 
         // Navigate to the 'Read me' page
         $this->click( "link=Read me" );
index 13214d6..39508de 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 05 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -39,19 +39,19 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 
 class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationCommonFunction {
 
-    function setUp(){
+    function setUp() {
         parent::setUp();
     }
 
     // Install Mediawiki using 'MySQL' database type.
-    public function testUpgradeExistingDatabase(){
+    public function testUpgradeExistingDatabase() {
 
         $databaseName = DB_NAME_PREFIX."_upgrade_existing";
         parent::navigateInstallPage( $databaseName );
 
         $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
         $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.",
+        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
 
         // 'Optionis' page
@@ -72,7 +72,7 @@ class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationComm
         $this->assertEquals( "Upgrade existing installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 
         // Warning message displayed.
-        $this->assertEquals( "There are MediaWiki tables in this database.To upgrade them to MediaWiki 1.18alpha, click Continue.",
+        $this->assertEquals( "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.18alpha, click Continue.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
 
         parent::clickContinueButton();
@@ -80,8 +80,10 @@ class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationComm
                 $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 
         // 'Upgrade complete.' text display
-        $this->assertEquals( "Upgrade complete.You can now start using your wiki. \nIf you want to regenerate your LocalSettings.php file, click the button below. This is not recommended unless you are having problems with your wiki.",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]"));
+        $this->assertEquals("Upgrade complete.",
+                $this->getText("//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]/p[1]"));
+        $this->assertEquals("You can now start using your wiki.",
+                $this->getText("//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]/p[2]"));
 
         $this->assertTrue($this->isElementPresent( "submit-regenerate" ));
         $this->click( "submit-regenerate" );
@@ -99,14 +101,12 @@ class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationComm
         parent::clickContinueButton();
 
         // Install page
-        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.",
+        $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
         parent::clickContinueButton();
 
         // complete
-        $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Congratulations!",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
+        parent::completePageSuccessfull();
         $this->chooseCancelOnNextConfirmation();
         parent::restartInstallation();
     }
index 9cf2fca..a2a1f01 100644 (file)
@@ -27,7 +27,7 @@
  *
  */
 
-require_once 'MediaWikiInstallationCommonFunction.php';
+require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php');
 
 /*
  * Test Case ID   : 18 - 27 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
@@ -40,12 +40,11 @@ require_once 'MediaWikiInstallationCommonFunction.php';
 class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction {
 
     function setUp() {
-        $this->setBrowser("*chrome");
-        $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/");
+        parent::setUp();
     }
 
-    public function testInitialPageUI(){
+
+    public function testInitialPageUI() {
 
         parent::navigateInitialpage();
 
@@ -66,7 +65,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testlanguagePageUI(){
+    public function testlanguagePageUI() {
 
         parent::navigateLanguagePage();
 
@@ -89,7 +88,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testWelcometoMediaWikiUI(){
+    public function testWelcometoMediaWikiUI() {
 
         parent::navigateWelcometoMediaWikiPage();
 
@@ -103,7 +102,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testConnectToDatabaseUI(){
+    public function testConnectToDatabaseUI() {
 
         parent::navigateConnetToDatabasePage();
 
@@ -159,7 +158,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
 
 
 
-    public function testDatabaseSettingsUI(){
+    public function testDatabaseSettingsUI() {
 
         $databaseName = DB_NAME_PREFIX."_db_settings_UI";
         parent::navigateDatabaseSettingsPage( $databaseName );
@@ -245,7 +244,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
         $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" ));
     }
 
-    public function testNamePageUI(){
+    public function testNamePageUI() {
 
         $databaseName = DB_NAME_PREFIX."_name_UI";
         parent::navigateNamePage($databaseName);
@@ -330,7 +329,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
         $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" ));
 
         // Message displayed
-        $this->assertEquals( "You are almost done!You can now skip the remaining configuration and install the wiki right now.",
+        $this->assertEquals( "You are almost done! You can now skip the remaining configuration and install the wiki right now.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/div[2]" ));
 
         // 'Ask me more questions.' radio button available
@@ -352,8 +351,8 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    
-    public function testOptionPageUI(){
+
+    public function testOptionPageUI() {
 
         $databaseName = DB_NAME_PREFIX."_options_UI";
         parent::navigateOptionsPage($databaseName);
@@ -405,34 +404,40 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
 
 
 
-    public function testInstallPageUI(){
+    public function testInstallPageUI() {
 
         $databaseName = DB_NAME_PREFIX."_install_UI";
         parent::navigateInstallPage( $databaseName );
 
         // Verify installation done messages display
-        $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
-        $this->assertEquals( "Setting up database... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[1]" ));
-        $this->assertEquals( "Creating database user... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" ));
-        $this->assertEquals( "Creating tables... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]" ));
-        $this->assertEquals( "Populating default interwiki table... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[4]" ));
-        $this->assertEquals( "Generating secret key... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[5]" ));
-        $this->assertEquals( "Generating default upgrade key... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[6]" ));
-        $this->assertEquals( "Creating administrator user account... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[7]" ));
-        $this->assertEquals( "Creating main page with default content... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[8]" ));
+        $this->assertEquals( "Setting up database... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[1]" ));
+        $this->assertEquals( "Creating tables... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" ));
+        $this->assertEquals( "Creating database user... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]" ));
+        $this->assertEquals( "Populating default interwiki table... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[4]" ));
+        $this->assertEquals( "Generating secret key... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[5]" ));
+        $this->assertEquals( "Generating default upgrade key... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[6]" ));
+        $this->assertEquals( "Creating administrator user account... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[7]" ));
+        $this->assertEquals( "Creating main page with default content... done",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[8]" ));
     }
 
 
 
-    public function testCompletePageUI(){
+    public function testCompletePageUI() {
 
         $databaseName = DB_NAME_PREFIX."_complete_UI";
         parent::navigateCompletePage( $databaseName );
 
         // 'Congratulations!' text display
-        $this->assertEquals( "Congratulations!",
-                $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
-
+        $this->assertEquals("Congratulations!",
+                $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[1]/b"));
         // 'LocalSettings.php' generated message display
         $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.",
                 $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[2]" ));
@@ -446,12 +451,12 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
 
 
 
-    public function testRestartInstallation(){
-        
+    public function testRestartInstallation() {
+
         parent::navigateConnetToDatabasePage();
         $this->click( "link=Restart installation" );
         $this->waitForPageToLoad( PAGE_LOAD_TIME );
-        
+
         // Restart installation' label should be available.
         $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 
@@ -467,7 +472,7 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
 
 
 
-    public function testMediaWikiLogoAvailability(){
+    public function testMediaWikiLogoAvailability() {
 
         $databaseName = DB_NAME_PREFIX."_mediawiki_logo";
         parent::navigateInitialpage();
@@ -506,17 +511,29 @@ class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction
     }
 
 
-    public function testRightFramework(){
+    public function testRightFramework() {
 
         parent::navigateLanguagePage();
-        $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[1]/span" ));
-        $this->assertEquals( "Welcome to MediaWiki!", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[2]/span" ));
-        $this->assertEquals( "Connect to database", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[3]/span" ));
-        $this->assertEquals( "Upgrade existing installation", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[4]" ));
-        $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[5]/span" ));
-        $this->assertEquals( "Name", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[6]/span" ));
-        $this->assertEquals( "Options", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[7]/span" ));
-        $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[8]/span" ));
-        $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[9]/span" ));
+        // Verfy right framework texts display
+        $this->assertEquals( "Language",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[1]" ));
+        $this->assertEquals( "Existing wiki",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[2]" ));
+        $this->assertEquals( "Welcome to MediaWiki!",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[3]" ));
+        $this->assertEquals( "Connect to database",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[4]" ));
+        $this->assertEquals( "Upgrade existing installation",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[5]" ));
+        $this->assertEquals( "Database settings",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[6]" ));
+        $this->assertEquals( "Name",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[7]" ));
+        $this->assertEquals( "Options",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[8]" ));
+        $this->assertEquals( "Install",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[9]" ));
+        $this->assertEquals( "Complete!",
+                $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[10]/span" ));
     }
 }