Index: trunk/phase3/tests/selenium/installer/MediaWikiErrorsNamepageTestCase.php |
— | — | @@ -51,11 +51,11 @@ |
52 | 52 | // Verify warning message for all blank fields |
53 | 53 | parent::clickContinueButton(); |
54 | 54 | $this->assertEquals( "Enter a site name.", |
55 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 55 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
56 | 56 | $this->assertEquals( "Enter an administrator username.", |
57 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[3]/div[2]" )); |
| 57 | + $this->getText( LINK_DIV."div[3]/div[2]" )); |
58 | 58 | $this->assertEquals( "Enter a password for the administrator account.", |
59 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[4]/div[2]" )); |
| 59 | + $this->getText( LINK_DIV."div[4]/div[2]" )); |
60 | 60 | |
61 | 61 | // Verify warning message for the blank 'Site name' |
62 | 62 | $this->type( "config__AdminName", VALID_YOUR_NAME ); |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | $this->type( "config__AdminPassword2", VALID_PASSWORD_AGAIN ); |
65 | 65 | parent::clickContinueButton(); |
66 | 66 | $this->assertEquals( "Enter a site name.", |
67 | | - $this->getText(" //div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 67 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
68 | 68 | |
69 | 69 | // Input valid 'Site name' |
70 | 70 | $this->type( "config_wgSitename", VALID_WIKI_NAME ); |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | $this->type( "config_wgMetaNamespace", INVALID_NAMESPACE ); |
76 | 76 | parent::clickContinueButton(); |
77 | 77 | $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.", |
78 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 78 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
79 | 79 | |
80 | 80 | |
81 | 81 | // Verify warning message for the blank 'Project namespace' |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | $this->type( "config_wgMetaNamespace" , "" ); |
85 | 85 | parent::clickContinueButton(); |
86 | 86 | $this->assertEquals( "The specified namespace \"\" is invalid. Specify a different project namespace.", |
87 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 87 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
88 | 88 | |
89 | 89 | |
90 | 90 | // Valid 'Project namespace' |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | $this->type( "config__AdminName", " " ); |
103 | 103 | parent::clickContinueButton(); |
104 | 104 | $this->assertEquals( "Enter an administrator username.", |
105 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 105 | + $this->getText( LINK_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,7 +109,7 @@ |
110 | 110 | $this->type( "config__AdminPassword", " " ); |
111 | 111 | parent::clickContinueButton(); |
112 | 112 | $this->assertEquals( "Enter a password for the administrator account.", |
113 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 113 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
114 | 114 | |
115 | 115 | |
116 | 116 | // Verify warning message for the blank 'Password again' |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | $this->type( "config__AdminPassword2", " " ); |
120 | 120 | parent::clickContinueButton(); |
121 | 121 | $this->assertEquals( "The two passwords you entered do not match.", |
122 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 122 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
123 | 123 | |
124 | 124 | |
125 | 125 | // Verify warning message for the different'Password' and 'Password again' |
— | — | @@ -127,6 +127,6 @@ |
128 | 128 | $this->type( "config__AdminPassword2", INVALID_PASSWORD_AGAIN ); |
129 | 129 | parent::clickContinueButton(); |
130 | 130 | $this->assertEquals( "The two passwords you entered do not match.", |
131 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 131 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
132 | 132 | } |
133 | 133 | } |
Index: trunk/phase3/tests/selenium/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php |
— | — | @@ -51,14 +51,14 @@ |
52 | 52 | $this->type( "mysql_wgDBserver", INVALID_DB_HOST ); |
53 | 53 | parent::clickContinueButton(); |
54 | 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]" )); |
| 55 | + $this->getText( LINK_DIV."div[2]/div[2]/p[1]" )); |
56 | 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 | + $this->getText( LINK_DIV."div[2]/div[2]/p[2]" )); |
58 | 58 | // Verify warning message for the blank database host |
59 | 59 | $this->type( "mysql_wgDBserver", "" ); |
60 | 60 | parent::clickContinueButton(); |
61 | 61 | $this->assertEquals( "MySQL 4.0.14 or later is required, you have .", |
62 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 62 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
63 | 63 | |
64 | 64 | // Valid Database Host |
65 | 65 | $this->type( "mysql_wgDBserver", VALID_DB_HOST ); |
— | — | @@ -67,13 +67,13 @@ |
68 | 68 | $this->type( "mysql_wgDBname", INVALID_DB_NAME ); |
69 | 69 | parent::clickContinueButton(); |
70 | 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 | + $this->getText( LINK_DIV."div[2]/div[2]/p" )); |
72 | 72 | |
73 | 73 | // Verify warning message for the blank database name |
74 | 74 | $this->type( "mysql_wgDBname", ""); |
75 | 75 | parent::clickContinueButton(); |
76 | 76 | $this->assertEquals( "You must enter a value for \"Database name\"", |
77 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 77 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
78 | 78 | |
79 | 79 | // valid Database name |
80 | 80 | $this->type( "mysql_wgDBname", VALID_DB_NAME); |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | $this->type( "mysql_wgDBprefix", INVALID_DB_PREFIX ); |
84 | 84 | parent::clickContinueButton(); |
85 | 85 | $this->assertEquals( "Invalid database prefix \"".INVALID_DB_PREFIX."\". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).", |
86 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" )); |
| 86 | + $this->getText( LINK_DIV."div[2]/div[2]" )); |
87 | 87 | |
88 | 88 | // Valid Database prefix |
89 | 89 | $this->type( "mysql_wgDBprefix", VALID_DB_PREFIX ); |
— | — | @@ -91,17 +91,17 @@ |
92 | 92 | $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME ); |
93 | 93 | parent::clickContinueButton(); |
94 | 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]" )); |
| 95 | + $this->getText( LINK_DIV."div[2]/div[2]/p[1]" )); |
96 | 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]")); |
| 97 | + $this->getText( LINK_DIV."div[2]/div[2]/p[2]")); |
98 | 98 | |
99 | 99 | // Verify warning message for the blank database user name |
100 | 100 | $this->type( "mysql__InstallUser", "" ); |
101 | 101 | parent::clickContinueButton(); |
102 | 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]" )); |
| 103 | + $this->getText( LINK_DIV."div[2]/div[2]/p[1]" )); |
104 | 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]" )); |
| 105 | + $this->getText( LINK_DIV."div[2]/div[2]/p[2]" )); |
106 | 106 | |
107 | 107 | // Valid Database username |
108 | 108 | $this->type( "mysql__InstallUser", VALID_DB_USER_NAME ); |
— | — | @@ -111,18 +111,18 @@ |
112 | 112 | parent::clickContinueButton(); |
113 | 113 | |
114 | 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]" )); |
| 115 | + $this->getText( LINK_DIV."div[2]/div[2]/p[1]" )); |
116 | 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]" )); |
| 117 | + $this->getText( LINK_DIV."div[2]/div[2]/p[2]" )); |
118 | 118 | |
119 | 119 | // Verify warning message for the invalid username and password |
120 | 120 | $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME ); |
121 | 121 | $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD ); |
122 | 122 | parent::clickContinueButton(); |
123 | 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]" )); |
| 124 | + $this->getText( LINK_DIV."div[2]/div[2]/p[1]" )); |
125 | 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]" )); |
| 126 | + $this->getText( LINK_DIV."div[2]/div[2]/p[2]" )); |
127 | 127 | |
128 | 128 | // Valid username and valid password |
129 | 129 | $this->type( "mysql__InstallUser", VALID_DB_USER_NAME ); |
— | — | @@ -131,6 +131,6 @@ |
132 | 132 | |
133 | 133 | // successfully completes the 'Connect to database' page |
134 | 134 | $this->assertEquals( "Database settings", |
135 | | - $this->getText("//div[@id='bodyContent']/div/div/h2" )); |
| 135 | + $this->getText( LINK_DIV."h2" )); |
136 | 136 | } |
137 | 137 | } |
Index: trunk/phase3/tests/selenium/installer/MediaWikiOnAlreadyInstalledTestCase.php |
— | — | @@ -56,11 +56,11 @@ |
57 | 57 | parent::clickContinueButton(); |
58 | 58 | |
59 | 59 | // 'Install' page should display after the 'Option' page |
60 | | - $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 60 | + $this->assertEquals( "Install", $this->getText( LINK_DIV."h2" )); |
61 | 61 | |
62 | 62 | // Verify warning text displayed |
63 | 63 | $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
64 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
| 64 | + $this->getText( LINK_FORM."div[1]/div[2]" )); |
65 | 65 | |
66 | 66 | // Complete page |
67 | 67 | parent::clickContinueButton(); |
Index: trunk/phase3/tests/selenium/installer/MediaWikiHelpFieldHintTestCase.php |
— | — | @@ -97,14 +97,14 @@ |
98 | 98 | parent::navigateDatabaseSettingsPage($databaseName); |
99 | 99 | |
100 | 100 | // Verify help field for 'Search engine' |
101 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[1]" ); |
| 101 | + $this->click( LINK_FORM."div[2]/span[1]" ); |
102 | 102 | $this->assertEquals( SEARCH_ENGINE_HELP, |
103 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[2]" )); |
| 103 | + $this->getText( LINK_FORM."div[2]/span[2]" )); |
104 | 104 | |
105 | 105 | // Verify help field for 'Database character set' |
106 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[1]" ); |
| 106 | + $this->click( LINK_FORM."div[4]/span[1]" ); |
107 | 107 | $this->assertEquals( DATABASE_CHARACTER_SET_HELP, |
108 | | - $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[2]")); |
| 108 | + $this->getText( LINK_FORM."div[4]/span[2]")); |
109 | 109 | parent::restartInstallation(); |
110 | 110 | } |
111 | 111 | |
— | — | @@ -115,29 +115,29 @@ |
116 | 116 | parent::navigateNamePage( $databaseName ); |
117 | 117 | |
118 | 118 | // Verify help field for 'Name of Wiki' |
119 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/div/span[1]" ); |
| 119 | + $this->click( LINK_FORM."div[1]/div[1]/div/span[1]" ); |
120 | 120 | $this->assertEquals( NAME_OF_WIKI_HELP, |
121 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/div/span[2]/p" )); |
| 121 | + $this->getText( LINK_FORM."div[1]/div[1]/div/span[2]/p" )); |
122 | 122 | |
123 | 123 | // Verify help field for 'Project namespace' |
124 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/div/span[1]" ); |
| 124 | + $this->click( LINK_FORM."div[2]/div[1]/div/span[1]" ); |
125 | 125 | $this->assertEquals( PROJECT_NAMESPACE_HELP, |
126 | | - $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/div/span[2]/p")); |
| 126 | + $this->getText( LINK_FORM."div[2]/div[1]/div/span[2]/p")); |
127 | 127 | |
128 | 128 | // Verify help field for 'Your Name' |
129 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/div[1]/div/span[1]" ); |
| 129 | + $this->click( LINK_FORM."fieldset/div[1]/div[1]/div/span[1]" ); |
130 | 130 | $this->assertEquals( USER_NAME_HELP, |
131 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/div[1]/div/span[2]/p" )); |
| 131 | + $this->getText( LINK_FORM."fieldset/div[1]/div[1]/div/span[2]/p" )); |
132 | 132 | |
133 | 133 | // Verify help field for 'E mail address' |
134 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[4]/div[1]/div/span[1]" ); |
| 134 | + $this->click( LINK_FORM."fieldset/div[4]/div[1]/div/span[1]" ); |
135 | 135 | $this->assertEquals( EMAIL_ADDRESS_HELP, |
136 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[4]/div[1]/div/span[2]/p" )); |
| 136 | + $this->getText( LINK_FORM."fieldset/div[4]/div[1]/div/span[2]/p" )); |
137 | 137 | |
138 | 138 | // Verify help field for 'Subscribe to the release announcements mailing list' |
139 | | - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[5]/div/span[1]" ); |
| 139 | + $this->click( LINK_FORM."fieldset/div[5]/div/span[1]" ); |
140 | 140 | $this->assertEquals( SUBSCRIBE_MAILING_LIST_HELP, |
141 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[5]/div/span[2]/p" )); |
| 141 | + $this->getText( LINK_FORM."fieldset/div[5]/div/span[2]/p" )); |
142 | 142 | parent::restartInstallation(); |
143 | 143 | } |
144 | 144 | } |
Index: trunk/phase3/tests/selenium/installer/MediaWikiUpgradeExistingDatabaseTestCase.php |
— | — | @@ -50,9 +50,9 @@ |
51 | 51 | parent::navigateInstallPage( $databaseName ); |
52 | 52 | |
53 | 53 | $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
54 | | - $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 54 | + $this->assertEquals( "Install", $this->getText( LINK_DIV."h2" )); |
55 | 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 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
| 56 | + $this->getText( LINK_DIV."div[2]/form/div[1]/div[2]" )); |
57 | 57 | |
58 | 58 | // 'Optionis' page |
59 | 59 | parent::clickBackButton(); |
— | — | @@ -69,27 +69,27 @@ |
70 | 70 | parent::clickContinueButton(); |
71 | 71 | |
72 | 72 | // 'Upgrade existing installation' page displayed next to the 'Connect to database' page. |
73 | | - $this->assertEquals( "Upgrade existing installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 73 | + $this->assertEquals( "Upgrade existing installation", $this->getText( LINK_DIV."h2" )); |
74 | 74 | |
75 | 75 | // Warning message displayed. |
76 | 76 | $this->assertEquals( "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.18alpha, click Continue.", |
77 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
| 77 | + $this->getText( LINK_DIV."div[2]/form/div[1]/div[2]" )); |
78 | 78 | |
79 | 79 | parent::clickContinueButton(); |
80 | 80 | $this->assertEquals( "Upgrade existing installation", |
81 | | - $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 81 | + $this->getText( LINK_DIV."h2" )); |
82 | 82 | |
83 | 83 | // 'Upgrade complete.' text display |
84 | 84 | $this->assertEquals("Upgrade complete.", |
85 | | - $this->getText("//div[@id='bodyContent']/div/div/div[4]/form/div[1]/div[2]/p[1]")); |
| 85 | + $this->getText( LINK_FORM."div[1]/div[2]/p[1]")); |
86 | 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]")); |
| 87 | + $this->getText( LINK_FORM."div[1]/div[2]/p[2]")); |
88 | 88 | |
89 | 89 | $this->assertTrue($this->isElementPresent( "submit-regenerate" )); |
90 | 90 | $this->click( "submit-regenerate" ); |
91 | 91 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
92 | 92 | $this->assertEquals( "Database settings", |
93 | | - $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 93 | + $this->getText( LINK_DIV."h2" )); |
94 | 94 | |
95 | 95 | // 'Database settings' page |
96 | 96 | parent::clickContinueButton(); |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | |
104 | 104 | // Install page |
105 | 105 | $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
106 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" )); |
| 106 | + $this->getText( LINK_FORM."div[1]/div[2]" )); |
107 | 107 | parent::clickContinueButton(); |
108 | 108 | |
109 | 109 | // complete |
Index: trunk/phase3/tests/selenium/installer/MediaWikiRightFrameworkLinksTestCase.php |
— | — | @@ -67,27 +67,27 @@ |
68 | 68 | // Navigate to the 'Read me' page |
69 | 69 | $this->click( "link=Read me" ); |
70 | 70 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
71 | | - $this->assertEquals( "Read me", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" )); |
| 71 | + $this->assertEquals( "Read me", $this->getText( LINK_DIV."h2[1]" )); |
72 | 72 | $this->assertTrue($this->isElementPresent( "submit-back" )); |
73 | 73 | parent::clickBackButton(); |
74 | 74 | |
75 | 75 | // Navigate to the 'Release notes' page |
76 | 76 | $this->click( "link=Release notes" ); |
77 | 77 | $this->waitForPageToLoad( PAGE_LOAD_TIME); |
78 | | - $this->assertEquals( "Release notes", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" )); |
| 78 | + $this->assertEquals( "Release notes", $this->getText( LINK_DIV."h2[1]" )); |
79 | 79 | $this->assertTrue( $this->isElementPresent( "submit-back" )); |
80 | 80 | parent::clickBackButton(); |
81 | 81 | |
82 | 82 | // Navigate to the 'Copying' page |
83 | 83 | $this->click( "link=Copying" ); |
84 | 84 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
85 | | - $this->assertEquals( "Copying", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" )); |
| 85 | + $this->assertEquals( "Copying", $this->getText( LINK_DIV."h2[1]" )); |
86 | 86 | $this->assertTrue($this->isElementPresent( "submit-back" )); |
87 | 87 | parent::clickBackButton(); |
88 | 88 | |
89 | 89 | // Navigate to the 'Upgrading' page |
90 | 90 | $this->click( "link=Upgrading" ); |
91 | 91 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
92 | | - $this->assertEquals( "Upgrading", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" )); |
| 92 | + $this->assertEquals( "Upgrading", $this->getText( LINK_DIV."h2[1]" )); |
93 | 93 | } |
94 | 94 | } |
Index: trunk/phase3/tests/selenium/installer/MediaWikiUserInterfaceTestCase.php |
— | — | @@ -70,18 +70,18 @@ |
71 | 71 | parent::navigateLanguagePage(); |
72 | 72 | |
73 | 73 | // Verify 'Language' heading |
74 | | - $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 74 | + $this->assertEquals( "Language", $this->getText( LINK_DIV."h2" )); |
75 | 75 | |
76 | 76 | // 'Your language' label available |
77 | 77 | $this->assertEquals( "Your language:", |
78 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" )); |
| 78 | + $this->getText( LINK_FORM."div[1]/div[1]/label" )); |
79 | 79 | |
80 | 80 | // 'Your language' dropdown available |
81 | 81 | $this->assertTrue( $this->isElementPresent( "UserLang" )); |
82 | 82 | |
83 | 83 | // 'Wiki language' label available |
84 | 84 | $this->assertEquals( "Wiki language:", |
85 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" )); |
| 85 | + $this->getText( LINK_FORM."div[2]/div[1]/label" )); |
86 | 86 | |
87 | 87 | // 'Wiki language' dropdown available |
88 | 88 | $this->assertTrue($this->isElementPresent( "ContLang" )); |
— | — | @@ -94,11 +94,11 @@ |
95 | 95 | |
96 | 96 | // Verify 'Welcome to MediaWiki!' heading |
97 | 97 | $this->assertEquals( "Welcome to MediaWiki!", |
98 | | - $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 98 | + $this->getText( LINK_DIV."h2" )); |
99 | 99 | |
100 | 100 | // Verify environment ok text displayed. |
101 | 101 | $this->assertEquals( "The environment has been checked.You can install MediaWiki.", |
102 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[7]/span" )); |
| 102 | + $this->getText( LINK_DIV."div[7]/span" )); |
103 | 103 | } |
104 | 104 | |
105 | 105 | |
— | — | @@ -108,12 +108,12 @@ |
109 | 109 | |
110 | 110 | // 'MYSQL radio button available |
111 | 111 | $this->assertEquals( "MySQL", |
112 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" )); |
113 | | - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]" )); |
| 112 | + $this->getText( LINK_FORM."div[2]/div[2]/ul/li[1]/label" )); |
| 113 | + $this->assertTrue( $this->isElementPresent( LINK_FORM."div[2]/div[2]/ul/li[1]" )); |
114 | 114 | |
115 | 115 | // 'SQLite' radio button available |
116 | | - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]" )); |
117 | | - $this->assertEquals( "SQLite", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label ")); |
| 116 | + $this->assertTrue( $this->isElementPresent( LINK_FORM."div[2]/div[2]/ul/li[2]" )); |
| 117 | + $this->assertEquals( "SQLite", $this->getText( LINK_FORM."div[2]/div[2]/ul/li[2]/label ")); |
118 | 118 | |
119 | 119 | // 'Database host' label available |
120 | 120 | $this->assertEquals( "Database host:", $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/label" )); |
— | — | @@ -164,16 +164,16 @@ |
165 | 165 | parent::navigateDatabaseSettingsPage( $databaseName ); |
166 | 166 | |
167 | 167 | // 'Database settings' text available. |
168 | | - $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 168 | + $this->assertEquals( "Database settings", $this->getText( LINK_DIV."h2" )); |
169 | 169 | |
170 | 170 | // 'Database account for web access' section available |
171 | | - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" )); |
| 171 | + $this->assertTrue( $this->isElementPresent( LINK_FORM."fieldset" )); |
172 | 172 | |
173 | 173 | // 'Database account for web access' label available |
174 | | - $this->assertEquals( "Database account for web access", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" )); |
| 174 | + $this->assertEquals( "Database account for web access", $this->getText( LINK_FORM."fieldset/legend" )); |
175 | 175 | |
176 | 176 | // 'Use the same account as for installation' check box available |
177 | | - $this->assertEquals( "Use the same account as for installation", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/label" )); |
| 177 | + $this->assertEquals( "Use the same account as for installation", $this->getText( LINK_FORM."fieldset/div[1]/label" )); |
178 | 178 | |
179 | 179 | // 'Use the same account as for installation' check box is selected by default |
180 | 180 | $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" )); |
— | — | @@ -209,41 +209,43 @@ |
210 | 210 | |
211 | 211 | // 'Storage engine' label available |
212 | 212 | $this->assertEquals( "Storage engine:", |
213 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label")); |
| 213 | + $this->getText( LINK_FORM."div[1]/div[1]/label")); |
214 | 214 | |
215 | 215 | // 'InnoDB' label available |
216 | 216 | $this->assertEquals( "InnoDB", |
217 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[1]/label" )); |
| 217 | + $this->getText( LINK_FORM."div[1]/div[2]/ul/li[1]/label" )); |
218 | 218 | |
219 | 219 | // 'InnoDB' radio button available |
220 | 220 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlEngine_InnoDB" )); |
221 | 221 | |
222 | 222 | // 'MyISAM' label available |
223 | | - $this->assertEquals( "MyISAM", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[2]/label" )); |
| 223 | + $this->assertEquals( "MyISAM", $this->getText( LINK_FORM."div[1]/div[2]/ul/li[2]/label" )); |
224 | 224 | |
225 | 225 | // 'MyISAM' radio button available |
226 | 226 | $this->assertTrue($this->isElementPresent( "mysql__MysqlEngine_MyISAM" )); |
227 | 227 | |
228 | 228 | // 'Database character set' label available |
229 | 229 | $this->assertEquals( "Database character set:", |
230 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[1]/label" )); |
| 230 | + $this->getText( LINK_FORM."div[3]/div[1]/label" )); |
231 | 231 | |
232 | 232 | // 'Binary' radio button available |
233 | 233 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_binary" )); |
234 | 234 | |
235 | 235 | // 'Binary' radio button available |
236 | | - $this->assertEquals( "Binary", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[1]/label" )); |
| 236 | + $this->assertEquals( "Binary", $this->getText( LINK_FORM."div[3]/div[2]/ul/li[1]/label" )); |
237 | 237 | |
238 | 238 | // 'UTF-8' radio button available |
239 | 239 | $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_utf8" )); |
240 | 240 | |
241 | 241 | // 'UTF-8' label available |
242 | | - $this->assertEquals( "UTF-8", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[2]/label" )); |
| 242 | + $this->assertEquals( "UTF-8", $this->getText( LINK_FORM."div[3]/div[2]/ul/li[2]/label" )); |
243 | 243 | |
244 | 244 | // 'Binary' radio button is selected |
245 | 245 | $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" )); |
246 | 246 | } |
247 | 247 | |
| 248 | + |
| 249 | + |
248 | 250 | public function testNamePageUI() { |
249 | 251 | |
250 | 252 | $databaseName = DB_NAME_PREFIX."_name_UI"; |
— | — | @@ -251,13 +253,13 @@ |
252 | 254 | |
253 | 255 | // 'Name of wiki' text box available |
254 | 256 | $this->assertEquals( "Name of wiki:", |
255 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" )); |
| 257 | + $this->getText( LINK_FORM."div[1]/div[1]/label" )); |
256 | 258 | |
257 | 259 | $this->assertTrue( $this->isElementPresent( "config_wgSitename" )); |
258 | 260 | |
259 | 261 | // 'Project namespace' label available |
260 | 262 | $this->assertEquals( "Project namespace:", |
261 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" )); |
| 263 | + $this->getText( LINK_FORM."div[2]/div[1]/label" )); |
262 | 264 | |
263 | 265 | // 'Same as the wiki name' radio button available |
264 | 266 | $this->assertTrue( $this->isElementPresent( "config__NamespaceType_site-name" )); |
— | — | @@ -270,50 +272,50 @@ |
271 | 273 | |
272 | 274 | // 'Same as the wiki name' label available |
273 | 275 | $this->assertEquals( "Same as the wiki name:", |
274 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" )); |
| 276 | + $this->getText( LINK_FORM."div[2]/div[2]/ul/li[1]/label" )); |
275 | 277 | |
276 | 278 | // 'Project' label available |
277 | 279 | $this->assertEquals("Project", |
278 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label" )); |
| 280 | + $this->getText( LINK_FORM."div[2]/div[2]/ul/li[2]/label" )); |
279 | 281 | |
280 | 282 | // 'Project' label available |
281 | 283 | $this->assertEquals( "Other (specify)", |
282 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[3]/label" )); |
| 284 | + $this->getText( LINK_FORM."div[2]/div[2]/ul/li[3]/label" )); |
283 | 285 | |
284 | 286 | // 'Same as the wiki name' radio button selected by default |
285 | 287 | $this->assertEquals( "on", $this->getValue( "config__NamespaceType_site-name" )); |
286 | 288 | |
287 | 289 | // 'Administrator account' section available |
288 | | - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" )); |
| 290 | + $this->assertTrue( $this->isElementPresent( LINK_FORM."fieldset" )); |
289 | 291 | |
290 | 292 | // 'Administrator account' label available |
291 | 293 | $this->assertEquals( "Administrator account", |
292 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" )); |
| 294 | + $this->getText( LINK_FORM."fieldset/legend" )); |
293 | 295 | |
294 | 296 | // 'Your Name' label available |
295 | 297 | $this->assertEquals( "Your name:", |
296 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/div[1]/label" )); |
| 298 | + $this->getText( LINK_FORM."fieldset/div[1]/div[1]/label" )); |
297 | 299 | |
298 | 300 | // 'Your Name' text box available |
299 | 301 | $this->assertTrue( $this->isElementPresent( "config__AdminName" )); |
300 | 302 | |
301 | 303 | // 'Password' label available |
302 | 304 | $this->assertEquals( "Password:", |
303 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[2]/div[1]/label" )); |
| 305 | + $this->getText( LINK_FORM."fieldset/div[2]/div[1]/label" )); |
304 | 306 | |
305 | 307 | // 'Password' text box available |
306 | 308 | $this->assertTrue( $this->isElementPresent( "config__AdminPassword" )); |
307 | 309 | |
308 | 310 | // 'Password again' label available |
309 | 311 | $this->assertEquals( "Password again:", |
310 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[3]/div[1]/label" )); |
| 312 | + $this->getText( LINK_FORM."fieldset/div[3]/div[1]/label" )); |
311 | 313 | |
312 | 314 | // 'Password again' text box available |
313 | 315 | $this->assertTrue( $this->isElementPresent( "config__AdminPassword2" )); |
314 | 316 | |
315 | 317 | // 'Email address' label avaialble |
316 | 318 | $this->assertEquals( "E-mail address:", |
317 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[4]/div[1]/label" )); |
| 319 | + $this->getText( LINK_FORM."fieldset/div[4]/div[1]/label" )); |
318 | 320 | |
319 | 321 | // 'Email address' text box available |
320 | 322 | $this->assertTrue( $this->isElementPresent( "config__AdminEmail" )); |
— | — | @@ -323,28 +325,28 @@ |
324 | 326 | |
325 | 327 | // 'Subscribe to the release announcements mailing list. ' label avaialble |
326 | 328 | $this->assertEquals( "Subscribe to the release announcements mailing list.", |
327 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[5]/label" )); |
| 329 | + $this->getText( LINK_FORM."fieldset/div[5]/label" )); |
328 | 330 | |
329 | 331 | // 'release announcements mailing list' link available |
330 | 332 | $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" )); |
331 | 333 | |
332 | 334 | // Message displayed |
333 | 335 | $this->assertEquals( "You are almost done! You can now skip the remaining configuration and install the wiki right now.", |
334 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/div[2]" )); |
| 336 | + $this->getText( LINK_FORM."/div[4]/div[2]" )); |
335 | 337 | |
336 | 338 | // 'Ask me more questions.' radio button available |
337 | 339 | $this->assertTrue( $this->isElementPresent( "config__SkipOptional_continue" )); |
338 | 340 | |
339 | 341 | // 'Ask me more questions.' label available |
340 | 342 | $this->assertEquals( "Ask me more questions.", |
341 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[1]/label" )); |
| 343 | + $this->getText( LINK_FORM."div[5]/div[2]/ul/li[1]/label" )); |
342 | 344 | |
343 | 345 | // 'I'm bored already, just install the wiki' radio button is avaiable |
344 | 346 | $this->assertTrue( $this->isElementPresent( "config__SkipOptional_skip" )); |
345 | 347 | |
346 | 348 | // 'I'm bored already, just install the wiki' label available |
347 | 349 | $this->assertEquals( "I'm bored already, just install the wiki.", |
348 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[2]/label" )); |
| 350 | + $this->getText( LINK_FORM."div[5]/div[2]/ul/li[2]/label" )); |
349 | 351 | |
350 | 352 | // 'Ask me more questions.' radio button is default selected |
351 | 353 | $this->assertEquals( "on", $this->getValue( "config__SkipOptional_continue" )); |
— | — | @@ -358,7 +360,7 @@ |
359 | 361 | parent::navigateOptionsPage($databaseName); |
360 | 362 | |
361 | 363 | // 'Options' label available |
362 | | - $this->assertEquals( "Options", $this->getText("//div[@id='bodyContent']/div/div/h2")); |
| 364 | + $this->assertEquals( "Options", $this->getText( LINK_DIV."h2")); |
363 | 365 | |
364 | 366 | // 'Return e-mail address' label available |
365 | 367 | $this->assertEquals( "Return e-mail address:", $this->getText( "//div[@id='emailwrapper']/div[1]/div[1]/label" )); |
— | — | @@ -370,7 +372,7 @@ |
371 | 373 | $this->assertEquals( "apache@localhost", $this->getValue( "config_wgPasswordSender" )); |
372 | 374 | |
373 | 375 | // 'Logo URL' label available |
374 | | - $this->assertEquals( "Logo URL:", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[3]/div[1]/label" )); |
| 376 | + $this->assertEquals( "Logo URL:", $this->getText( LINK_FORM."fieldset[2]/div[3]/div[1]/label" )); |
375 | 377 | |
376 | 378 | // 'Logo URL' text box available |
377 | 379 | $this->assertTrue( $this->isElementPresent( "config_wgLogo" )); |
— | — | @@ -383,7 +385,7 @@ |
384 | 386 | |
385 | 387 | // 'Enable file uploads' label available |
386 | 388 | $this->assertEquals( "Enable file uploads", |
387 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[1]/label" )); |
| 389 | + $this->getText( LINK_FORM."fieldset[2]/div[1]/label" )); |
388 | 390 | |
389 | 391 | // 'Enable file uploads' check box is not selected |
390 | 392 | $this->assertEquals( "off", $this->getValue( "config_wgEnableUploads" )); |
— | — | @@ -411,21 +413,21 @@ |
412 | 414 | |
413 | 415 | // Verify installation done messages display |
414 | 416 | $this->assertEquals( "Setting up database... done", |
415 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[1]" )); |
| 417 | + $this->getText( LINK_FORM."ul/li[1]" )); |
416 | 418 | $this->assertEquals( "Creating tables... done", |
417 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" )); |
| 419 | + $this->getText( LINK_FORM."ul/li[2]" )); |
418 | 420 | $this->assertEquals( "Creating database user... done", |
419 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]" )); |
| 421 | + $this->getText( LINK_FORM."ul/li[3]" )); |
420 | 422 | $this->assertEquals( "Populating default interwiki table... done", |
421 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[4]" )); |
| 423 | + $this->getText( LINK_FORM."ul/li[4]" )); |
422 | 424 | $this->assertEquals( "Generating secret key... done", |
423 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[5]" )); |
| 425 | + $this->getText( LINK_FORM."ul/li[5]" )); |
424 | 426 | $this->assertEquals( "Generating default upgrade key... done", |
425 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[6]" )); |
| 427 | + $this->getText( LINK_FORM."ul/li[6]" )); |
426 | 428 | $this->assertEquals( "Creating administrator user account... done", |
427 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[7]" )); |
| 429 | + $this->getText( LINK_FORM."ul/li[7]" )); |
428 | 430 | $this->assertEquals( "Creating main page with default content... done", |
429 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[8]" )); |
| 431 | + $this->getText( LINK_FORM."ul/li[8]" )); |
430 | 432 | } |
431 | 433 | |
432 | 434 | |
— | — | @@ -437,10 +439,10 @@ |
438 | 440 | |
439 | 441 | // 'Congratulations!' text display |
440 | 442 | $this->assertEquals("Congratulations!", |
441 | | - $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[1]/b")); |
| 443 | + $this->getText( LINK_FORM."div[1]/div[2]/p[1]/b")); |
442 | 444 | // 'LocalSettings.php' generated message display |
443 | 445 | $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.", |
444 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[2]" )); |
| 446 | + $this->getText( LINK_FORM."div[1]/div[2]/p[2]" )); |
445 | 447 | |
446 | 448 | // 'Download LocalSettings.php'' link available |
447 | 449 | $this->assertTrue( $this->isElementPresent( "link=Download LocalSettings.php" )); |
— | — | @@ -458,7 +460,7 @@ |
459 | 461 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
460 | 462 | |
461 | 463 | // Restart installation' label should be available. |
462 | | - $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 464 | + $this->assertEquals( "Restart installation", $this->getText( LINK_DIV."h2" )); |
463 | 465 | |
464 | 466 | //'Do you want to clear all saved data that you have entered and restart the installation process?' label available |
465 | 467 | $this->assertEquals( "Do you want to clear all saved data that you have entered and restart the installation process?", |
— | — | @@ -516,24 +518,24 @@ |
517 | 519 | parent::navigateLanguagePage(); |
518 | 520 | // Verfy right framework texts display |
519 | 521 | $this->assertEquals( "Language", |
520 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[1]" )); |
| 522 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[1]" )); |
521 | 523 | $this->assertEquals( "Existing wiki", |
522 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[2]" )); |
| 524 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[2]" )); |
523 | 525 | $this->assertEquals( "Welcome to MediaWiki!", |
524 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[3]" )); |
| 526 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[3]" )); |
525 | 527 | $this->assertEquals( "Connect to database", |
526 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[4]" )); |
| 528 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[4]" )); |
527 | 529 | $this->assertEquals( "Upgrade existing installation", |
528 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[5]" )); |
| 530 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[5]" )); |
529 | 531 | $this->assertEquals( "Database settings", |
530 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[6]" )); |
| 532 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[6]" )); |
531 | 533 | $this->assertEquals( "Name", |
532 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[7]" )); |
| 534 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[7]" )); |
533 | 535 | $this->assertEquals( "Options", |
534 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[8]" )); |
| 536 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[8]" )); |
535 | 537 | $this->assertEquals( "Install", |
536 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[9]" )); |
| 538 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[9]" )); |
537 | 539 | $this->assertEquals( "Complete!", |
538 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[1]/ul[1]/li[10]/span" )); |
539 | | - } |
| 540 | + $this->getText( LINK_RIGHT_FRAMEWORK."li[10]/span" )); |
| 541 | + } |
540 | 542 | } |
Index: trunk/phase3/tests/selenium/installer/MediaWikiDifferntDatabasePrefixTestCase.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | |
67 | 67 | // Verify upgrade existing message |
68 | 68 | $this->assertEquals( "Upgrade existing installation", |
69 | | - $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 69 | + $this->getText( LINK_DIV."h2" )); |
70 | 70 | |
71 | 71 | // To 'Connect to database' page |
72 | 72 | parent::clickBackButton(); |
— | — | @@ -83,9 +83,9 @@ |
84 | 84 | |
85 | 85 | // Verify already installed warning message |
86 | 86 | $this->assertEquals( "Install", |
87 | | - $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 87 | + $this->getText( LINK_DIV."h2" )); |
88 | 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 | | - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]" )); |
| 89 | + $this->getText( LINK_FORM."div[1]" )); |
90 | 90 | |
91 | 91 | parent::clickContinueButton(); |
92 | 92 | parent::completePageSuccessfull(); |
Index: trunk/phase3/tests/selenium/installer/MediaWikiRestartInstallationTestCase.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
59 | 59 | |
60 | 60 | // 'Restart Installation' page displayed |
61 | | - $this->assertEquals( "Restart installation", $this->getText("//div[@id='bodyContent']/div/div/h2")); |
| 61 | + $this->assertEquals( "Restart installation", $this->getText( LINK_DIV."h2")); |
62 | 62 | |
63 | 63 | // Restart warning message displayed |
64 | 64 | $this->assertTrue($this->isTextPresent( "exact:Do you want to clear all saved data that you have entered and restart the installation process?" )); |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
69 | 69 | |
70 | 70 | // Navigate to the initial installation page(Language). |
71 | | - $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 71 | + $this->assertEquals( "Language", $this->getText( LINK_DIV."h2" )); |
72 | 72 | |
73 | 73 | // 'Welcome to MediaWiki!' page |
74 | 74 | parent::clickContinueButton(); |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
96 | 96 | |
97 | 97 | // 'Restart Installation' page displayed |
98 | | - $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" )); |
| 98 | + $this->assertEquals( "Restart installation", $this->getText( LINK_DIV."h2" )); |
99 | 99 | |
100 | 100 | // Restart warning message displayed |
101 | 101 | $this->assertTrue( $this->isTextPresent( "Do you want to clear all saved data that you have entered and restart the installation process?")); |
— | — | @@ -103,7 +103,7 @@ |
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( LINK_DIV."h2" )); |
108 | 108 | ; |
109 | 109 | |
110 | 110 | // 'Connect to database' page |
Index: trunk/phase3/tests/selenium/installer/MediaWikiDifferentDatabaseAccountTestCase.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | |
74 | 74 | // 'Install' page |
75 | 75 | $this->assertEquals("Creating database user... done", |
76 | | - $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/ul/li[3]")); |
| 76 | + $this->getText( LINK_FORM."ul/li[3]")); |
77 | 77 | parent::clickContinueButton(); |
78 | 78 | |
79 | 79 | // 'Complete' page |