Index: trunk/phase3/tests/installer/MediaWikiErrorsNamepageTestCase.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | * Version : MediaWiki 1.18alpha |
35 | 35 | */ |
36 | 36 | |
37 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 37 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
38 | 38 | |
39 | 39 | class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunction { |
40 | 40 | |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | } |
44 | 44 | |
45 | 45 | // Verify warning message for the 'Name' page |
46 | | - public function testErrorsNamePage(){ |
| 46 | + public function testErrorsNamePage() { |
47 | 47 | |
48 | 48 | $databaseName = DB_NAME_PREFIX."_error_name"; |
49 | 49 | |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | $this->click( "config__NamespaceType_other" ); |
75 | 75 | $this->type( "config_wgMetaNamespace", INVALID_NAMESPACE ); |
76 | 76 | parent::clickContinueButton(); |
77 | | - $this->assertEquals( "The specified namespace \"\" is invalid.Specify a different project namespace.", |
| 77 | + $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.", |
78 | 78 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
79 | 79 | |
80 | 80 | |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | $this->click( "config__NamespaceType_other" ); |
84 | 84 | $this->type( "config_wgMetaNamespace" , "" ); |
85 | 85 | parent::clickContinueButton(); |
86 | | - $this->assertEquals( "The specified namespace \"\" is invalid.Specify a different project namespace.", |
| 86 | + $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.", |
87 | 87 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
88 | 88 | |
89 | 89 | |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | $this->assertEquals( "Enter an administrator username.", |
105 | 105 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
106 | 106 | |
107 | | - |
| 107 | + $this->type( "config_wgSitename", VALID_WIKI_NAME ); |
108 | 108 | // Verify warning message for blank 'Password' |
109 | 109 | $this->type( "config__AdminName", VALID_YOUR_NAME ); |
110 | 110 | $this->type( "config__AdminPassword", " " ); |
Index: trunk/phase3/tests/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -38,21 +38,22 @@ |
39 | 39 | |
40 | 40 | class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallationCommonFunction { |
41 | 41 | |
42 | | - function setUp(){ |
| 42 | + function setUp() { |
43 | 43 | parent::setUp(); |
44 | 44 | } |
45 | 45 | |
46 | 46 | // Verify warning messages for the 'Connet to database' page |
47 | | - public function testErrorsConnectToDatabasePage(){ |
| 47 | + public function testErrorsConnectToDatabasePage() { |
48 | 48 | |
49 | 49 | parent::navigateConnetToDatabasePage(); |
50 | 50 | |
51 | 51 | // Verify warning mesage for invalid database host |
52 | 52 | $this->type( "mysql_wgDBserver", INVALID_DB_HOST ); |
53 | 53 | parent::clickContinueButton(); |
54 | | - $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.", |
55 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
56 | | - |
| 54 | + $this->assertEquals( "DB connection error: php_network_getaddresses: getaddrinfo failed: No such host is known. (".INVALID_DB_HOST.").", |
| 55 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" )); |
| 56 | + $this->assertEquals( "Check the host, username and password below and try again.", |
| 57 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" )); |
57 | 58 | // Verify warning message for the blank database host |
58 | 59 | $this->type( "mysql_wgDBserver", "" ); |
59 | 60 | parent::clickContinueButton(); |
— | — | @@ -65,8 +66,8 @@ |
66 | 67 | // Verify warning message for the invalid database name |
67 | 68 | $this->type( "mysql_wgDBname", INVALID_DB_NAME ); |
68 | 69 | parent::clickContinueButton(); |
69 | | - $this->assertEquals( "Invalid database name \"".INVALID_DB_NAME."\".Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", |
70 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 70 | + $this->assertEquals( "Invalid database name \"".INVALID_DB_NAME."\". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", |
| 71 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p" )); |
71 | 72 | |
72 | 73 | // Verify warning message for the blank database name |
73 | 74 | $this->type( "mysql_wgDBname", ""); |
— | — | @@ -80,7 +81,7 @@ |
81 | 82 | // Verify warning message for the invalid databaase prefix |
82 | 83 | $this->type( "mysql_wgDBprefix", INVALID_DB_PREFIX ); |
83 | 84 | parent::clickContinueButton(); |
84 | | - $this->assertEquals( "Invalid database prefix \"".INVALID_DB_PREFIX."\".Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", |
| 85 | + $this->assertEquals( "Invalid database prefix \"".INVALID_DB_PREFIX."\". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", |
85 | 86 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
86 | 87 | |
87 | 88 | // Valid Database prefix |
— | — | @@ -89,15 +90,18 @@ |
90 | 91 | // Verify warning message for the invalid database user name |
91 | 92 | $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME ); |
92 | 93 | parent::clickContinueButton(); |
93 | | - $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.", |
94 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 94 | + $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: NO) (localhost).", |
| 95 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" )); |
| 96 | + $this->assertEquals( "Check the host, username and password below and try again.", |
| 97 | + $this->getText("//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]")); |
95 | 98 | |
96 | | - |
97 | | - // Verify warning message for the invalid database user name |
| 99 | + // Verify warning message for the blank database user name |
98 | 100 | $this->type( "mysql__InstallUser", "" ); |
99 | 101 | parent::clickContinueButton(); |
100 | | - $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.", |
101 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 102 | + $this->assertEquals( "DB connection error: Access denied for user 'SYSTEM'@'localhost' (using password: NO) (localhost).", |
| 103 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" )); |
| 104 | + $this->assertEquals( "Check the host, username and password below and try again.", |
| 105 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" )); |
102 | 106 | |
103 | 107 | // Valid Database username |
104 | 108 | $this->type( "mysql__InstallUser", VALID_DB_USER_NAME ); |
— | — | @@ -105,15 +109,20 @@ |
106 | 110 | // Verify warning message for the invalid password |
107 | 111 | $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD ); |
108 | 112 | parent::clickContinueButton(); |
109 | | - $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.", |
110 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
111 | 113 | |
| 114 | + $this->assertEquals( "DB connection error: Access denied for user 'root'@'localhost' (using password: YES) (localhost).", |
| 115 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" )); |
| 116 | + $this->assertEquals( "Check the host, username and password below and try again.", |
| 117 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" )); |
| 118 | + |
112 | 119 | // Verify warning message for the invalid username and password |
113 | 120 | $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME ); |
114 | 121 | $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD ); |
115 | 122 | parent::clickContinueButton(); |
116 | | - $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.", |
117 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 123 | + $this->assertEquals( "DB connection error: Access denied for user '".INVALID_DB_USER_NAME."'@'localhost' (using password: YES) (localhost).", |
| 124 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[1]" )); |
| 125 | + $this->assertEquals( "Check the host, username and password below and try again.", |
| 126 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]/p[2]" )); |
118 | 127 | |
119 | 128 | // Valid username and valid password |
120 | 129 | $this->type( "mysql__InstallUser", VALID_DB_USER_NAME ); |
Index: trunk/phase3/tests/installer/MediaWikiInstallerTestSuite.php |
— | — | @@ -30,19 +30,20 @@ |
31 | 31 | require_once 'PHPUnit/Framework.php'; |
32 | 32 | require_once 'PHPUnit/Framework/TestSuite.php'; |
33 | 33 | |
34 | | -require_once 'MediaWikiUserInterfaceTestCase.php'; |
35 | | -require_once 'MediaWikiButtonsAvailabilityTestCase.php'; |
36 | | -require_once 'MediaWikiHelpFieldHintTestCase.php'; |
37 | | -require_once 'MediaWikiRightFrameworkLinksTestCase.php'; |
38 | | -require_once 'MediaWikiRestartInstallationTestCase.php'; |
39 | | -require_once 'MediaWikiErrorsConnectToDatabasePageTestCase.php'; |
40 | | -require_once 'MediaWikiErrorsNamepageTestCase.php'; |
41 | | -require_once 'MediaWikiMySQLDataBaseTestCase.php'; |
42 | | -require_once 'MediaWikiMySQLiteDataBaseTestCase.php'; |
43 | | -require_once 'MediaWikiUpgradeExistingDatabaseTestCase.php'; |
44 | | -require_once 'MediaWikiDifferntDatabasePrefixTestCase.php'; |
45 | | -require_once 'MediaWikiDifferentDatabaseAccountTestCase.php'; |
| 34 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiUserInterfaceTestCase.php'); |
| 35 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiButtonsAvailabilityTestCase.php'); |
| 36 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiHelpFieldHintTestCase.php'); |
| 37 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiRightFrameworkLinksTestCase.php'); |
| 38 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiRestartInstallationTestCase.php'); |
| 39 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiErrorsConnectToDatabasePageTestCase.php'); |
| 40 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiErrorsNamepageTestCase.php'); |
| 41 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiMySQLDataBaseTestCase.php'); |
| 42 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiMySQLiteDataBaseTestCase.php'); |
| 43 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiUpgradeExistingDatabaseTestCase.php'); |
| 44 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiDifferntDatabasePrefixTestCase.php'); |
| 45 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiDifferentDatabaseAccountTestCase.php'); |
46 | 46 | |
| 47 | + |
47 | 48 | $suite = new PHPUnit_Framework_TestSuite('ArrayTest'); |
48 | 49 | $result = new PHPUnit_Framework_TestResult; |
49 | 50 | |
Index: trunk/phase3/tests/installer/MediaWikiOnAlreadyInstalledTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | |
35 | 35 | /* |
— | — | @@ -64,10 +64,7 @@ |
65 | 65 | |
66 | 66 | // Complete page |
67 | 67 | parent::clickContinueButton(); |
68 | | - |
69 | | - // Clicking in the 'Continue' button should display the 'Complete' page with 'Congratulations!' text. |
70 | | - $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
71 | | - $this->assertEquals( "Congratulations!", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
| 68 | + parent::completePageSuccessfull(); |
72 | 69 | $this->chooseCancelOnNextConfirmation(); |
73 | 70 | parent::restartInstallation(); |
74 | 71 | } |
Index: trunk/phase3/tests/installer/MediaWikiHelpFieldHintTestCase.php |
— | — | @@ -33,17 +33,17 @@ |
34 | 34 | * Version : MediaWiki 1.18alpha |
35 | 35 | */ |
36 | 36 | |
37 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 37 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
38 | 38 | |
39 | 39 | class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction { |
40 | 40 | |
41 | | - function setUp(){ |
| 41 | + function setUp() { |
42 | 42 | parent::setUp(); |
43 | 43 | } |
44 | 44 | |
45 | 45 | |
46 | 46 | // Verify help field availability for the fields |
47 | | - public function testMySQLConnectToDatabaseFieldHint(){ |
| 47 | + public function testMySQLConnectToDatabaseFieldHint() { |
48 | 48 | |
49 | 49 | parent::navigateConnetToDatabasePage(); |
50 | 50 | |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | } |
77 | 77 | |
78 | 78 | |
79 | | - public function testSQLiteConnectToDatabaseFieldHint(){ |
| 79 | + public function testSQLiteConnectToDatabaseFieldHint() { |
80 | 80 | |
81 | 81 | parent::navigateConnetToDatabasePage(); |
82 | 82 | $this->click( "DBType_sqlite" ); |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | } |
93 | 93 | |
94 | 94 | |
95 | | - public function testDatabaseSettingsFieldHint(){ |
| 95 | + public function testDatabaseSettingsFieldHint() { |
96 | 96 | |
97 | 97 | $databaseName = DB_NAME_PREFIX."_db_field"; |
98 | 98 | parent::navigateDatabaseSettingsPage($databaseName); |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | } |
111 | 111 | |
112 | 112 | |
113 | | - public function testNameFieldHint(){ |
| 113 | + public function testNameFieldHint() { |
114 | 114 | |
115 | 115 | $databaseName = DB_NAME_PREFIX."_name_field"; |
116 | 116 | parent::navigateNamePage( $databaseName ); |
Index: trunk/phase3/tests/installer/MediaWikiInstallationCommonFunction.php |
— | — | @@ -27,38 +27,41 @@ |
28 | 28 | */ |
29 | 29 | |
30 | 30 | require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; |
31 | | -include 'MediaWikiInstallationConfig.php'; |
| 31 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationConfig.php'); |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationMessage.php'); |
| 33 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationVariables.php'); |
32 | 34 | |
| 35 | + |
33 | 36 | class MediaWikiInstallationCommonFunction extends PHPUnit_Extensions_SeleniumTestCase { |
34 | 37 | |
35 | 38 | function setUp() { |
36 | | - $this->setBrowser("*chrome"); |
37 | | - $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/"); |
| 39 | + $this->setBrowser( TEST_BROWSER ); |
| 40 | + $this->setBrowserUrl("http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/"); |
38 | 41 | } |
39 | 42 | |
40 | | - |
41 | | - public function navigateInitialpage(){ |
42 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/" ); |
| 43 | + |
| 44 | + public function navigateInitialpage() { |
| 45 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/" ); |
43 | 46 | } |
44 | 47 | |
45 | 48 | |
46 | 49 | // Navigate to the 'Language' page |
47 | | - public function navigateLanguagePage(){ |
48 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 50 | + public function navigateLanguagePage() { |
| 51 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
49 | 52 | } |
50 | 53 | |
51 | 54 | |
52 | 55 | // Navigate to the 'Welcome to MediaWiki' page |
53 | | - public function navigateWelcometoMediaWikiPage(){ |
54 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 56 | + public function navigateWelcometoMediaWikiPage() { |
| 57 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
55 | 58 | $this->click( "submit-continue "); |
56 | 59 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
57 | 60 | } |
58 | 61 | |
59 | 62 | |
60 | 63 | // Navigate yo 'Connect to Database' page |
61 | | - public function navigateConnetToDatabasePage(){ |
62 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 64 | + public function navigateConnetToDatabasePage() { |
| 65 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
63 | 66 | |
64 | 67 | // 'Welcome to MediaWiki!' page |
65 | 68 | $this->click( "submit-continue" ); |
— | — | @@ -71,9 +74,9 @@ |
72 | 75 | |
73 | 76 | |
74 | 77 | // Navigate to the 'Database Settings' page |
75 | | - public function navigateDatabaseSettingsPage( $databaseName ){ |
| 78 | + public function navigateDatabaseSettingsPage( $databaseName ) { |
76 | 79 | |
77 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 80 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
78 | 81 | |
79 | 82 | // 'Welcome to MediaWiki!' page |
80 | 83 | $this->click("submit-continue"); |
— | — | @@ -90,8 +93,8 @@ |
91 | 94 | |
92 | 95 | |
93 | 96 | // Navigate to the 'Name' page |
94 | | - public function navigateNamePage( $databaseName ){ |
95 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 97 | + public function navigateNamePage( $databaseName ) { |
| 98 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
96 | 99 | |
97 | 100 | // 'Welcome to MediaWiki!' page |
98 | 101 | $this->click( "submit-continue" ); |
— | — | @@ -112,10 +115,9 @@ |
113 | 116 | |
114 | 117 | |
115 | 118 | // Navigate 'Options' page |
116 | | - public function navigateOptionsPage( $databaseName ){ |
| 119 | + public function navigateOptionsPage( $databaseName ) { |
117 | 120 | |
118 | | - $upgradeExisting = false; |
119 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 121 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
120 | 122 | |
121 | 123 | // 'Welcome to MediaWiki!' page |
122 | 124 | $this->click( "submit-continue" ); |
— | — | @@ -146,10 +148,10 @@ |
147 | 149 | |
148 | 150 | |
149 | 151 | // Navigate 'Install' page |
150 | | - public function navigateInstallPage( $databaseName ){ |
151 | | - |
152 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 152 | + public function navigateInstallPage( $databaseName ) { |
153 | 153 | |
| 154 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 155 | + |
154 | 156 | // 'Welcome to MediaWiki!' page |
155 | 157 | $this->click( "submit-continue" ); |
156 | 158 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
— | — | @@ -183,8 +185,8 @@ |
184 | 186 | |
185 | 187 | |
186 | 188 | // Navigate to 'Complete' page |
187 | | - public function navigateCompletePage( $databaseName ){ |
188 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 189 | + public function navigateCompletePage( $databaseName ) { |
| 190 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
189 | 191 | |
190 | 192 | // 'Welcome to MediaWiki!' page |
191 | 193 | $this->click( "submit-continue" ); |
— | — | @@ -224,7 +226,7 @@ |
225 | 227 | |
226 | 228 | |
227 | 229 | // Complete the Name page fields |
228 | | - public function completeNamePage(){ |
| 230 | + public function completeNamePage() { |
229 | 231 | $this->type( "config_wgSitename", NAME_OF_WIKI ); |
230 | 232 | $this->type( "config__AdminName", ADMIN_USER_NAME); |
231 | 233 | $this->type( "config__AdminPassword", ADMIN_PASSWORD ); |
— | — | @@ -236,21 +238,21 @@ |
237 | 239 | |
238 | 240 | |
239 | 241 | // Clicking on the 'Continue' button in any MediaWiki page |
240 | | - public function clickContinueButton(){ |
| 242 | + public function clickContinueButton() { |
241 | 243 | $this->click( "submit-continue" ); |
242 | 244 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
243 | 245 | } |
244 | 246 | |
245 | 247 | |
246 | 248 | // Clicking on the 'Back' button in any MediaWiki page |
247 | | - public function clickBackButton(){ |
| 249 | + public function clickBackButton() { |
248 | 250 | $this->click( "submit-back" ); |
249 | 251 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
250 | 252 | } |
251 | 253 | |
252 | 254 | |
253 | 255 | // Restarting the installation |
254 | | - public function restartInstallation(){ |
| 256 | + public function restartInstallation() { |
255 | 257 | $this->click( "link=Restart installation" ); |
256 | 258 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
257 | 259 | $this->click( "submit-restart" ); |
— | — | @@ -259,13 +261,23 @@ |
260 | 262 | |
261 | 263 | |
262 | 264 | // Verify 'MediaWiki' logo available in the initial screen |
263 | | - public function mediaWikiLogoPresentInitialScreen(){ |
264 | | - $this->assertTrue($this->isElementPresent("//img[@alt='The MediaWiki logo']")); |
| 265 | + public function mediaWikiLogoPresentInitialScreen() { |
| 266 | + $this->assertTrue( $this->isElementPresent( "//img[@alt='The MediaWiki logo']" )); |
265 | 267 | } |
266 | 268 | |
267 | 269 | |
268 | 270 | // Verify 'MediaWiki' logo available |
269 | | - public function mediaWikiLogoPresent(){ |
270 | | - $this->assertTrue($this->isElementPresent("//div[@id='p-logo']/a")); |
| 271 | + public function mediaWikiLogoPresent() { |
| 272 | + $this->assertTrue( $this->isElementPresent( "//div[@id='p-logo']/a" )); |
271 | 273 | } |
| 274 | + |
| 275 | + |
| 276 | + public function completePageSuccessfull() { |
| 277 | + $this->assertEquals( "Complete!", |
| 278 | + $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 279 | + |
| 280 | + // 'Congratulations!' text should be available in the 'Complete!' page. |
| 281 | + $this->assertEquals( "Congratulations!", |
| 282 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[1]/b" )); |
| 283 | + } |
272 | 284 | } |
Index: trunk/phase3/tests/installer/MediaWikiUpgradeExistingDatabaseTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 05 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -39,19 +39,19 @@ |
40 | 40 | |
41 | 41 | class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationCommonFunction { |
42 | 42 | |
43 | | - function setUp(){ |
| 43 | + function setUp() { |
44 | 44 | parent::setUp(); |
45 | 45 | } |
46 | 46 | |
47 | 47 | // Install Mediawiki using 'MySQL' database type. |
48 | | - public function testUpgradeExistingDatabase(){ |
| 48 | + public function testUpgradeExistingDatabase() { |
49 | 49 | |
50 | 50 | $databaseName = DB_NAME_PREFIX."_upgrade_existing"; |
51 | 51 | parent::navigateInstallPage( $databaseName ); |
52 | 52 | |
53 | 53 | $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
54 | 54 | $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
55 | | - $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.", |
| 55 | + $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
56 | 56 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
57 | 57 | |
58 | 58 | // 'Optionis' page |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $this->assertEquals( "Upgrade existing installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
74 | 74 | |
75 | 75 | // Warning message displayed. |
76 | | - $this->assertEquals( "There are MediaWiki tables in this database.To upgrade them to MediaWiki 1.18alpha, click Continue.", |
| 76 | + $this->assertEquals( "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.18alpha, click Continue.", |
77 | 77 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
78 | 78 | |
79 | 79 | parent::clickContinueButton(); |
— | — | @@ -80,8 +80,10 @@ |
81 | 81 | $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
82 | 82 | |
83 | 83 | // 'Upgrade complete.' text display |
84 | | - $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.", |
85 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]")); |
| 84 | + $this->assertEquals("Upgrade complete.", |
| 85 | + $this->getText("//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]/p[1]")); |
| 86 | + $this->assertEquals("You can now start using your wiki.", |
| 87 | + $this->getText("//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]/p[2]")); |
86 | 88 | |
87 | 89 | $this->assertTrue($this->isElementPresent( "submit-regenerate" )); |
88 | 90 | $this->click( "submit-regenerate" ); |
— | — | @@ -99,14 +101,12 @@ |
100 | 102 | parent::clickContinueButton(); |
101 | 103 | |
102 | 104 | // Install page |
103 | | - $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.", |
| 105 | + $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
104 | 106 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
105 | 107 | parent::clickContinueButton(); |
106 | 108 | |
107 | 109 | // complete |
108 | | - $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
109 | | - $this->assertEquals( "Congratulations!", |
110 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
| 110 | + parent::completePageSuccessfull(); |
111 | 111 | $this->chooseCancelOnNextConfirmation(); |
112 | 112 | parent::restartInstallation(); |
113 | 113 | } |
Index: trunk/phase3/tests/installer/MediaWikiButtonsAvailabilityTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | * Version : MediaWiki 1.18alpha |
38 | 38 | */ |
39 | 39 | |
| 40 | + |
40 | 41 | class MediaWikiButtonsAvailabilityTestCase extends MediaWikiInstallationCommonFunction { |
41 | 42 | |
42 | 43 | function setUp() { |
Index: trunk/phase3/tests/installer/MediaWikiMySQLDataBaseTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 01 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -38,12 +38,12 @@ |
39 | 39 | |
40 | 40 | class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction { |
41 | 41 | |
42 | | - function setUp(){ |
| 42 | + function setUp() { |
43 | 43 | parent::setUp(); |
44 | 44 | } |
45 | 45 | |
46 | 46 | // Verify MediaWiki installation using 'MySQL' database type |
47 | | - public function testMySQLDatabaseSuccess(){ |
| 47 | + public function testMySQLDatabaseSuccess() { |
48 | 48 | |
49 | 49 | $databaseName = DB_NAME_PREFIX."_sql_db"; |
50 | 50 | |
— | — | @@ -72,12 +72,7 @@ |
73 | 73 | parent::clickContinueButton(); |
74 | 74 | |
75 | 75 | // 'Complete' page |
76 | | - $this->assertEquals( "Complete!", |
77 | | - $this->getText("//div[@id='bodyContent']/div/div/h2" )); |
78 | | - |
79 | | - // 'Congratulations!' text should be available in the 'Complete!' page. |
80 | | - $this->assertEquals( "Congratulations!", |
81 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
| 76 | + parent::completePageSuccessfull(); |
82 | 77 | parent::restartInstallation(); |
83 | 78 | } |
84 | 79 | } |
Index: trunk/phase3/tests/installer/MediaWikiInstallationConfig.php |
— | — | @@ -33,79 +33,17 @@ |
34 | 34 | * with current value of the 'DB_NAME_PREFIX'. |
35 | 35 | * If you wish to run the suite more than one time, you need to change |
36 | 36 | * the value of the 'DB_NAME_PREFIX'. |
37 | | - */ |
38 | | -define('DB_NAME_PREFIX', "database_name_d" ); |
| 37 | +*/ |
| 38 | +define('DB_NAME_PREFIX', "database_name" ); |
| 39 | +define('DIRECTORY_NAME', "mediawiki" ); |
| 40 | +define ('PORT', "8080" ); |
| 41 | +define( 'HOST_NAME', "localhost" ); |
39 | 42 | |
40 | | -// Directory name should be change |
41 | | -define('DIRECTORY_NAME', "installertesting"); |
42 | | - |
43 | | - |
44 | | -// Port should be change |
45 | | -define ('PORT', "8080"); |
46 | | - |
47 | | -// Common variables |
48 | | -define('PAGE_LOAD_TIME', "80000" ); |
49 | | - |
50 | | - |
51 | | -// 'MySQL' database type help field hint |
52 | | -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."); |
53 | | -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."); |
54 | | -define('MYSQL_DATABASE_TABLE_PREFIX_HELP', "Choose a name that identifies your wiki. It should not contain spaces or hyphens."); |
55 | | -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."); |
56 | | -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."); |
57 | | - |
58 | | -// 'SQLite' database type help field hint |
59 | | -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."); |
60 | | -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."); |
61 | | - |
62 | | -// 'Database settings' page hel0p field hint |
63 | | -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."); |
64 | | -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."); |
65 | | - |
66 | | -// 'Name' page help field hint |
67 | | -define('NAME_OF_WIKI_HELP', "This will appear in the title bar of the browser and in various other places."); |
68 | | -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 \":\"."); |
69 | | -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."); |
70 | | -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."); |
71 | | -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."); |
72 | | - |
73 | | - |
74 | | -// 'Name' page input values |
75 | | -define( 'NAME_OF_WIKI', "Site Name"); |
76 | | -define( 'ADMIN_USER_NAME', "My Name" ); |
77 | | -define( 'ADMIN_PASSWORD', "12345" ); |
78 | | -define ( 'ADMIN_RETYPE_PASSWORD', "12345" ); |
79 | | -define ( 'ADMIN_EMAIL_ADDRESS', "nadeesha@calcey.com" ); |
80 | | - |
81 | | - |
82 | | -// 'Name' page input values for warning messages |
83 | | -define( 'VALID_WIKI_NAME', "MyWiki" ); |
84 | | -define( 'VALID_YOUR_NAME', "Nadeesha Weerasinghe" ); |
85 | | -define( 'VALID_PASSWORD', "12345" ); |
86 | | -define( 'VALID_PASSWORD_AGAIN', "12345" ); |
87 | | -define( 'INVALID_PASSWORD_AGAIN', "123" ); |
88 | | -define( 'VALID_NAMESPACE', "Mynamespace" ); |
89 | | -define( 'INVALID_NAMESPACE', "##..##" ); |
90 | | - |
91 | | - |
92 | | -// 'Database settings' page input values |
93 | | -define( 'DB_WEB_USER', "different" ); |
94 | | -define('DB_WEB_USER_PASSWORD', "12345" ); |
95 | | - |
96 | | - |
97 | | -// 'Connet to database' page input values |
98 | | -define( 'DATABASE_PREFIX',"databaseprefix" ); |
99 | | - |
100 | | - |
101 | | -// 'Connet to database' page input values for warning messages |
102 | | -define( 'VALID_DB_HOST', "localhost" ); |
103 | | -define( 'INVALID_DB_HOST', "local" ); |
104 | | -define( 'INVALID_DB_NAME', "my-wiki" ); |
105 | | -define ( 'VALID_DB_NAME', "my_wiki1"); |
106 | | -define( 'INVALID_DB_PREFIX', "database prefix" ); |
107 | | -define( 'VALID_DB_PREFIX', "database_prefix"); |
108 | | -define( 'INVALID_DB_USER_NAME', "roots" ); |
109 | | -define( 'VALID_DB_USER_NAME', "root"); |
110 | | -define( 'INVALID_DB_PASSWORD', "12345" ); |
111 | | - |
112 | | - |
| 43 | +/* |
| 44 | + * Use the followings to run the test suite in different browsers. |
| 45 | + * Firefox : *firefox |
| 46 | + * IE : *iexplore |
| 47 | + * Google chrome : *googlechrome |
| 48 | + * Opera : *opera |
| 49 | +*/ |
| 50 | +define ( 'TEST_BROWSER', "*firefox" ); |
Index: trunk/phase3/tests/installer/MediaWikiMySQLiteDataBaseTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 06 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | |
54 | 54 | // Select 'SQLite' database type |
55 | 55 | $this->assertEquals( "SQLite settings", $this->getText( "//div[@id='DB_wrapper_sqlite']/h3" )); |
56 | | - |
| 56 | + |
57 | 57 | // Change database name |
58 | 58 | $defaultDbName = $this->getText( "sqlite_wgDBname" ); |
59 | 59 | $this->type( "sqlite_wgDBname", " "); |
— | — | @@ -73,12 +73,7 @@ |
74 | 74 | parent::clickContinueButton(); |
75 | 75 | |
76 | 76 | // 'Complete' page |
77 | | - $this->assertEquals( "Complete!", |
78 | | - $this->getText("//div[@id='bodyContent']/div/div/h2" )); |
79 | | - |
80 | | - // 'Congratulations!' text should be available in the 'Complete!' page. |
81 | | - $this->assertEquals( "Congratulations!", |
82 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
| 77 | + parent::completePageSuccessfull(); |
83 | 78 | parent::restartInstallation(); |
84 | 79 | } |
85 | 80 | } |
Index: trunk/phase3/tests/installer/MediaWikiRightFrameworkLinksTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -40,16 +40,16 @@ |
41 | 41 | */ |
42 | 42 | |
43 | 43 | |
44 | | -class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction{ |
| 44 | +class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction { |
45 | 45 | |
46 | | - function setUp(){ |
| 46 | + function setUp() { |
47 | 47 | parent::setUp(); |
48 | 48 | } |
49 | 49 | |
50 | | - public function testLinksAvailability(){ |
51 | | - |
52 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 50 | + public function testLinksAvailability() { |
53 | 51 | |
| 52 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 53 | + |
54 | 54 | // Verify 'Read me' link availability |
55 | 55 | $this->assertTrue($this->isElementPresent( "link=Read me" )); |
56 | 56 | |
— | — | @@ -60,9 +60,9 @@ |
61 | 61 | $this->assertTrue($this->isElementPresent( "link=Copying" )); |
62 | 62 | } |
63 | 63 | |
64 | | - public function testPageNavigation(){ |
| 64 | + public function testPageNavigation() { |
65 | 65 | |
66 | | - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
| 66 | + $this->open( "http://".HOST_NAME.":".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
67 | 67 | |
68 | 68 | // Navigate to the 'Read me' page |
69 | 69 | $this->click( "link=Read me" ); |
Index: trunk/phase3/tests/installer/MediaWikiUserInterfaceTestCase.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * |
29 | 29 | */ |
30 | 30 | |
31 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 31 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
32 | 32 | |
33 | 33 | /* |
34 | 34 | * Test Case ID : 18 - 27 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -40,13 +40,12 @@ |
41 | 41 | class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction { |
42 | 42 | |
43 | 43 | function setUp() { |
44 | | - $this->setBrowser("*chrome"); |
45 | | - $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/"); |
| 44 | + parent::setUp(); |
46 | 45 | } |
47 | 46 | |
48 | | - |
49 | | - public function testInitialPageUI(){ |
50 | 47 | |
| 48 | + public function testInitialPageUI() { |
| 49 | + |
51 | 50 | parent::navigateInitialpage(); |
52 | 51 | |
53 | 52 | // MediaWiki logo available |
— | — | @@ -66,7 +65,7 @@ |
67 | 66 | } |
68 | 67 | |
69 | 68 | |
70 | | - public function testlanguagePageUI(){ |
| 69 | + public function testlanguagePageUI() { |
71 | 70 | |
72 | 71 | parent::navigateLanguagePage(); |
73 | 72 | |
— | — | @@ -89,7 +88,7 @@ |
90 | 89 | } |
91 | 90 | |
92 | 91 | |
93 | | - public function testWelcometoMediaWikiUI(){ |
| 92 | + public function testWelcometoMediaWikiUI() { |
94 | 93 | |
95 | 94 | parent::navigateWelcometoMediaWikiPage(); |
96 | 95 | |
— | — | @@ -103,7 +102,7 @@ |
104 | 103 | } |
105 | 104 | |
106 | 105 | |
107 | | - public function testConnectToDatabaseUI(){ |
| 106 | + public function testConnectToDatabaseUI() { |
108 | 107 | |
109 | 108 | parent::navigateConnetToDatabasePage(); |
110 | 109 | |
— | — | @@ -159,7 +158,7 @@ |
160 | 159 | |
161 | 160 | |
162 | 161 | |
163 | | - public function testDatabaseSettingsUI(){ |
| 162 | + public function testDatabaseSettingsUI() { |
164 | 163 | |
165 | 164 | $databaseName = DB_NAME_PREFIX."_db_settings_UI"; |
166 | 165 | parent::navigateDatabaseSettingsPage( $databaseName ); |
— | — | @@ -245,7 +244,7 @@ |
246 | 245 | $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" )); |
247 | 246 | } |
248 | 247 | |
249 | | - public function testNamePageUI(){ |
| 248 | + public function testNamePageUI() { |
250 | 249 | |
251 | 250 | $databaseName = DB_NAME_PREFIX."_name_UI"; |
252 | 251 | parent::navigateNamePage($databaseName); |
— | — | @@ -330,7 +329,7 @@ |
331 | 330 | $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" )); |
332 | 331 | |
333 | 332 | // Message displayed |
334 | | - $this->assertEquals( "You are almost done!You can now skip the remaining configuration and install the wiki right now.", |
| 333 | + $this->assertEquals( "You are almost done! You can now skip the remaining configuration and install the wiki right now.", |
335 | 334 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/div[2]" )); |
336 | 335 | |
337 | 336 | // 'Ask me more questions.' radio button available |
— | — | @@ -352,9 +351,9 @@ |
353 | 352 | } |
354 | 353 | |
355 | 354 | |
356 | | - |
357 | | - public function testOptionPageUI(){ |
358 | 355 | |
| 356 | + public function testOptionPageUI() { |
| 357 | + |
359 | 358 | $databaseName = DB_NAME_PREFIX."_options_UI"; |
360 | 359 | parent::navigateOptionsPage($databaseName); |
361 | 360 | |
— | — | @@ -405,34 +404,40 @@ |
406 | 405 | |
407 | 406 | |
408 | 407 | |
409 | | - public function testInstallPageUI(){ |
| 408 | + public function testInstallPageUI() { |
410 | 409 | |
411 | 410 | $databaseName = DB_NAME_PREFIX."_install_UI"; |
412 | 411 | parent::navigateInstallPage( $databaseName ); |
413 | 412 | |
414 | 413 | // Verify installation done messages display |
415 | | - $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
416 | | - $this->assertEquals( "Setting up database... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[1]" )); |
417 | | - $this->assertEquals( "Creating database user... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" )); |
418 | | - $this->assertEquals( "Creating tables... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]" )); |
419 | | - $this->assertEquals( "Populating default interwiki table... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[4]" )); |
420 | | - $this->assertEquals( "Generating secret key... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[5]" )); |
421 | | - $this->assertEquals( "Generating default upgrade key... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[6]" )); |
422 | | - $this->assertEquals( "Creating administrator user account... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[7]" )); |
423 | | - $this->assertEquals( "Creating main page with default content... done", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[8]" )); |
| 414 | + $this->assertEquals( "Setting up database... done", |
| 415 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[1]" )); |
| 416 | + $this->assertEquals( "Creating tables... done", |
| 417 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" )); |
| 418 | + $this->assertEquals( "Creating database user... done", |
| 419 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]" )); |
| 420 | + $this->assertEquals( "Populating default interwiki table... done", |
| 421 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[4]" )); |
| 422 | + $this->assertEquals( "Generating secret key... done", |
| 423 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[5]" )); |
| 424 | + $this->assertEquals( "Generating default upgrade key... done", |
| 425 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[6]" )); |
| 426 | + $this->assertEquals( "Creating administrator user account... done", |
| 427 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[7]" )); |
| 428 | + $this->assertEquals( "Creating main page with default content... done", |
| 429 | + $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[8]" )); |
424 | 430 | } |
425 | 431 | |
426 | 432 | |
427 | 433 | |
428 | | - public function testCompletePageUI(){ |
| 434 | + public function testCompletePageUI() { |
429 | 435 | |
430 | 436 | $databaseName = DB_NAME_PREFIX."_complete_UI"; |
431 | 437 | parent::navigateCompletePage( $databaseName ); |
432 | 438 | |
433 | 439 | // 'Congratulations!' text display |
434 | | - $this->assertEquals( "Congratulations!", |
435 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
436 | | - |
| 440 | + $this->assertEquals("Congratulations!", |
| 441 | + $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[1]/b")); |
437 | 442 | // 'LocalSettings.php' generated message display |
438 | 443 | $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.", |
439 | 444 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[2]" )); |
— | — | @@ -446,12 +451,12 @@ |
447 | 452 | |
448 | 453 | |
449 | 454 | |
450 | | - public function testRestartInstallation(){ |
451 | | - |
| 455 | + public function testRestartInstallation() { |
| 456 | + |
452 | 457 | parent::navigateConnetToDatabasePage(); |
453 | 458 | $this->click( "link=Restart installation" ); |
454 | 459 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
455 | | - |
| 460 | + |
456 | 461 | // Restart installation' label should be available. |
457 | 462 | $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
458 | 463 | |
— | — | @@ -467,7 +472,7 @@ |
468 | 473 | |
469 | 474 | |
470 | 475 | |
471 | | - public function testMediaWikiLogoAvailability(){ |
| 476 | + public function testMediaWikiLogoAvailability() { |
472 | 477 | |
473 | 478 | $databaseName = DB_NAME_PREFIX."_mediawiki_logo"; |
474 | 479 | parent::navigateInitialpage(); |
— | — | @@ -506,17 +511,29 @@ |
507 | 512 | } |
508 | 513 | |
509 | 514 | |
510 | | - public function testRightFramework(){ |
| 515 | + public function testRightFramework() { |
511 | 516 | |
512 | 517 | parent::navigateLanguagePage(); |
513 | | - $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[1]/span" )); |
514 | | - $this->assertEquals( "Welcome to MediaWiki!", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[2]/span" )); |
515 | | - $this->assertEquals( "Connect to database", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[3]/span" )); |
516 | | - $this->assertEquals( "Upgrade existing installation", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[4]" )); |
517 | | - $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[5]/span" )); |
518 | | - $this->assertEquals( "Name", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[6]/span" )); |
519 | | - $this->assertEquals( "Options", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[7]/span" )); |
520 | | - $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[8]/span" )); |
521 | | - $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[9]/span" )); |
| 518 | + // Verfy right framework texts display |
| 519 | + $this->assertEquals( "Language", |
| 520 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[1]" )); |
| 521 | + $this->assertEquals( "Existing wiki", |
| 522 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[2]" )); |
| 523 | + $this->assertEquals( "Welcome to MediaWiki!", |
| 524 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[3]" )); |
| 525 | + $this->assertEquals( "Connect to database", |
| 526 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[4]" )); |
| 527 | + $this->assertEquals( "Upgrade existing installation", |
| 528 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[5]" )); |
| 529 | + $this->assertEquals( "Database settings", |
| 530 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[6]" )); |
| 531 | + $this->assertEquals( "Name", |
| 532 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[7]" )); |
| 533 | + $this->assertEquals( "Options", |
| 534 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[8]" )); |
| 535 | + $this->assertEquals( "Install", |
| 536 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[9]" )); |
| 537 | + $this->assertEquals( "Complete!", |
| 538 | + $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[10]/span" )); |
522 | 539 | } |
523 | 540 | } |
Index: trunk/phase3/tests/installer/MediaWikiDifferntDatabasePrefixTestCase.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * |
29 | 29 | */ |
30 | 30 | |
31 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 31 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
32 | 32 | |
33 | 33 | /* |
34 | 34 | * Test Case ID : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -38,16 +38,16 @@ |
39 | 39 | |
40 | 40 | class MediaWikiDifferntDatabasePrefixTestCase extends MediaWikiInstallationCommonFunction { |
41 | 41 | |
42 | | - function setUp(){ |
| 42 | + function setUp() { |
43 | 43 | parent::setUp(); |
44 | 44 | } |
45 | 45 | |
46 | 46 | // Install Mediawiki using 'MySQL' database type. |
47 | | - public function testDifferentDatabasePrefix(){ |
| 47 | + public function testDifferentDatabasePrefix() { |
48 | 48 | |
49 | 49 | $databaseName = DB_NAME_PREFIX."_db_prefix"; |
50 | 50 | parent::navigateInstallPage( $databaseName ); |
51 | | - |
| 51 | + |
52 | 52 | // To 'Options' page |
53 | 53 | parent::clickBackButton(); |
54 | 54 | |
— | — | @@ -84,9 +84,11 @@ |
85 | 85 | // Verify already installed warning message |
86 | 86 | $this->assertEquals( "Install", |
87 | 87 | $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
88 | | - $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again.Please proceed to the next page.", |
| 88 | + $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
89 | 89 | $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]" )); |
| 90 | + |
90 | 91 | parent::clickContinueButton(); |
| 92 | + parent::completePageSuccessfull(); |
91 | 93 | $this->chooseCancelOnNextConfirmation(); |
92 | 94 | parent::restartInstallation(); |
93 | 95 | } |
Index: trunk/phase3/tests/installer/MediaWikiRestartInstallationTestCase.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 33 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
34 | 34 | |
35 | 35 | /* |
36 | 36 | * Test Case ID : 11, 12 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | |
84 | 84 | |
85 | 85 | // Verify cancelling restart |
86 | | - public function testCancelRestartInstallation(){ |
| 86 | + public function testCancelRestartInstallation() { |
87 | 87 | |
88 | 88 | $dbNameBeforeRestart = DB_NAME_PREFIX."_cancel_restart"; |
89 | 89 | |
— | — | @@ -103,7 +103,8 @@ |
104 | 104 | parent::clickBackButton(); |
105 | 105 | |
106 | 106 | // Navigates to the previous page |
107 | | - $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));; |
| 107 | + $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 108 | + ; |
108 | 109 | |
109 | 110 | // 'Connect to database' page |
110 | 111 | parent::clickBackButton(); |
Index: trunk/phase3/tests/installer/MediaWikiDifferentDatabaseAccountTestCase.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | */ |
30 | 30 | |
31 | 31 | |
32 | | -require_once 'MediaWikiInstallationCommonFunction.php'; |
| 32 | +require_once( str_replace('//','/',dirname(__FILE__).'/') .'MediaWikiInstallationCommonFunction.php'); |
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Test Case ID : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan) |
— | — | @@ -38,13 +38,13 @@ |
39 | 39 | |
40 | 40 | class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCommonFunction { |
41 | 41 | |
42 | | - function setUp(){ |
| 42 | + function setUp() { |
43 | 43 | parent::setUp(); |
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | 47 | // Install Mediawiki using 'MySQL' database type. |
48 | | - public function testDifferentDatabaseAccount(){ |
| 48 | + public function testDifferentDatabaseAccount() { |
49 | 49 | |
50 | 50 | $databaseName = DB_NAME_PREFIX."_dif_accounts"; |
51 | 51 | |
— | — | @@ -71,14 +71,12 @@ |
72 | 72 | parent::clickContinueButton(); |
73 | 73 | |
74 | 74 | // 'Install' page |
75 | | - $this->assertEquals( "Creating database user... done", |
76 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" )); |
| 75 | + $this->assertEquals("Creating database user... done", |
| 76 | + $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]")); |
77 | 77 | parent::clickContinueButton(); |
78 | 78 | |
79 | 79 | // 'Complete' page |
80 | | - $this->assertEquals( "Complete!", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
81 | | - $this->assertEquals( "Congratulations!", |
82 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" )); |
| 80 | + parent::completePageSuccessfull(); |
83 | 81 | $this->chooseCancelOnNextConfirmation(); |
84 | 82 | } |
85 | 83 | } |