r78779 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78778‎ | r78779 | r78780 >
Date:11:16, 22 December 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r78775, svn:eol-style native SET UP YOUR AUTOPROPS
Modified paths:
  • /trunk/phase3/tests/installer/MediaWikiButtonsAvailabilityTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiDifferentDatabaseAccountTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiDifferntDatabasePrefixTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiErrorsNamepageTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiHelpFieldHintTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiInstallationCommonFunction.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiInstallationConfig.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiInstallerTestSuite.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiMySQLDataBaseTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiMySQLiteDataBaseTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiOnAlreadyInstalledTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiRestartInstallationTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiRightFrameworkLinksTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiUpgradeExistingDatabaseTestCase.php (modified) (history)
  • /trunk/phase3/tests/installer/MediaWikiUserInterfaceTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/installer/MediaWikiErrorsNamepageTestCase.php
@@ -1,132 +1,132 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiErrorsNamepageTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -/*
32 - * Test Case ID : 10 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
33 - * Test Case Name : Invalid/ blank values for fields in 'Name' page.
34 - * Version : MediaWiki 1.18alpha
35 -*/
36 -
37 -require_once 'MediaWikiInstallationCommonFunction.php';
38 -
39 -class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunction {
40 -
41 - function setUp() {
42 - parent::setUp();
43 - }
44 -
45 - // Verify warning message for the 'Name' page
46 - public function testErrorsNamePage(){
47 -
48 - $databaseName = DB_NAME_PREFIX."_error_name";
49 -
50 - parent::navigateNamePage( $databaseName );
51 -
52 - // Verify warning message for all blank fields
53 - parent::clickContinueButton();
54 - $this->assertEquals( "Enter a site name.",
55 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
56 - $this->assertEquals( "Enter an administrator username.",
57 - $this->getText( "//div[@id='bodyContent']/div/div/div[3]/div[2]" ));
58 - $this->assertEquals( "Enter a password for the administrator account.",
59 - $this->getText( "//div[@id='bodyContent']/div/div/div[4]/div[2]" ));
60 -
61 - // Verify warning message for the blank 'Site name'
62 - $this->type( "config__AdminName", VALID_YOUR_NAME );
63 - $this->type( "config__AdminPassword", VALID_PASSWORD );
64 - $this->type( "config__AdminPassword2", VALID_PASSWORD_AGAIN );
65 - parent::clickContinueButton();
66 - $this->assertEquals( "Enter a site name.",
67 - $this->getText(" //div[@id='bodyContent']/div/div/div[2]/div[2]" ));
68 -
69 - // Input valid 'Site name'
70 - $this->type( "config_wgSitename", VALID_WIKI_NAME );
71 -
72 -
73 - // Verify warning message for the invalid "Project namespace'
74 - $this->click( "config__NamespaceType_other" );
75 - $this->type( "config_wgMetaNamespace", INVALID_NAMESPACE );
76 - parent::clickContinueButton();
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]" ));
79 -
80 -
81 - // Verify warning message for the blank 'Project namespace'
82 - $this->type( "config_wgSitename", VALID_WIKI_NAME );
83 - $this->click( "config__NamespaceType_other" );
84 - $this->type( "config_wgMetaNamespace" , "" );
85 - parent::clickContinueButton();
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]" ));
88 -
89 -
90 - // Valid 'Project namespace'
91 - $this->click( "config__NamespaceType_other" );
92 - $this->type( "config_wgMetaNamespace", VALID_NAMESPACE );
93 - parent::clickContinueButton();
94 -
95 -
96 - // Valid 'Site name'
97 - $this->click( "config__NamespaceType_site-name" );
98 - $this->type( "config_wgSitename", VALID_WIKI_NAME );
99 -
100 -
101 - // Verify warning message for blank 'Your name'
102 - $this->type( "config__AdminName", " " );
103 - parent::clickContinueButton();
104 - $this->assertEquals( "Enter an administrator username.",
105 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
106 -
107 -
108 - // Verify warning message for blank 'Password'
109 - $this->type( "config__AdminName", VALID_YOUR_NAME );
110 - $this->type( "config__AdminPassword", " " );
111 - parent::clickContinueButton();
112 - $this->assertEquals( "Enter a password for the administrator account.",
113 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
114 -
115 -
116 - // Verify warning message for the blank 'Password again'
117 - $this->type( "config_wgSitename", VALID_WIKI_NAME );
118 - $this->type( "config__AdminPassword", VALID_PASSWORD );
119 - $this->type( "config__AdminPassword2", " " );
120 - parent::clickContinueButton();
121 - $this->assertEquals( "The two passwords you entered do not match.",
122 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
123 -
124 -
125 - // Verify warning message for the different'Password' and 'Password again'
126 - $this->type( "config_wgSitename", VALID_WIKI_NAME );
127 - $this->type( "config__AdminPassword", VALID_PASSWORD );
128 - $this->type( "config__AdminPassword2", INVALID_PASSWORD_AGAIN );
129 - parent::clickContinueButton();
130 - $this->assertEquals( "The two passwords you entered do not match.",
131 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
132 - }
133 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiErrorsNamepageTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+/*
 32+ * Test Case ID : 10 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 33+ * Test Case Name : Invalid/ blank values for fields in 'Name' page.
 34+ * Version : MediaWiki 1.18alpha
 35+*/
 36+
 37+require_once 'MediaWikiInstallationCommonFunction.php';
 38+
 39+class MediaWikiErrorsNamepageTestCase extends MediaWikiInstallationCommonFunction {
 40+
 41+ function setUp() {
 42+ parent::setUp();
 43+ }
 44+
 45+ // Verify warning message for the 'Name' page
 46+ public function testErrorsNamePage(){
 47+
 48+ $databaseName = DB_NAME_PREFIX."_error_name";
 49+
 50+ parent::navigateNamePage( $databaseName );
 51+
 52+ // Verify warning message for all blank fields
 53+ parent::clickContinueButton();
 54+ $this->assertEquals( "Enter a site name.",
 55+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 56+ $this->assertEquals( "Enter an administrator username.",
 57+ $this->getText( "//div[@id='bodyContent']/div/div/div[3]/div[2]" ));
 58+ $this->assertEquals( "Enter a password for the administrator account.",
 59+ $this->getText( "//div[@id='bodyContent']/div/div/div[4]/div[2]" ));
 60+
 61+ // Verify warning message for the blank 'Site name'
 62+ $this->type( "config__AdminName", VALID_YOUR_NAME );
 63+ $this->type( "config__AdminPassword", VALID_PASSWORD );
 64+ $this->type( "config__AdminPassword2", VALID_PASSWORD_AGAIN );
 65+ parent::clickContinueButton();
 66+ $this->assertEquals( "Enter a site name.",
 67+ $this->getText(" //div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 68+
 69+ // Input valid 'Site name'
 70+ $this->type( "config_wgSitename", VALID_WIKI_NAME );
 71+
 72+
 73+ // Verify warning message for the invalid "Project namespace'
 74+ $this->click( "config__NamespaceType_other" );
 75+ $this->type( "config_wgMetaNamespace", INVALID_NAMESPACE );
 76+ parent::clickContinueButton();
 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]" ));
 79+
 80+
 81+ // Verify warning message for the blank 'Project namespace'
 82+ $this->type( "config_wgSitename", VALID_WIKI_NAME );
 83+ $this->click( "config__NamespaceType_other" );
 84+ $this->type( "config_wgMetaNamespace" , "" );
 85+ parent::clickContinueButton();
 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]" ));
 88+
 89+
 90+ // Valid 'Project namespace'
 91+ $this->click( "config__NamespaceType_other" );
 92+ $this->type( "config_wgMetaNamespace", VALID_NAMESPACE );
 93+ parent::clickContinueButton();
 94+
 95+
 96+ // Valid 'Site name'
 97+ $this->click( "config__NamespaceType_site-name" );
 98+ $this->type( "config_wgSitename", VALID_WIKI_NAME );
 99+
 100+
 101+ // Verify warning message for blank 'Your name'
 102+ $this->type( "config__AdminName", " " );
 103+ parent::clickContinueButton();
 104+ $this->assertEquals( "Enter an administrator username.",
 105+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 106+
 107+
 108+ // Verify warning message for blank 'Password'
 109+ $this->type( "config__AdminName", VALID_YOUR_NAME );
 110+ $this->type( "config__AdminPassword", " " );
 111+ parent::clickContinueButton();
 112+ $this->assertEquals( "Enter a password for the administrator account.",
 113+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 114+
 115+
 116+ // Verify warning message for the blank 'Password again'
 117+ $this->type( "config_wgSitename", VALID_WIKI_NAME );
 118+ $this->type( "config__AdminPassword", VALID_PASSWORD );
 119+ $this->type( "config__AdminPassword2", " " );
 120+ parent::clickContinueButton();
 121+ $this->assertEquals( "The two passwords you entered do not match.",
 122+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 123+
 124+
 125+ // Verify warning message for the different'Password' and 'Password again'
 126+ $this->type( "config_wgSitename", VALID_WIKI_NAME );
 127+ $this->type( "config__AdminPassword", VALID_PASSWORD );
 128+ $this->type( "config__AdminPassword2", INVALID_PASSWORD_AGAIN );
 129+ parent::clickContinueButton();
 130+ $this->assertEquals( "The two passwords you entered do not match.",
 131+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 132+ }
 133+}
Property changes on: trunk/phase3/tests/installer/MediaWikiErrorsNamepageTestCase.php
___________________________________________________________________
Added: svn:eol-style
134134 + native
Index: trunk/phase3/tests/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php
@@ -1,127 +1,127 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiErrorsConnectToDatabasePageTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : Invalid/ blank values for fields in 'Connect to database' page.
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp(){
43 - parent::setUp();
44 - }
45 -
46 - // Verify warning messages for the 'Connet to database' page
47 - public function testErrorsConnectToDatabasePage(){
48 -
49 - parent::navigateConnetToDatabasePage();
50 -
51 - // Verify warning mesage for invalid database host
52 - $this->type( "mysql_wgDBserver", INVALID_DB_HOST );
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 -
57 - // Verify warning message for the blank database host
58 - $this->type( "mysql_wgDBserver", "" );
59 - parent::clickContinueButton();
60 - $this->assertEquals( "MySQL 4.0.14 or later is required, you have .",
61 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
62 -
63 - // Valid Database Host
64 - $this->type( "mysql_wgDBserver", VALID_DB_HOST );
65 -
66 - // Verify warning message for the invalid database name
67 - $this->type( "mysql_wgDBname", INVALID_DB_NAME );
68 - 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]" ));
71 -
72 - // Verify warning message for the blank database name
73 - $this->type( "mysql_wgDBname", "");
74 - parent::clickContinueButton();
75 - $this->assertEquals( "You must enter a value for \"Database name\"",
76 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
77 -
78 - // valid Database name
79 - $this->type( "mysql_wgDBname", VALID_DB_NAME);
80 -
81 - // Verify warning message for the invalid databaase prefix
82 - $this->type( "mysql_wgDBprefix", INVALID_DB_PREFIX );
83 - 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->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
86 -
87 - // Valid Database prefix
88 - $this->type( "mysql_wgDBprefix", VALID_DB_PREFIX );
89 -
90 - // Verify warning message for the invalid database user name
91 - $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
92 - 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]" ));
95 -
96 -
97 - // Verify warning message for the invalid database user name
98 - $this->type( "mysql__InstallUser", "" );
99 - 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 -
103 - // Valid Database username
104 - $this->type( "mysql__InstallUser", VALID_DB_USER_NAME );
105 -
106 - // Verify warning message for the invalid password
107 - $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
108 - 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 -
112 - // Verify warning message for the invalid username and password
113 - $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
114 - $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
115 - 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]" ));
118 -
119 - // Valid username and valid password
120 - $this->type( "mysql__InstallUser", VALID_DB_USER_NAME );
121 - $this->type( "mysql__InstallPassword", "" );
122 - parent::clickContinueButton();
123 -
124 - // successfully completes the 'Connect to database' page
125 - $this->assertEquals( "Database settings",
126 - $this->getText("//div[@id='bodyContent']/div/div/h2" ));
127 - }
128 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiErrorsConnectToDatabasePageTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 09 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : Invalid/ blank values for fields in 'Connect to database' page.
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiErrorsConnectToDatabasePageTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp(){
 43+ parent::setUp();
 44+ }
 45+
 46+ // Verify warning messages for the 'Connet to database' page
 47+ public function testErrorsConnectToDatabasePage(){
 48+
 49+ parent::navigateConnetToDatabasePage();
 50+
 51+ // Verify warning mesage for invalid database host
 52+ $this->type( "mysql_wgDBserver", INVALID_DB_HOST );
 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+
 57+ // Verify warning message for the blank database host
 58+ $this->type( "mysql_wgDBserver", "" );
 59+ parent::clickContinueButton();
 60+ $this->assertEquals( "MySQL 4.0.14 or later is required, you have .",
 61+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 62+
 63+ // Valid Database Host
 64+ $this->type( "mysql_wgDBserver", VALID_DB_HOST );
 65+
 66+ // Verify warning message for the invalid database name
 67+ $this->type( "mysql_wgDBname", INVALID_DB_NAME );
 68+ 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]" ));
 71+
 72+ // Verify warning message for the blank database name
 73+ $this->type( "mysql_wgDBname", "");
 74+ parent::clickContinueButton();
 75+ $this->assertEquals( "You must enter a value for \"Database name\"",
 76+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 77+
 78+ // valid Database name
 79+ $this->type( "mysql_wgDBname", VALID_DB_NAME);
 80+
 81+ // Verify warning message for the invalid databaase prefix
 82+ $this->type( "mysql_wgDBprefix", INVALID_DB_PREFIX );
 83+ 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->getText( "//div[@id='bodyContent']/div/div/div[2]/div[2]" ));
 86+
 87+ // Valid Database prefix
 88+ $this->type( "mysql_wgDBprefix", VALID_DB_PREFIX );
 89+
 90+ // Verify warning message for the invalid database user name
 91+ $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
 92+ 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]" ));
 95+
 96+
 97+ // Verify warning message for the invalid database user name
 98+ $this->type( "mysql__InstallUser", "" );
 99+ 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+
 103+ // Valid Database username
 104+ $this->type( "mysql__InstallUser", VALID_DB_USER_NAME );
 105+
 106+ // Verify warning message for the invalid password
 107+ $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
 108+ 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+
 112+ // Verify warning message for the invalid username and password
 113+ $this->type( "mysql__InstallUser", INVALID_DB_USER_NAME );
 114+ $this->type( "mysql__InstallPassword", INVALID_DB_PASSWORD );
 115+ 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]" ));
 118+
 119+ // Valid username and valid password
 120+ $this->type( "mysql__InstallUser", VALID_DB_USER_NAME );
 121+ $this->type( "mysql__InstallPassword", "" );
 122+ parent::clickContinueButton();
 123+
 124+ // successfully completes the 'Connect to database' page
 125+ $this->assertEquals( "Database settings",
 126+ $this->getText("//div[@id='bodyContent']/div/div/h2" ));
 127+ }
 128+}
Property changes on: trunk/phase3/tests/installer/MediaWikiErrorsConnectToDatabasePageTestCase.php
___________________________________________________________________
Added: svn:eol-style
129129 + native
Property changes on: trunk/phase3/tests/installer/MediaWikiInstallerTestSuite.php
___________________________________________________________________
Added: svn:eol-style
130130 + native
Index: trunk/phase3/tests/installer/MediaWikiOnAlreadyInstalledTestCase.php
@@ -1,74 +1,74 @@
2 -<?php
3 -
4 -/**
5 - * Selenium server manager
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -
35 -/*
36 - * Test Case ID : 03 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
37 - * Test Case Name : Install mediawiki on a already installed Mediawiki.]
38 - * Version : MediaWiki 1.18alpha
39 -*/
40 -
41 -class MediaWikiOnAlreadyInstalledTestCase extends MediaWikiInstallationCommonFunction {
42 -
43 - function setUp() {
44 - parent::setUp();
45 - }
46 -
47 - // Install Mediawiki using 'MySQL' database type.
48 - public function testInstallOnAlreadyInstalled() {
49 -
50 - $databaseName = DB_NAME_PREFIX."_already_installed";
51 - parent::navigateInstallPage( $databaseName );
52 -
53 - // 'Options' page
54 - parent::clickBackButton();
55 -
56 - // Install page
57 - parent::clickContinueButton();
58 -
59 - // 'Install' page should display after the 'Option' page
60 - $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
61 -
62 - // Verify warning text displayed
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]" ));
65 -
66 - // Complete page
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" ));
72 - $this->chooseCancelOnNextConfirmation();
73 - parent::restartInstallation();
74 - }
75 -}
 2+<?php
 3+
 4+/**
 5+ * Selenium server manager
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+
 35+/*
 36+ * Test Case ID : 03 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 37+ * Test Case Name : Install mediawiki on a already installed Mediawiki.]
 38+ * Version : MediaWiki 1.18alpha
 39+*/
 40+
 41+class MediaWikiOnAlreadyInstalledTestCase extends MediaWikiInstallationCommonFunction {
 42+
 43+ function setUp() {
 44+ parent::setUp();
 45+ }
 46+
 47+ // Install Mediawiki using 'MySQL' database type.
 48+ public function testInstallOnAlreadyInstalled() {
 49+
 50+ $databaseName = DB_NAME_PREFIX."_already_installed";
 51+ parent::navigateInstallPage( $databaseName );
 52+
 53+ // 'Options' page
 54+ parent::clickBackButton();
 55+
 56+ // Install page
 57+ parent::clickContinueButton();
 58+
 59+ // 'Install' page should display after the 'Option' page
 60+ $this->assertEquals( "Install", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 61+
 62+ // Verify warning text displayed
 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]" ));
 65+
 66+ // Complete page
 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" ));
 72+ $this->chooseCancelOnNextConfirmation();
 73+ parent::restartInstallation();
 74+ }
 75+}
Property changes on: trunk/phase3/tests/installer/MediaWikiOnAlreadyInstalledTestCase.php
___________________________________________________________________
Added: svn:eol-style
7676 + native
Index: trunk/phase3/tests/installer/MediaWikiHelpFieldHintTestCase.php
@@ -1,144 +1,144 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiHelpFieldHintTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -/*
32 - * Test Case ID : 29 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
33 - * Test Case Name : Help field hint availability for the fields.
34 - * Version : MediaWiki 1.18alpha
35 -*/
36 -
37 -require_once 'MediaWikiInstallationCommonFunction.php';
38 -
39 -class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction {
40 -
41 - function setUp(){
42 - parent::setUp();
43 - }
44 -
45 -
46 - // Verify help field availability for the fields
47 - public function testMySQLConnectToDatabaseFieldHint(){
48 -
49 - parent::navigateConnetToDatabasePage();
50 -
51 - // Verify help field for 'Database host'
52 - $this->click( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[1]" );
53 - $this->assertEquals( MYSQL_DATABASE_HOST_HELP,
54 - $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[2]" ) );
55 -
56 - // Verify help field for 'Database name'
57 - $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[1]" );
58 - $this->assertEquals( MYSQL_DATABASE_NAME_HELP,
59 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]" ));
60 -
61 -
62 - // Verify help field for 'Database table prefix'
63 - $this->click("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/div/span[1]" );
64 - $this->assertEquals(MYSQL_DATABASE_TABLE_PREFIX_HELP,
65 - $this->getText("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]/p[1]" ));
66 -
67 - // Verify help field for 'Database username'
68 - $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[1]" );
69 - $this->assertEquals( MYSQL_DATBASE_USERNAME_HELP,
70 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[2]" ));
71 -
72 - // Verify help field for 'Database password'
73 - $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[1]" );
74 - $this->assertEquals( MYSQL_DATABASE_PASSWORD_HELP,
75 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[2]/p" ));
76 - }
77 -
78 -
79 - public function testSQLiteConnectToDatabaseFieldHint(){
80 -
81 - parent::navigateConnetToDatabasePage();
82 - $this->click( "DBType_sqlite" );
83 -
84 - // Verify help field for 'SQLite data directory'
85 - $this->click( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[1]" );
86 - $this->assertEquals( SQLITE_DATA_DIRECTORY_HELP,
87 - $this->getText( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[2]" ));
88 -
89 - // Verify help field for 'Database name'
90 - $this->click( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[1]" );
91 - $this->assertEquals( SQLITE_DATABASE_NAME_HELP , $this->getText( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[2]/p" ));
92 - }
93 -
94 -
95 - public function testDatabaseSettingsFieldHint(){
96 -
97 - $databaseName = DB_NAME_PREFIX."_db_field";
98 - parent::navigateDatabaseSettingsPage($databaseName);
99 -
100 - // Verify help field for 'Search engine'
101 - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[1]" );
102 - $this->assertEquals( SEARCH_ENGINE_HELP,
103 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[2]" ));
104 -
105 - // Verify help field for 'Database character set'
106 - $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[1]" );
107 - $this->assertEquals( DATABASE_CHARACTER_SET_HELP,
108 - $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[2]"));
109 - parent::restartInstallation();
110 - }
111 -
112 -
113 - public function testNameFieldHint(){
114 -
115 - $databaseName = DB_NAME_PREFIX."_name_field";
116 - parent::navigateNamePage( $databaseName );
117 -
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]" );
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" ));
122 -
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]" );
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"));
127 -
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]" );
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" ));
132 -
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]" );
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" ));
137 -
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]" );
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" ));
142 - parent::restartInstallation();
143 - }
144 -}
145 -
 2+<?php
 3+
 4+/**
 5+ * MediaWikiHelpFieldHintTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+/*
 32+ * Test Case ID : 29 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 33+ * Test Case Name : Help field hint availability for the fields.
 34+ * Version : MediaWiki 1.18alpha
 35+*/
 36+
 37+require_once 'MediaWikiInstallationCommonFunction.php';
 38+
 39+class MediaWikiHelpFieldHintTestCase extends MediaWikiInstallationCommonFunction {
 40+
 41+ function setUp(){
 42+ parent::setUp();
 43+ }
 44+
 45+
 46+ // Verify help field availability for the fields
 47+ public function testMySQLConnectToDatabaseFieldHint(){
 48+
 49+ parent::navigateConnetToDatabasePage();
 50+
 51+ // Verify help field for 'Database host'
 52+ $this->click( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[1]" );
 53+ $this->assertEquals( MYSQL_DATABASE_HOST_HELP,
 54+ $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/div/span[2]" ) );
 55+
 56+ // Verify help field for 'Database name'
 57+ $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[1]" );
 58+ $this->assertEquals( MYSQL_DATABASE_NAME_HELP,
 59+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]" ));
 60+
 61+
 62+ // Verify help field for 'Database table prefix'
 63+ $this->click("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/div/span[1]" );
 64+ $this->assertEquals(MYSQL_DATABASE_TABLE_PREFIX_HELP,
 65+ $this->getText("//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/div/span[2]/p[1]" ));
 66+
 67+ // Verify help field for 'Database username'
 68+ $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[1]" );
 69+ $this->assertEquals( MYSQL_DATBASE_USERNAME_HELP,
 70+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/div/span[2]" ));
 71+
 72+ // Verify help field for 'Database password'
 73+ $this->click( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[1]" );
 74+ $this->assertEquals( MYSQL_DATABASE_PASSWORD_HELP,
 75+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/div/span[2]/p" ));
 76+ }
 77+
 78+
 79+ public function testSQLiteConnectToDatabaseFieldHint(){
 80+
 81+ parent::navigateConnetToDatabasePage();
 82+ $this->click( "DBType_sqlite" );
 83+
 84+ // Verify help field for 'SQLite data directory'
 85+ $this->click( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[1]" );
 86+ $this->assertEquals( SQLITE_DATA_DIRECTORY_HELP,
 87+ $this->getText( "//div[@id='DB_wrapper_sqlite']/div[1]/div[1]/div/span[2]" ));
 88+
 89+ // Verify help field for 'Database name'
 90+ $this->click( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[1]" );
 91+ $this->assertEquals( SQLITE_DATABASE_NAME_HELP , $this->getText( "//div[@id='DB_wrapper_sqlite']/div[2]/div[1]/div/span[2]/p" ));
 92+ }
 93+
 94+
 95+ public function testDatabaseSettingsFieldHint(){
 96+
 97+ $databaseName = DB_NAME_PREFIX."_db_field";
 98+ parent::navigateDatabaseSettingsPage($databaseName);
 99+
 100+ // Verify help field for 'Search engine'
 101+ $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[1]" );
 102+ $this->assertEquals( SEARCH_ENGINE_HELP,
 103+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/span[2]" ));
 104+
 105+ // Verify help field for 'Database character set'
 106+ $this->click( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[1]" );
 107+ $this->assertEquals( DATABASE_CHARACTER_SET_HELP,
 108+ $this->getText("//div[@id='bodyContent']/div/div/div[2]/form/div[4]/span[2]"));
 109+ parent::restartInstallation();
 110+ }
 111+
 112+
 113+ public function testNameFieldHint(){
 114+
 115+ $databaseName = DB_NAME_PREFIX."_name_field";
 116+ parent::navigateNamePage( $databaseName );
 117+
 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]" );
 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" ));
 122+
 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]" );
 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"));
 127+
 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]" );
 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" ));
 132+
 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]" );
 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" ));
 137+
 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]" );
 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" ));
 142+ parent::restartInstallation();
 143+ }
 144+}
 145+
Property changes on: trunk/phase3/tests/installer/MediaWikiHelpFieldHintTestCase.php
___________________________________________________________________
Added: svn:eol-style
146146 + native
Property changes on: trunk/phase3/tests/installer/MediaWikiInstallationCommonFunction.php
___________________________________________________________________
Added: svn:eol-style
147147 + native
Index: trunk/phase3/tests/installer/MediaWikiUpgradeExistingDatabaseTestCase.php
@@ -1,113 +1,113 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiUpgradeExistingDatabaseTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 05 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : Install Mediawiki by updating the existing database.
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -
41 -class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationCommonFunction {
42 -
43 - function setUp(){
44 - parent::setUp();
45 - }
46 -
47 - // Install Mediawiki using 'MySQL' database type.
48 - public function testUpgradeExistingDatabase(){
49 -
50 - $databaseName = DB_NAME_PREFIX."_upgrade_existing";
51 - parent::navigateInstallPage( $databaseName );
52 -
53 - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
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.",
56 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
57 -
58 - // 'Optionis' page
59 - parent::clickBackButton();
60 -
61 - // 'Name' page
62 - parent::clickBackButton();
63 -
64 - // 'Database settings' page
65 - parent::clickBackButton();
66 -
67 - // 'Connect to database' page
68 - parent::clickBackButton();
69 - $this->type( "mysql_wgDBname", $databaseName );
70 - parent::clickContinueButton();
71 -
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" ));
74 -
75 - // Warning message displayed.
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]" ));
78 -
79 - parent::clickContinueButton();
80 - $this->assertEquals( "Upgrade existing installation",
81 - $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
82 -
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]"));
86 -
87 - $this->assertTrue($this->isElementPresent( "submit-regenerate" ));
88 - $this->click( "submit-regenerate" );
89 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
90 - $this->assertEquals( "Database settings",
91 - $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
92 -
93 - // 'Database settings' page
94 - parent::clickContinueButton();
95 -
96 - // Name page
97 - parent::completeNamePage();
98 -
99 - // Options page
100 - parent::clickContinueButton();
101 -
102 - // 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.",
104 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
105 - parent::clickContinueButton();
106 -
107 - // 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" ));
111 - $this->chooseCancelOnNextConfirmation();
112 - parent::restartInstallation();
113 - }
114 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiUpgradeExistingDatabaseTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 05 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : Install Mediawiki by updating the existing database.
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+
 41+class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationCommonFunction {
 42+
 43+ function setUp(){
 44+ parent::setUp();
 45+ }
 46+
 47+ // Install Mediawiki using 'MySQL' database type.
 48+ public function testUpgradeExistingDatabase(){
 49+
 50+ $databaseName = DB_NAME_PREFIX."_upgrade_existing";
 51+ parent::navigateInstallPage( $databaseName );
 52+
 53+ $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
 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.",
 56+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
 57+
 58+ // 'Optionis' page
 59+ parent::clickBackButton();
 60+
 61+ // 'Name' page
 62+ parent::clickBackButton();
 63+
 64+ // 'Database settings' page
 65+ parent::clickBackButton();
 66+
 67+ // 'Connect to database' page
 68+ parent::clickBackButton();
 69+ $this->type( "mysql_wgDBname", $databaseName );
 70+ parent::clickContinueButton();
 71+
 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" ));
 74+
 75+ // Warning message displayed.
 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]" ));
 78+
 79+ parent::clickContinueButton();
 80+ $this->assertEquals( "Upgrade existing installation",
 81+ $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 82+
 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]"));
 86+
 87+ $this->assertTrue($this->isElementPresent( "submit-regenerate" ));
 88+ $this->click( "submit-regenerate" );
 89+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 90+ $this->assertEquals( "Database settings",
 91+ $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 92+
 93+ // 'Database settings' page
 94+ parent::clickContinueButton();
 95+
 96+ // Name page
 97+ parent::completeNamePage();
 98+
 99+ // Options page
 100+ parent::clickContinueButton();
 101+
 102+ // 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.",
 104+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
 105+ parent::clickContinueButton();
 106+
 107+ // 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" ));
 111+ $this->chooseCancelOnNextConfirmation();
 112+ parent::restartInstallation();
 113+ }
 114+}
Property changes on: trunk/phase3/tests/installer/MediaWikiUpgradeExistingDatabaseTestCase.php
___________________________________________________________________
Added: svn:eol-style
115115 + native
Index: trunk/phase3/tests/installer/MediaWikiButtonsAvailabilityTestCase.php
@@ -1,118 +1,118 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiButtonsAvailabilityTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name :'Back' and 'Continue' button availability
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiButtonsAvailabilityTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp() {
43 - parent::setUp();
44 - }
45 -
46 -
47 - // Verify only 'Continue' button available on 'Language' page
48 - public function testOnlyContinueButtonAvailability() {
49 -
50 - parent::navigateLanguagePage();
51 -
52 - // Verify only 'Continue' button avaialble
53 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
54 -
55 - // 'Back' button is not avaialble
56 - $this->assertElementNotPresent( "submit-back" );
57 - }
58 -
59 -
60 - // Verify 'Continue' and 'Back' buttons availability
61 - public function testBothButtonsAvailability() {
62 -
63 - // Verify buttons availability on 'Welcome to MediaWiki' page
64 - parent::navigateWelcometoMediaWikiPage();
65 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
66 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
67 - parent::restartInstallation();
68 -
69 - // Verify buttons availability on 'Connect to Database' page
70 - parent::navigateConnetToDatabasePage();
71 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
72 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
73 - parent::restartInstallation();
74 -
75 - // Verify buttons availability on 'Database settings' page
76 - $databaseName = DB_NAME_PREFIX."_db_settings";
77 - parent::navigateDatabaseSettingsPage( $databaseName );
78 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
79 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
80 - parent::restartInstallation();
81 -
82 - // Verify buttons availability on 'Name' page
83 - $databaseName = DB_NAME_PREFIX."_name";
84 - parent::navigateNamePage( $databaseName );
85 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
86 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
87 - parent::restartInstallation();
88 -
89 - // Verify buttons availability on 'Options' page
90 - $databaseName = DB_NAME_PREFIX."_options";
91 - parent::navigateOptionsPage( $databaseName );
92 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
93 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
94 - parent::restartInstallation();
95 -
96 - // Verify buttons availability on 'Install' page
97 - $databaseName = DB_NAME_PREFIX."_install";
98 - parent::navigateInstallPage($databaseName);
99 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
100 - $this->assertTrue( $this->isElementPresent( "submit-continue" ));
101 - }
102 -
103 -
104 - // Verify only 'Back' button available on 'Complete' page
105 - public function testOnlyBackButtonAvailability() {
106 -
107 - // Verify only 'Back' button available
108 - $databaseName = DB_NAME_PREFIX."_back";
109 - parent::navigateCompletePage( $databaseName );
110 -
111 - // Only 'Back' button available
112 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
113 -
114 - // 'Continue' button is not available
115 - $this->assertElementNotPresent( "submit-continue" );
116 - parent::restartInstallation();
117 - }
118 -}
119 -
 2+<?php
 3+
 4+/**
 5+ * MediaWikiButtonsAvailabilityTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 30 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name :'Back' and 'Continue' button availability
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiButtonsAvailabilityTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp() {
 43+ parent::setUp();
 44+ }
 45+
 46+
 47+ // Verify only 'Continue' button available on 'Language' page
 48+ public function testOnlyContinueButtonAvailability() {
 49+
 50+ parent::navigateLanguagePage();
 51+
 52+ // Verify only 'Continue' button avaialble
 53+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 54+
 55+ // 'Back' button is not avaialble
 56+ $this->assertElementNotPresent( "submit-back" );
 57+ }
 58+
 59+
 60+ // Verify 'Continue' and 'Back' buttons availability
 61+ public function testBothButtonsAvailability() {
 62+
 63+ // Verify buttons availability on 'Welcome to MediaWiki' page
 64+ parent::navigateWelcometoMediaWikiPage();
 65+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 66+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 67+ parent::restartInstallation();
 68+
 69+ // Verify buttons availability on 'Connect to Database' page
 70+ parent::navigateConnetToDatabasePage();
 71+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 72+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 73+ parent::restartInstallation();
 74+
 75+ // Verify buttons availability on 'Database settings' page
 76+ $databaseName = DB_NAME_PREFIX."_db_settings";
 77+ parent::navigateDatabaseSettingsPage( $databaseName );
 78+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 79+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 80+ parent::restartInstallation();
 81+
 82+ // Verify buttons availability on 'Name' page
 83+ $databaseName = DB_NAME_PREFIX."_name";
 84+ parent::navigateNamePage( $databaseName );
 85+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 86+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 87+ parent::restartInstallation();
 88+
 89+ // Verify buttons availability on 'Options' page
 90+ $databaseName = DB_NAME_PREFIX."_options";
 91+ parent::navigateOptionsPage( $databaseName );
 92+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 93+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 94+ parent::restartInstallation();
 95+
 96+ // Verify buttons availability on 'Install' page
 97+ $databaseName = DB_NAME_PREFIX."_install";
 98+ parent::navigateInstallPage($databaseName);
 99+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 100+ $this->assertTrue( $this->isElementPresent( "submit-continue" ));
 101+ }
 102+
 103+
 104+ // Verify only 'Back' button available on 'Complete' page
 105+ public function testOnlyBackButtonAvailability() {
 106+
 107+ // Verify only 'Back' button available
 108+ $databaseName = DB_NAME_PREFIX."_back";
 109+ parent::navigateCompletePage( $databaseName );
 110+
 111+ // Only 'Back' button available
 112+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 113+
 114+ // 'Continue' button is not available
 115+ $this->assertElementNotPresent( "submit-continue" );
 116+ parent::restartInstallation();
 117+ }
 118+}
 119+
Property changes on: trunk/phase3/tests/installer/MediaWikiButtonsAvailabilityTestCase.php
___________________________________________________________________
Added: svn:eol-style
120120 + native
Index: trunk/phase3/tests/installer/MediaWikiMySQLDataBaseTestCase.php
@@ -1,83 +1,83 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiOnAlreadyInstalledTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 01 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : Install Mediawiki using 'MySQL' database type successfully
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp(){
43 - parent::setUp();
44 - }
45 -
46 - // Verify MediaWiki installation using 'MySQL' database type
47 - public function testMySQLDatabaseSuccess(){
48 -
49 - $databaseName = DB_NAME_PREFIX."_sql_db";
50 -
51 - parent::navigateConnetToDatabasePage();
52 -
53 - // Verify 'MySQL" is selected as the default database type
54 - $this->assertEquals( "MySQL settings", $this->getText( "//div[@id='DB_wrapper_mysql']/h3" ));
55 -
56 - // Change 'Database name'
57 - $defaultDbName = $this->getText( "mysql_wgDBname" );
58 - $this->type( "mysql_wgDBname", " ");
59 - $this->type( "mysql_wgDBname", $databaseName );
60 - $this->assertNotEquals( $defaultDbName, $databaseName );
61 -
62 - // 'Database settings' page
63 - parent::clickContinueButton();
64 -
65 - // 'Name' page
66 - parent::clickContinueButton();
67 - parent::completeNamePage();
68 -
69 - // 'Options page
70 - parent::clickContinueButton();
71 -
72 - // 'Install' page
73 - parent::clickContinueButton();
74 -
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" ));
82 - parent::restartInstallation();
83 - }
84 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiOnAlreadyInstalledTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 01 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : Install Mediawiki using 'MySQL' database type successfully
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiMySQLDataBaseTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp(){
 43+ parent::setUp();
 44+ }
 45+
 46+ // Verify MediaWiki installation using 'MySQL' database type
 47+ public function testMySQLDatabaseSuccess(){
 48+
 49+ $databaseName = DB_NAME_PREFIX."_sql_db";
 50+
 51+ parent::navigateConnetToDatabasePage();
 52+
 53+ // Verify 'MySQL" is selected as the default database type
 54+ $this->assertEquals( "MySQL settings", $this->getText( "//div[@id='DB_wrapper_mysql']/h3" ));
 55+
 56+ // Change 'Database name'
 57+ $defaultDbName = $this->getText( "mysql_wgDBname" );
 58+ $this->type( "mysql_wgDBname", " ");
 59+ $this->type( "mysql_wgDBname", $databaseName );
 60+ $this->assertNotEquals( $defaultDbName, $databaseName );
 61+
 62+ // 'Database settings' page
 63+ parent::clickContinueButton();
 64+
 65+ // 'Name' page
 66+ parent::clickContinueButton();
 67+ parent::completeNamePage();
 68+
 69+ // 'Options page
 70+ parent::clickContinueButton();
 71+
 72+ // 'Install' page
 73+ parent::clickContinueButton();
 74+
 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" ));
 82+ parent::restartInstallation();
 83+ }
 84+}
Property changes on: trunk/phase3/tests/installer/MediaWikiMySQLDataBaseTestCase.php
___________________________________________________________________
Added: svn:eol-style
8585 + native
Property changes on: trunk/phase3/tests/installer/MediaWikiInstallationConfig.php
___________________________________________________________________
Added: svn:eol-style
8686 + native
Index: trunk/phase3/tests/installer/MediaWikiMySQLiteDataBaseTestCase.php
@@ -1,84 +1,84 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiMySQLiteataBaseTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 06 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : Install Mediawiki using 'MySQL' database type successfully
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiMySQLiteDataBaseTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp() {
43 - parent::setUp();
44 - }
45 -
46 - // Verify MediaWiki installation using 'MySQL' database type
47 - public function testMySQLDatabaseSuccess() {
48 -
49 - $databaseName = DB_NAME_PREFIX."_sqlite_db";
50 -
51 - parent::navigateConnetToDatabasePage();
52 - $this->click( "DBType_sqlite" );
53 -
54 - // Select 'SQLite' database type
55 - $this->assertEquals( "SQLite settings", $this->getText( "//div[@id='DB_wrapper_sqlite']/h3" ));
56 -
57 - // Change database name
58 - $defaultDbName = $this->getText( "sqlite_wgDBname" );
59 - $this->type( "sqlite_wgDBname", " ");
60 - $this->type( "sqlite_wgDBname", $databaseName );
61 - $this->assertNotEquals( $defaultDbName, $databaseName );
62 -
63 - // 'Database settings' page
64 - parent::clickContinueButton();
65 -
66 - // 'Name' page
67 - parent::clickContinueButton();
68 - parent::completeNamePage();
69 -
70 - // 'Options page
71 - parent::clickContinueButton();
72 -
73 - // 'Install' page
74 - parent::clickContinueButton();
75 -
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" ));
83 - parent::restartInstallation();
84 - }
85 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiMySQLiteataBaseTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 06 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : Install Mediawiki using 'MySQL' database type successfully
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiMySQLiteDataBaseTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp() {
 43+ parent::setUp();
 44+ }
 45+
 46+ // Verify MediaWiki installation using 'MySQL' database type
 47+ public function testMySQLDatabaseSuccess() {
 48+
 49+ $databaseName = DB_NAME_PREFIX."_sqlite_db";
 50+
 51+ parent::navigateConnetToDatabasePage();
 52+ $this->click( "DBType_sqlite" );
 53+
 54+ // Select 'SQLite' database type
 55+ $this->assertEquals( "SQLite settings", $this->getText( "//div[@id='DB_wrapper_sqlite']/h3" ));
 56+
 57+ // Change database name
 58+ $defaultDbName = $this->getText( "sqlite_wgDBname" );
 59+ $this->type( "sqlite_wgDBname", " ");
 60+ $this->type( "sqlite_wgDBname", $databaseName );
 61+ $this->assertNotEquals( $defaultDbName, $databaseName );
 62+
 63+ // 'Database settings' page
 64+ parent::clickContinueButton();
 65+
 66+ // 'Name' page
 67+ parent::clickContinueButton();
 68+ parent::completeNamePage();
 69+
 70+ // 'Options page
 71+ parent::clickContinueButton();
 72+
 73+ // 'Install' page
 74+ parent::clickContinueButton();
 75+
 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" ));
 83+ parent::restartInstallation();
 84+ }
 85+}
Property changes on: trunk/phase3/tests/installer/MediaWikiMySQLiteDataBaseTestCase.php
___________________________________________________________________
Added: svn:eol-style
8686 + native
Index: trunk/phase3/tests/installer/MediaWikiRightFrameworkLinksTestCase.php
@@ -1,93 +1,93 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiRightFrameworkLinksTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : User selects 'Read me' link.
37 - * User selects 'Release notes' link.
38 - * User selects 'Copying' link.
39 - * User selects 'Upgrading' link.
40 - * Version : MediaWiki 1.18alpha
41 -*/
42 -
43 -
44 -class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction{
45 -
46 - function setUp(){
47 - parent::setUp();
48 - }
49 -
50 - public function testLinksAvailability(){
51 -
52 - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
53 -
54 - // Verify 'Read me' link availability
55 - $this->assertTrue($this->isElementPresent( "link=Read me" ));
56 -
57 - // Verify 'Release notes' link availability
58 - $this->assertTrue($this->isElementPresent( "link=Release notes" ));
59 -
60 - // Verify 'Copying' link availability
61 - $this->assertTrue($this->isElementPresent( "link=Copying" ));
62 - }
63 -
64 - public function testPageNavigation(){
65 -
66 - $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
67 -
68 - // Navigate to the 'Read me' page
69 - $this->click( "link=Read me" );
70 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
71 - $this->assertEquals( "Read me", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
72 - $this->assertTrue($this->isElementPresent( "submit-back" ));
73 - parent::clickBackButton();
74 -
75 - // Navigate to the 'Release notes' page
76 - $this->click( "link=Release notes" );
77 - $this->waitForPageToLoad( PAGE_LOAD_TIME);
78 - $this->assertEquals( "Release notes", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
79 - $this->assertTrue( $this->isElementPresent( "submit-back" ));
80 - parent::clickBackButton();
81 -
82 - // Navigate to the 'Copying' page
83 - $this->click( "link=Copying" );
84 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
85 - $this->assertEquals( "Copying", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
86 - $this->assertTrue($this->isElementPresent( "submit-back" ));
87 - parent::clickBackButton();
88 -
89 - // Navigate to the 'Upgrading' page
90 - $this->click( "link=Upgrading" );
91 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
92 - $this->assertEquals( "Upgrading", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
93 - }
94 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiRightFrameworkLinksTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : User selects 'Read me' link.
 37+ * User selects 'Release notes' link.
 38+ * User selects 'Copying' link.
 39+ * User selects 'Upgrading' link.
 40+ * Version : MediaWiki 1.18alpha
 41+*/
 42+
 43+
 44+class MediaWikiRightFrameworkLinksTestCase extends MediaWikiInstallationCommonFunction{
 45+
 46+ function setUp(){
 47+ parent::setUp();
 48+ }
 49+
 50+ public function testLinksAvailability(){
 51+
 52+ $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
 53+
 54+ // Verify 'Read me' link availability
 55+ $this->assertTrue($this->isElementPresent( "link=Read me" ));
 56+
 57+ // Verify 'Release notes' link availability
 58+ $this->assertTrue($this->isElementPresent( "link=Release notes" ));
 59+
 60+ // Verify 'Copying' link availability
 61+ $this->assertTrue($this->isElementPresent( "link=Copying" ));
 62+ }
 63+
 64+ public function testPageNavigation(){
 65+
 66+ $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" );
 67+
 68+ // Navigate to the 'Read me' page
 69+ $this->click( "link=Read me" );
 70+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 71+ $this->assertEquals( "Read me", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
 72+ $this->assertTrue($this->isElementPresent( "submit-back" ));
 73+ parent::clickBackButton();
 74+
 75+ // Navigate to the 'Release notes' page
 76+ $this->click( "link=Release notes" );
 77+ $this->waitForPageToLoad( PAGE_LOAD_TIME);
 78+ $this->assertEquals( "Release notes", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
 79+ $this->assertTrue( $this->isElementPresent( "submit-back" ));
 80+ parent::clickBackButton();
 81+
 82+ // Navigate to the 'Copying' page
 83+ $this->click( "link=Copying" );
 84+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 85+ $this->assertEquals( "Copying", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
 86+ $this->assertTrue($this->isElementPresent( "submit-back" ));
 87+ parent::clickBackButton();
 88+
 89+ // Navigate to the 'Upgrading' page
 90+ $this->click( "link=Upgrading" );
 91+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 92+ $this->assertEquals( "Upgrading", $this->getText( "//div[@id='bodyContent']/div/div/h2[1]" ));
 93+ }
 94+}
Property changes on: trunk/phase3/tests/installer/MediaWikiRightFrameworkLinksTestCase.php
___________________________________________________________________
Added: svn:eol-style
9595 + native
Index: trunk/phase3/tests/installer/MediaWikiUserInterfaceTestCase.php
@@ -1,522 +1,522 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiUserInterfaceTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -require_once 'MediaWikiInstallationCommonFunction.php';
32 -
33 -/*
34 - * Test Case ID : 18 - 27 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
35 - * Test Case Name : UI of MediaWiki initial/ Language/ Welcome to MediaWiki!/ Connect to database/
36 - * Database settings/ Name/ Options/ Install/ Complete/ Restart Inslation pages
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -
41 -class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction {
42 -
43 - function setUp() {
44 - $this->setBrowser("*chrome");
45 - $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/");
46 - }
47 -
48 -
49 - public function testInitialPageUI(){
50 -
51 - parent::navigateInitialpage();
52 -
53 - // MediaWiki logo available
54 - $this->assertTrue( $this->isElementPresent( "//img[@alt='The MediaWiki logo']" ));
55 -
56 - // 'MediaWiki 1.18alpha' text available
57 - $this->assertEquals( "MediaWiki 1.18alpha", $this->getText( "//h1" ));
58 -
59 - // 'LocalSettings.php not found.' text available
60 - $this->assertEquals( "LocalSettings.php not found.", $this->getText( "//p[1]" ));
61 -
62 - // 'Please set up the wiki first' text available
63 - $this->assertEquals( "Please set up the wiki first.", $this->getText( "//p[2]" ));
64 -
65 - // 'set up the wiki' link available
66 - $this->assertTrue($this->isElementPresent( "link=set up the wiki" ));
67 - }
68 -
69 -
70 - public function testlanguagePageUI(){
71 -
72 - parent::navigateLanguagePage();
73 -
74 - // Verify 'Language' heading
75 - $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
76 -
77 - // 'Your language' label available
78 - $this->assertEquals( "Your language:",
79 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" ));
80 -
81 - // 'Your language' dropdown available
82 - $this->assertTrue( $this->isElementPresent( "UserLang" ));
83 -
84 - // 'Wiki language' label available
85 - $this->assertEquals( "Wiki language:",
86 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" ));
87 -
88 - // 'Wiki language' dropdown available
89 - $this->assertTrue($this->isElementPresent( "ContLang" ));
90 - }
91 -
92 -
93 - public function testWelcometoMediaWikiUI(){
94 -
95 - parent::navigateWelcometoMediaWikiPage();
96 -
97 - // Verify 'Welcome to MediaWiki!' heading
98 - $this->assertEquals( "Welcome to MediaWiki!",
99 - $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
100 -
101 - // Verify environment ok text displayed.
102 - $this->assertEquals( "The environment has been checked.You can install MediaWiki.",
103 - $this->getText( "//div[@id='bodyContent']/div/div/div[7]/span" ));
104 - }
105 -
106 -
107 - public function testConnectToDatabaseUI(){
108 -
109 - parent::navigateConnetToDatabasePage();
110 -
111 - // 'MYSQL radio button available
112 - $this->assertEquals( "MySQL",
113 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" ));
114 - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]" ));
115 -
116 - // 'SQLite' radio button available
117 - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]" ));
118 - $this->assertEquals( "SQLite", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label "));
119 -
120 - // 'Database host' label available
121 - $this->assertEquals( "Database host:", $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/label" ));
122 -
123 - // 'Database host' text box default to 'localhost'
124 - $this->assertEquals( "localhost", $this->getValue( "mysql_wgDBserver" ));
125 -
126 - // 'Identify this wiki' section available
127 - $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" ));
128 -
129 - // 'Identify this wiki' label available
130 - $this->assertEquals( "Identify this wiki", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" ));
131 -
132 - // 'Database name' lable available
133 - $this->assertEquals( "Database name:",
134 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/label" ));
135 -
136 - // Verify 'Database name:' text box is default to 'my_wiki'
137 - $this->assertEquals( "my_wiki", $this->getValue( "mysql_wgDBname" ));
138 -
139 - // Verify 'Database table prefix:' label available
140 - $this->assertEquals( "Database table prefix:",
141 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/label" ));
142 -
143 - // 'User account for installation' section available
144 - $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" ));
145 -
146 - // 'User account for installation' label available
147 - $this->assertEquals( "User account for installation", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" ));
148 -
149 - // 'Database username' label available
150 - $this->assertEquals( "Database username:",
151 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/label" ));
152 -
153 - // 'Database username' text box defaults to 'root'
154 - $this->assertEquals("root", $this->getValue( "mysql__InstallUser" ));
155 -
156 - // 'Database password' label available
157 - $this->assertEquals( "Database password:",
158 - $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/label" ));
159 - }
160 -
161 -
162 -
163 - public function testDatabaseSettingsUI(){
164 -
165 - $databaseName = DB_NAME_PREFIX."_db_settings_UI";
166 - parent::navigateDatabaseSettingsPage( $databaseName );
167 -
168 - // 'Database settings' text available.
169 - $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
170 -
171 - // 'Database account for web access' section available
172 - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" ));
173 -
174 - // 'Database account for web access' label available
175 - $this->assertEquals( "Database account for web access", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" ));
176 -
177 - // 'Use the same account as for installation' check box available
178 - $this->assertEquals( "Use the same account as for installation", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/label" ));
179 -
180 - // 'Use the same account as for installation' check box is selected by default
181 - $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" ));
182 -
183 - // 'Use the same account as for installation' check box deselected
184 - $this->click( "mysql__SameAccount" );
185 -
186 - // verify 'Use the same account as for installation' check box is not selected
187 - $this->assertEquals( "off", $this->getValue( "mysql__SameAccount" ));
188 -
189 - // 'Database username' label available
190 - $this->assertEquals( "Database username:", $this->getText( "//div[@id='dbOtherAccount']/div[1]/div[1]/label" ));
191 -
192 - // 'Database username' text box is default to the 'wikiuser'
193 - $this->assertEquals( "wikiuser", $this->getValue( "mysql_wgDBuser" ));
194 -
195 - // 'Database password' label available
196 - $this->assertEquals( "Database password:", $this->getText( "//div[@id='dbOtherAccount']/div[2]/div[1]/label" ));
197 -
198 - // 'Create the account if it does not already exist' label available
199 - $this->assertEquals( "Create the account if it does not already exist", $this->getText( "//div[@id='dbOtherAccount']/div[4]/label" ));
200 -
201 - // 'Create the account if it does not already exist' check box is not selected by default
202 - $this->assertEquals( "off" , $this->getValue( "mysql__CreateDBAccount" ));
203 -
204 - // 'Create the account if it does not already exist' check box selected
205 - $this->click( "mysql__CreateDBAccount" );
206 -
207 - // Verify 'Create the account if it does not already exist' check box is selected
208 - $this->assertEquals( "on" , $this->getValue( "mysql__CreateDBAccount" ));
209 - $this->click( "mysql__SameAccount" );
210 - $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" ));
211 -
212 - // 'Storage engine' label available
213 - $this->assertEquals( "Storage engine:",
214 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label"));
215 -
216 - // 'InnoDB' label available
217 - $this->assertEquals( "InnoDB",
218 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[1]/label" ));
219 -
220 - // 'InnoDB' radio button available
221 - $this->assertTrue( $this->isElementPresent( "mysql__MysqlEngine_InnoDB" ));
222 -
223 - // 'MyISAM' label available
224 - $this->assertEquals( "MyISAM", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[2]/label" ));
225 -
226 - // 'MyISAM' radio button available
227 - $this->assertTrue($this->isElementPresent( "mysql__MysqlEngine_MyISAM" ));
228 -
229 - // 'Database character set' label available
230 - $this->assertEquals( "Database character set:",
231 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[1]/label" ));
232 -
233 - // 'Binary' radio button available
234 - $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_binary" ));
235 -
236 - // 'Binary' radio button available
237 - $this->assertEquals( "Binary", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[1]/label" ));
238 -
239 - // 'UTF-8' radio button available
240 - $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_utf8" ));
241 -
242 - // 'UTF-8' label available
243 - $this->assertEquals( "UTF-8", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[2]/label" ));
244 -
245 - // 'Binary' radio button is selected
246 - $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" ));
247 - }
248 -
249 - public function testNamePageUI(){
250 -
251 - $databaseName = DB_NAME_PREFIX."_name_UI";
252 - parent::navigateNamePage($databaseName);
253 -
254 - // 'Name of wiki' text box available
255 - $this->assertEquals( "Name of wiki:",
256 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" ));
257 -
258 - $this->assertTrue( $this->isElementPresent( "config_wgSitename" ));
259 -
260 - // 'Project namespace' label available
261 - $this->assertEquals( "Project namespace:",
262 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" ));
263 -
264 - // 'Same as the wiki name' radio button available
265 - $this->assertTrue( $this->isElementPresent( "config__NamespaceType_site-name" ));
266 -
267 - // 'Project' radio button available
268 - $this->assertTrue( $this->isElementPresent( "config__NamespaceType_generic" ));
269 -
270 - // 'Project' radio button available
271 - $this->assertTrue( $this->isElementPresent( "config__NamespaceType_other" ));
272 -
273 - // 'Same as the wiki name' label available
274 - $this->assertEquals( "Same as the wiki name:",
275 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" ));
276 -
277 - // 'Project' label available
278 - $this->assertEquals("Project",
279 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label" ));
280 -
281 - // 'Project' label available
282 - $this->assertEquals( "Other (specify)",
283 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[3]/label" ));
284 -
285 - // 'Same as the wiki name' radio button selected by default
286 - $this->assertEquals( "on", $this->getValue( "config__NamespaceType_site-name" ));
287 -
288 - // 'Administrator account' section available
289 - $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" ));
290 -
291 - // 'Administrator account' label available
292 - $this->assertEquals( "Administrator account",
293 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" ));
294 -
295 - // 'Your Name' label available
296 - $this->assertEquals( "Your name:",
297 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/div[1]/label" ));
298 -
299 - // 'Your Name' text box available
300 - $this->assertTrue( $this->isElementPresent( "config__AdminName" ));
301 -
302 - // 'Password' label available
303 - $this->assertEquals( "Password:",
304 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[2]/div[1]/label" ));
305 -
306 - // 'Password' text box available
307 - $this->assertTrue( $this->isElementPresent( "config__AdminPassword" ));
308 -
309 - // 'Password again' label available
310 - $this->assertEquals( "Password again:",
311 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[3]/div[1]/label" ));
312 -
313 - // 'Password again' text box available
314 - $this->assertTrue( $this->isElementPresent( "config__AdminPassword2" ));
315 -
316 - // 'Email address' label avaialble
317 - $this->assertEquals( "E-mail address:",
318 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[4]/div[1]/label" ));
319 -
320 - // 'Email address' text box available
321 - $this->assertTrue( $this->isElementPresent( "config__AdminEmail" ));
322 -
323 - // 'Subscribe to the release announcements mailing list. ' check box available
324 - $this->assertTrue( $this->isElementPresent( "config__Subscribe" ));
325 -
326 - // 'Subscribe to the release announcements mailing list. ' label avaialble
327 - $this->assertEquals( "Subscribe to the release announcements mailing list.",
328 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[5]/label" ));
329 -
330 - // 'release announcements mailing list' link available
331 - $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" ));
332 -
333 - // Message displayed
334 - $this->assertEquals( "You are almost done!You can now skip the remaining configuration and install the wiki right now.",
335 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/div[2]" ));
336 -
337 - // 'Ask me more questions.' radio button available
338 - $this->assertTrue( $this->isElementPresent( "config__SkipOptional_continue" ));
339 -
340 - // 'Ask me more questions.' label available
341 - $this->assertEquals( "Ask me more questions.",
342 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[1]/label" ));
343 -
344 - // 'I'm bored already, just install the wiki' radio button is avaiable
345 - $this->assertTrue( $this->isElementPresent( "config__SkipOptional_skip" ));
346 -
347 - // 'I'm bored already, just install the wiki' label available
348 - $this->assertEquals( "I'm bored already, just install the wiki.",
349 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[2]/label" ));
350 -
351 - // 'Ask me more questions.' radio button is default selected
352 - $this->assertEquals( "on", $this->getValue( "config__SkipOptional_continue" ));
353 - }
354 -
355 -
356 -
357 - public function testOptionPageUI(){
358 -
359 - $databaseName = DB_NAME_PREFIX."_options_UI";
360 - parent::navigateOptionsPage($databaseName);
361 -
362 - // 'Options' label available
363 - $this->assertEquals( "Options", $this->getText("//div[@id='bodyContent']/div/div/h2"));
364 -
365 - // 'Return e-mail address' label available
366 - $this->assertEquals( "Return e-mail address:", $this->getText( "//div[@id='emailwrapper']/div[1]/div[1]/label" ));
367 -
368 - // 'Return e-mail address' text box available
369 - $this->assertTrue( $this->isElementPresent( "config_wgPasswordSender" ));
370 -
371 - // Text 'apache@localhost' is default value of the 'Return e-mail address' text box
372 - $this->assertEquals( "apache@localhost", $this->getValue( "config_wgPasswordSender" ));
373 -
374 - // 'Logo URL' label available
375 - $this->assertEquals( "Logo URL:", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[3]/div[1]/label" ));
376 -
377 - // 'Logo URL' text box available
378 - $this->assertTrue( $this->isElementPresent( "config_wgLogo" ));
379 -
380 - // Correct path available in the 'Logo URL' text box
381 - $this->assertEquals( "/wiki/skins/common/images/wiki.png", $this->getValue( "config_wgLogo" ));
382 -
383 - // 'Enable file uploads' radio button available
384 - $this->assertTrue( $this->isElementPresent( "config_wgEnableUploads" ));
385 -
386 - // 'Enable file uploads' label available
387 - $this->assertEquals( "Enable file uploads",
388 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[1]/label" ));
389 -
390 - // 'Enable file uploads' check box is not selected
391 - $this->assertEquals( "off", $this->getValue( "config_wgEnableUploads" ));
392 -
393 - $this->click( "config_wgEnableUploads" );
394 -
395 - // 'Directory for deleted files' label available
396 - $this->assertEquals( "Directory for deleted files:",
397 - $this->getText( "//div[@id='uploadwrapper']/div/div[1]/label" ));
398 -
399 - // 'Directory for deleted files' text box available
400 - $this->assertTrue( $this->isElementPresent( "config_wgDeletedDirectory" ));
401 -
402 - // Correct path available in the 'Directory for deleted files' text box
403 - $this->assertEquals( "C:\\wamp\\www\\".DIRECTORY_NAME."/images/deleted",
404 - $this->getValue( "config_wgDeletedDirectory" ));
405 - }
406 -
407 -
408 -
409 - public function testInstallPageUI(){
410 -
411 - $databaseName = DB_NAME_PREFIX."_install_UI";
412 - parent::navigateInstallPage( $databaseName );
413 -
414 - // 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]" ));
424 - }
425 -
426 -
427 -
428 - public function testCompletePageUI(){
429 -
430 - $databaseName = DB_NAME_PREFIX."_complete_UI";
431 - parent::navigateCompletePage( $databaseName );
432 -
433 - // 'Congratulations!' text display
434 - $this->assertEquals( "Congratulations!",
435 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
436 -
437 - // 'LocalSettings.php' generated message display
438 - $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.",
439 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[2]" ));
440 -
441 - // 'Download LocalSettings.php'' link available
442 - $this->assertTrue( $this->isElementPresent( "link=Download LocalSettings.php" ));
443 -
444 - // 'enter your wiki' link available
445 - $this->assertTrue( $this->isElementPresent( "link=enter your wiki" ));
446 - }
447 -
448 -
449 -
450 - public function testRestartInstallation(){
451 -
452 - parent::navigateConnetToDatabasePage();
453 - $this->click( "link=Restart installation" );
454 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
455 -
456 - // Restart installation' label should be available.
457 - $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
458 -
459 - //'Do you want to clear all saved data that you have entered and restart the installation process?' label available
460 - $this->assertEquals( "Do you want to clear all saved data that you have entered and restart the installation process?",
461 - $this->getText( "//*[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
462 - // 'Back' button available
463 - $this->assertTrue($this->isElementPresent( "submit-back" ));
464 -
465 - // 'Restart' button available
466 - $this->assertTrue($this->isElementPresent( "submit-restart" ));
467 - }
468 -
469 -
470 -
471 - public function testMediaWikiLogoAvailability(){
472 -
473 - $databaseName = DB_NAME_PREFIX."_mediawiki_logo";
474 - parent::navigateInitialpage();
475 - parent::mediaWikiLogoPresentInitialScreen();
476 - $this->click( "link=set up the wiki" );
477 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
478 -
479 - // 'Language' page
480 - parent::mediaWikiLogoPresent();
481 - parent::clickContinueButton();
482 -
483 - // 'Welcome to MediaWiki' page
484 - parent::mediaWikiLogoPresent();
485 - parent::clickContinueButton();
486 -
487 - // 'Connet to database' page
488 - parent::mediaWikiLogoPresent();
489 - $this->type("mysql_wgDBname", $databaseName );
490 - parent::clickContinueButton();
491 -
492 - // 'Database setting' page
493 - parent::mediaWikiLogoPresent();
494 - parent::clickContinueButton();
495 -
496 - // 'Name' page
497 - parent::mediaWikiLogoPresent();
498 - parent::completeNamePage();
499 - parent::clickContinueButton();
500 -
501 - // 'Options' page
502 - parent::mediaWikiLogoPresent();
503 - parent::clickContinueButton();
504 -
505 - // 'Install' page
506 - parent::mediaWikiLogoPresent();
507 - }
508 -
509 -
510 - public function testRightFramework(){
511 -
512 - 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" ));
522 - }
523 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiUserInterfaceTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+require_once 'MediaWikiInstallationCommonFunction.php';
 32+
 33+/*
 34+ * Test Case ID : 18 - 27 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 35+ * Test Case Name : UI of MediaWiki initial/ Language/ Welcome to MediaWiki!/ Connect to database/
 36+ * Database settings/ Name/ Options/ Install/ Complete/ Restart Inslation pages
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+
 41+class MediaWikiUserInterfaceTestCase extends MediaWikiInstallationCommonFunction {
 42+
 43+ function setUp() {
 44+ $this->setBrowser("*chrome");
 45+ $this->setBrowserUrl("http://localhost:".PORT."/".DIRECTORY_NAME."/");
 46+ }
 47+
 48+
 49+ public function testInitialPageUI(){
 50+
 51+ parent::navigateInitialpage();
 52+
 53+ // MediaWiki logo available
 54+ $this->assertTrue( $this->isElementPresent( "//img[@alt='The MediaWiki logo']" ));
 55+
 56+ // 'MediaWiki 1.18alpha' text available
 57+ $this->assertEquals( "MediaWiki 1.18alpha", $this->getText( "//h1" ));
 58+
 59+ // 'LocalSettings.php not found.' text available
 60+ $this->assertEquals( "LocalSettings.php not found.", $this->getText( "//p[1]" ));
 61+
 62+ // 'Please set up the wiki first' text available
 63+ $this->assertEquals( "Please set up the wiki first.", $this->getText( "//p[2]" ));
 64+
 65+ // 'set up the wiki' link available
 66+ $this->assertTrue($this->isElementPresent( "link=set up the wiki" ));
 67+ }
 68+
 69+
 70+ public function testlanguagePageUI(){
 71+
 72+ parent::navigateLanguagePage();
 73+
 74+ // Verify 'Language' heading
 75+ $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 76+
 77+ // 'Your language' label available
 78+ $this->assertEquals( "Your language:",
 79+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" ));
 80+
 81+ // 'Your language' dropdown available
 82+ $this->assertTrue( $this->isElementPresent( "UserLang" ));
 83+
 84+ // 'Wiki language' label available
 85+ $this->assertEquals( "Wiki language:",
 86+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" ));
 87+
 88+ // 'Wiki language' dropdown available
 89+ $this->assertTrue($this->isElementPresent( "ContLang" ));
 90+ }
 91+
 92+
 93+ public function testWelcometoMediaWikiUI(){
 94+
 95+ parent::navigateWelcometoMediaWikiPage();
 96+
 97+ // Verify 'Welcome to MediaWiki!' heading
 98+ $this->assertEquals( "Welcome to MediaWiki!",
 99+ $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 100+
 101+ // Verify environment ok text displayed.
 102+ $this->assertEquals( "The environment has been checked.You can install MediaWiki.",
 103+ $this->getText( "//div[@id='bodyContent']/div/div/div[7]/span" ));
 104+ }
 105+
 106+
 107+ public function testConnectToDatabaseUI(){
 108+
 109+ parent::navigateConnetToDatabasePage();
 110+
 111+ // 'MYSQL radio button available
 112+ $this->assertEquals( "MySQL",
 113+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" ));
 114+ $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]" ));
 115+
 116+ // 'SQLite' radio button available
 117+ $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]" ));
 118+ $this->assertEquals( "SQLite", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label "));
 119+
 120+ // 'Database host' label available
 121+ $this->assertEquals( "Database host:", $this->getText( "//div[@id='DB_wrapper_mysql']/div/div[1]/label" ));
 122+
 123+ // 'Database host' text box default to 'localhost'
 124+ $this->assertEquals( "localhost", $this->getValue( "mysql_wgDBserver" ));
 125+
 126+ // 'Identify this wiki' section available
 127+ $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" ));
 128+
 129+ // 'Identify this wiki' label available
 130+ $this->assertEquals( "Identify this wiki", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/legend" ));
 131+
 132+ // 'Database name' lable available
 133+ $this->assertEquals( "Database name:",
 134+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[1]/div[1]/label" ));
 135+
 136+ // Verify 'Database name:' text box is default to 'my_wiki'
 137+ $this->assertEquals( "my_wiki", $this->getValue( "mysql_wgDBname" ));
 138+
 139+ // Verify 'Database table prefix:' label available
 140+ $this->assertEquals( "Database table prefix:",
 141+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[1]/div[2]/div[1]/label" ));
 142+
 143+ // 'User account for installation' section available
 144+ $this->assertTrue( $this->isElementPresent( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" ));
 145+
 146+ // 'User account for installation' label available
 147+ $this->assertEquals( "User account for installation", $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/legend" ));
 148+
 149+ // 'Database username' label available
 150+ $this->assertEquals( "Database username:",
 151+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[1]/div[1]/label" ));
 152+
 153+ // 'Database username' text box defaults to 'root'
 154+ $this->assertEquals("root", $this->getValue( "mysql__InstallUser" ));
 155+
 156+ // 'Database password' label available
 157+ $this->assertEquals( "Database password:",
 158+ $this->getText( "//div[@id='DB_wrapper_mysql']/fieldset[2]/div[2]/div[1]/label" ));
 159+ }
 160+
 161+
 162+
 163+ public function testDatabaseSettingsUI(){
 164+
 165+ $databaseName = DB_NAME_PREFIX."_db_settings_UI";
 166+ parent::navigateDatabaseSettingsPage( $databaseName );
 167+
 168+ // 'Database settings' text available.
 169+ $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 170+
 171+ // 'Database account for web access' section available
 172+ $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" ));
 173+
 174+ // 'Database account for web access' label available
 175+ $this->assertEquals( "Database account for web access", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" ));
 176+
 177+ // 'Use the same account as for installation' check box available
 178+ $this->assertEquals( "Use the same account as for installation", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/label" ));
 179+
 180+ // 'Use the same account as for installation' check box is selected by default
 181+ $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" ));
 182+
 183+ // 'Use the same account as for installation' check box deselected
 184+ $this->click( "mysql__SameAccount" );
 185+
 186+ // verify 'Use the same account as for installation' check box is not selected
 187+ $this->assertEquals( "off", $this->getValue( "mysql__SameAccount" ));
 188+
 189+ // 'Database username' label available
 190+ $this->assertEquals( "Database username:", $this->getText( "//div[@id='dbOtherAccount']/div[1]/div[1]/label" ));
 191+
 192+ // 'Database username' text box is default to the 'wikiuser'
 193+ $this->assertEquals( "wikiuser", $this->getValue( "mysql_wgDBuser" ));
 194+
 195+ // 'Database password' label available
 196+ $this->assertEquals( "Database password:", $this->getText( "//div[@id='dbOtherAccount']/div[2]/div[1]/label" ));
 197+
 198+ // 'Create the account if it does not already exist' label available
 199+ $this->assertEquals( "Create the account if it does not already exist", $this->getText( "//div[@id='dbOtherAccount']/div[4]/label" ));
 200+
 201+ // 'Create the account if it does not already exist' check box is not selected by default
 202+ $this->assertEquals( "off" , $this->getValue( "mysql__CreateDBAccount" ));
 203+
 204+ // 'Create the account if it does not already exist' check box selected
 205+ $this->click( "mysql__CreateDBAccount" );
 206+
 207+ // Verify 'Create the account if it does not already exist' check box is selected
 208+ $this->assertEquals( "on" , $this->getValue( "mysql__CreateDBAccount" ));
 209+ $this->click( "mysql__SameAccount" );
 210+ $this->assertEquals( "on", $this->getValue( "mysql__SameAccount" ));
 211+
 212+ // 'Storage engine' label available
 213+ $this->assertEquals( "Storage engine:",
 214+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label"));
 215+
 216+ // 'InnoDB' label available
 217+ $this->assertEquals( "InnoDB",
 218+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[1]/label" ));
 219+
 220+ // 'InnoDB' radio button available
 221+ $this->assertTrue( $this->isElementPresent( "mysql__MysqlEngine_InnoDB" ));
 222+
 223+ // 'MyISAM' label available
 224+ $this->assertEquals( "MyISAM", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/ul/li[2]/label" ));
 225+
 226+ // 'MyISAM' radio button available
 227+ $this->assertTrue($this->isElementPresent( "mysql__MysqlEngine_MyISAM" ));
 228+
 229+ // 'Database character set' label available
 230+ $this->assertEquals( "Database character set:",
 231+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[1]/label" ));
 232+
 233+ // 'Binary' radio button available
 234+ $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_binary" ));
 235+
 236+ // 'Binary' radio button available
 237+ $this->assertEquals( "Binary", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[1]/label" ));
 238+
 239+ // 'UTF-8' radio button available
 240+ $this->assertTrue( $this->isElementPresent( "mysql__MysqlCharset_utf8" ));
 241+
 242+ // 'UTF-8' label available
 243+ $this->assertEquals( "UTF-8", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[3]/div[2]/ul/li[2]/label" ));
 244+
 245+ // 'Binary' radio button is selected
 246+ $this->assertEquals( "on", $this->getValue( "mysql__MysqlCharset_binary" ));
 247+ }
 248+
 249+ public function testNamePageUI(){
 250+
 251+ $databaseName = DB_NAME_PREFIX."_name_UI";
 252+ parent::navigateNamePage($databaseName);
 253+
 254+ // 'Name of wiki' text box available
 255+ $this->assertEquals( "Name of wiki:",
 256+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[1]/label" ));
 257+
 258+ $this->assertTrue( $this->isElementPresent( "config_wgSitename" ));
 259+
 260+ // 'Project namespace' label available
 261+ $this->assertEquals( "Project namespace:",
 262+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[1]/label" ));
 263+
 264+ // 'Same as the wiki name' radio button available
 265+ $this->assertTrue( $this->isElementPresent( "config__NamespaceType_site-name" ));
 266+
 267+ // 'Project' radio button available
 268+ $this->assertTrue( $this->isElementPresent( "config__NamespaceType_generic" ));
 269+
 270+ // 'Project' radio button available
 271+ $this->assertTrue( $this->isElementPresent( "config__NamespaceType_other" ));
 272+
 273+ // 'Same as the wiki name' label available
 274+ $this->assertEquals( "Same as the wiki name:",
 275+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[1]/label" ));
 276+
 277+ // 'Project' label available
 278+ $this->assertEquals("Project",
 279+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[2]/label" ));
 280+
 281+ // 'Project' label available
 282+ $this->assertEquals( "Other (specify)",
 283+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[2]/div[2]/ul/li[3]/label" ));
 284+
 285+ // 'Same as the wiki name' radio button selected by default
 286+ $this->assertEquals( "on", $this->getValue( "config__NamespaceType_site-name" ));
 287+
 288+ // 'Administrator account' section available
 289+ $this->assertTrue( $this->isElementPresent( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset" ));
 290+
 291+ // 'Administrator account' label available
 292+ $this->assertEquals( "Administrator account",
 293+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/legend" ));
 294+
 295+ // 'Your Name' label available
 296+ $this->assertEquals( "Your name:",
 297+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[1]/div[1]/label" ));
 298+
 299+ // 'Your Name' text box available
 300+ $this->assertTrue( $this->isElementPresent( "config__AdminName" ));
 301+
 302+ // 'Password' label available
 303+ $this->assertEquals( "Password:",
 304+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[2]/div[1]/label" ));
 305+
 306+ // 'Password' text box available
 307+ $this->assertTrue( $this->isElementPresent( "config__AdminPassword" ));
 308+
 309+ // 'Password again' label available
 310+ $this->assertEquals( "Password again:",
 311+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[3]/div[1]/label" ));
 312+
 313+ // 'Password again' text box available
 314+ $this->assertTrue( $this->isElementPresent( "config__AdminPassword2" ));
 315+
 316+ // 'Email address' label avaialble
 317+ $this->assertEquals( "E-mail address:",
 318+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[4]/div[1]/label" ));
 319+
 320+ // 'Email address' text box available
 321+ $this->assertTrue( $this->isElementPresent( "config__AdminEmail" ));
 322+
 323+ // 'Subscribe to the release announcements mailing list. ' check box available
 324+ $this->assertTrue( $this->isElementPresent( "config__Subscribe" ));
 325+
 326+ // 'Subscribe to the release announcements mailing list. ' label avaialble
 327+ $this->assertEquals( "Subscribe to the release announcements mailing list.",
 328+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset/div[5]/label" ));
 329+
 330+ // 'release announcements mailing list' link available
 331+ $this->assertTrue( $this->isElementPresent( "link=release announcements mailing list" ));
 332+
 333+ // Message displayed
 334+ $this->assertEquals( "You are almost done!You can now skip the remaining configuration and install the wiki right now.",
 335+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[4]/div[2]" ));
 336+
 337+ // 'Ask me more questions.' radio button available
 338+ $this->assertTrue( $this->isElementPresent( "config__SkipOptional_continue" ));
 339+
 340+ // 'Ask me more questions.' label available
 341+ $this->assertEquals( "Ask me more questions.",
 342+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[1]/label" ));
 343+
 344+ // 'I'm bored already, just install the wiki' radio button is avaiable
 345+ $this->assertTrue( $this->isElementPresent( "config__SkipOptional_skip" ));
 346+
 347+ // 'I'm bored already, just install the wiki' label available
 348+ $this->assertEquals( "I'm bored already, just install the wiki.",
 349+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[5]/div[2]/ul/li[2]/label" ));
 350+
 351+ // 'Ask me more questions.' radio button is default selected
 352+ $this->assertEquals( "on", $this->getValue( "config__SkipOptional_continue" ));
 353+ }
 354+
 355+
 356+
 357+ public function testOptionPageUI(){
 358+
 359+ $databaseName = DB_NAME_PREFIX."_options_UI";
 360+ parent::navigateOptionsPage($databaseName);
 361+
 362+ // 'Options' label available
 363+ $this->assertEquals( "Options", $this->getText("//div[@id='bodyContent']/div/div/h2"));
 364+
 365+ // 'Return e-mail address' label available
 366+ $this->assertEquals( "Return e-mail address:", $this->getText( "//div[@id='emailwrapper']/div[1]/div[1]/label" ));
 367+
 368+ // 'Return e-mail address' text box available
 369+ $this->assertTrue( $this->isElementPresent( "config_wgPasswordSender" ));
 370+
 371+ // Text 'apache@localhost' is default value of the 'Return e-mail address' text box
 372+ $this->assertEquals( "apache@localhost", $this->getValue( "config_wgPasswordSender" ));
 373+
 374+ // 'Logo URL' label available
 375+ $this->assertEquals( "Logo URL:", $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[3]/div[1]/label" ));
 376+
 377+ // 'Logo URL' text box available
 378+ $this->assertTrue( $this->isElementPresent( "config_wgLogo" ));
 379+
 380+ // Correct path available in the 'Logo URL' text box
 381+ $this->assertEquals( "/wiki/skins/common/images/wiki.png", $this->getValue( "config_wgLogo" ));
 382+
 383+ // 'Enable file uploads' radio button available
 384+ $this->assertTrue( $this->isElementPresent( "config_wgEnableUploads" ));
 385+
 386+ // 'Enable file uploads' label available
 387+ $this->assertEquals( "Enable file uploads",
 388+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/fieldset[2]/div[1]/label" ));
 389+
 390+ // 'Enable file uploads' check box is not selected
 391+ $this->assertEquals( "off", $this->getValue( "config_wgEnableUploads" ));
 392+
 393+ $this->click( "config_wgEnableUploads" );
 394+
 395+ // 'Directory for deleted files' label available
 396+ $this->assertEquals( "Directory for deleted files:",
 397+ $this->getText( "//div[@id='uploadwrapper']/div/div[1]/label" ));
 398+
 399+ // 'Directory for deleted files' text box available
 400+ $this->assertTrue( $this->isElementPresent( "config_wgDeletedDirectory" ));
 401+
 402+ // Correct path available in the 'Directory for deleted files' text box
 403+ $this->assertEquals( "C:\\wamp\\www\\".DIRECTORY_NAME."/images/deleted",
 404+ $this->getValue( "config_wgDeletedDirectory" ));
 405+ }
 406+
 407+
 408+
 409+ public function testInstallPageUI(){
 410+
 411+ $databaseName = DB_NAME_PREFIX."_install_UI";
 412+ parent::navigateInstallPage( $databaseName );
 413+
 414+ // 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]" ));
 424+ }
 425+
 426+
 427+
 428+ public function testCompletePageUI(){
 429+
 430+ $databaseName = DB_NAME_PREFIX."_complete_UI";
 431+ parent::navigateCompletePage( $databaseName );
 432+
 433+ // 'Congratulations!' text display
 434+ $this->assertEquals( "Congratulations!",
 435+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/b" ));
 436+
 437+ // 'LocalSettings.php' generated message display
 438+ $this->assertEquals( "The installer has generated a LocalSettings.php file. It contains all your configuration.",
 439+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]/p[2]" ));
 440+
 441+ // 'Download LocalSettings.php'' link available
 442+ $this->assertTrue( $this->isElementPresent( "link=Download LocalSettings.php" ));
 443+
 444+ // 'enter your wiki' link available
 445+ $this->assertTrue( $this->isElementPresent( "link=enter your wiki" ));
 446+ }
 447+
 448+
 449+
 450+ public function testRestartInstallation(){
 451+
 452+ parent::navigateConnetToDatabasePage();
 453+ $this->click( "link=Restart installation" );
 454+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 455+
 456+ // Restart installation' label should be available.
 457+ $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 458+
 459+ //'Do you want to clear all saved data that you have entered and restart the installation process?' label available
 460+ $this->assertEquals( "Do you want to clear all saved data that you have entered and restart the installation process?",
 461+ $this->getText( "//*[@id='bodyContent']/div/div/div[2]/form/div[1]/div[2]" ));
 462+ // 'Back' button available
 463+ $this->assertTrue($this->isElementPresent( "submit-back" ));
 464+
 465+ // 'Restart' button available
 466+ $this->assertTrue($this->isElementPresent( "submit-restart" ));
 467+ }
 468+
 469+
 470+
 471+ public function testMediaWikiLogoAvailability(){
 472+
 473+ $databaseName = DB_NAME_PREFIX."_mediawiki_logo";
 474+ parent::navigateInitialpage();
 475+ parent::mediaWikiLogoPresentInitialScreen();
 476+ $this->click( "link=set up the wiki" );
 477+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 478+
 479+ // 'Language' page
 480+ parent::mediaWikiLogoPresent();
 481+ parent::clickContinueButton();
 482+
 483+ // 'Welcome to MediaWiki' page
 484+ parent::mediaWikiLogoPresent();
 485+ parent::clickContinueButton();
 486+
 487+ // 'Connet to database' page
 488+ parent::mediaWikiLogoPresent();
 489+ $this->type("mysql_wgDBname", $databaseName );
 490+ parent::clickContinueButton();
 491+
 492+ // 'Database setting' page
 493+ parent::mediaWikiLogoPresent();
 494+ parent::clickContinueButton();
 495+
 496+ // 'Name' page
 497+ parent::mediaWikiLogoPresent();
 498+ parent::completeNamePage();
 499+ parent::clickContinueButton();
 500+
 501+ // 'Options' page
 502+ parent::mediaWikiLogoPresent();
 503+ parent::clickContinueButton();
 504+
 505+ // 'Install' page
 506+ parent::mediaWikiLogoPresent();
 507+ }
 508+
 509+
 510+ public function testRightFramework(){
 511+
 512+ 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" ));
 522+ }
 523+}
Property changes on: trunk/phase3/tests/installer/MediaWikiUserInterfaceTestCase.php
___________________________________________________________________
Added: svn:eol-style
524524 + native
Index: trunk/phase3/tests/installer/MediaWikiDifferntDatabasePrefixTestCase.php
@@ -1,93 +1,93 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiDifferntDatabasePrefixTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -require_once 'MediaWikiInstallationCommonFunction.php';
32 -
33 -/*
34 - * Test Case ID : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
35 - * Test Case Name : Install MediaWiki with the same database and the different
36 - * database prefixes(Share one database between multiple wikis).
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiDifferntDatabasePrefixTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp(){
43 - parent::setUp();
44 - }
45 -
46 - // Install Mediawiki using 'MySQL' database type.
47 - public function testDifferentDatabasePrefix(){
48 -
49 - $databaseName = DB_NAME_PREFIX."_db_prefix";
50 - parent::navigateInstallPage( $databaseName );
51 -
52 - // To 'Options' page
53 - parent::clickBackButton();
54 -
55 - // To 'Name' page
56 - parent::clickBackButton();
57 -
58 - // To 'Database settings' page
59 - parent::clickBackButton();
60 -
61 - // To 'Connect to database' page
62 - parent::clickBackButton();
63 -
64 - // From 'Connect to database' page without database prefix
65 - parent::clickContinueButton();
66 -
67 - // Verify upgrade existing message
68 - $this->assertEquals( "Upgrade existing installation",
69 - $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
70 -
71 - // To 'Connect to database' page
72 - parent::clickBackButton();
73 -
74 - // Input the database prefix
75 - $this->type( "mysql_wgDBprefix", DATABASE_PREFIX );
76 -
77 - // From 'Connect to database' page with database prefix
78 - parent::clickContinueButton();
79 -
80 - // To 'Complete' page
81 - parent::clickContinueButton();
82 - parent::completeNamePage();
83 - parent::clickContinueButton();
84 -
85 - // Verify already installed warning message
86 - $this->assertEquals( "Install",
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.",
89 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]" ));
90 - parent::clickContinueButton();
91 - $this->chooseCancelOnNextConfirmation();
92 - parent::restartInstallation();
93 - }
94 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiDifferntDatabasePrefixTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+require_once 'MediaWikiInstallationCommonFunction.php';
 32+
 33+/*
 34+ * Test Case ID : 02 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 35+ * Test Case Name : Install MediaWiki with the same database and the different
 36+ * database prefixes(Share one database between multiple wikis).
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiDifferntDatabasePrefixTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp(){
 43+ parent::setUp();
 44+ }
 45+
 46+ // Install Mediawiki using 'MySQL' database type.
 47+ public function testDifferentDatabasePrefix(){
 48+
 49+ $databaseName = DB_NAME_PREFIX."_db_prefix";
 50+ parent::navigateInstallPage( $databaseName );
 51+
 52+ // To 'Options' page
 53+ parent::clickBackButton();
 54+
 55+ // To 'Name' page
 56+ parent::clickBackButton();
 57+
 58+ // To 'Database settings' page
 59+ parent::clickBackButton();
 60+
 61+ // To 'Connect to database' page
 62+ parent::clickBackButton();
 63+
 64+ // From 'Connect to database' page without database prefix
 65+ parent::clickContinueButton();
 66+
 67+ // Verify upgrade existing message
 68+ $this->assertEquals( "Upgrade existing installation",
 69+ $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 70+
 71+ // To 'Connect to database' page
 72+ parent::clickBackButton();
 73+
 74+ // Input the database prefix
 75+ $this->type( "mysql_wgDBprefix", DATABASE_PREFIX );
 76+
 77+ // From 'Connect to database' page with database prefix
 78+ parent::clickContinueButton();
 79+
 80+ // To 'Complete' page
 81+ parent::clickContinueButton();
 82+ parent::completeNamePage();
 83+ parent::clickContinueButton();
 84+
 85+ // Verify already installed warning message
 86+ $this->assertEquals( "Install",
 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.",
 89+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/div[1]" ));
 90+ parent::clickContinueButton();
 91+ $this->chooseCancelOnNextConfirmation();
 92+ parent::restartInstallation();
 93+ }
 94+}
Property changes on: trunk/phase3/tests/installer/MediaWikiDifferntDatabasePrefixTestCase.php
___________________________________________________________________
Added: svn:eol-style
9595 + native
Index: trunk/phase3/tests/installer/MediaWikiRestartInstallationTestCase.php
@@ -1,115 +1,115 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiRestartInstallationTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -
33 -require_once 'MediaWikiInstallationCommonFunction.php';
34 -
35 -/*
36 - * Test Case ID : 11, 12 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
37 - * Test Case Name : Install mediawiki on a already installed Mediawiki.
38 - * Version : MediaWiki 1.18alpha
39 -*/
40 -
41 -class MediaWikiRestartInstallationTestCase extends MediaWikiInstallationCommonFunction {
42 -
43 - function setUp() {
44 - parent::setUp();
45 - }
46 -
47 - // Verify restarting the installation
48 - public function testSuccessRestartInstallation() {
49 -
50 - $dbNameBeforeRestart = DB_NAME_PREFIX."_db_before";
51 - parent::navigateDatabaseSettingsPage( $dbNameBeforeRestart );
52 -
53 - // Verify 'Restart installation' link available
54 - $this->assertTrue($this->isElementPresent( "link=Restart installation" ));
55 -
56 - // Click 'Restart installation'
57 - $this->click( "link=Restart installation ");
58 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
59 -
60 - // 'Restart Installation' page displayed
61 - $this->assertEquals( "Restart installation", $this->getText("//div[@id='bodyContent']/div/div/h2"));
62 -
63 - // Restart warning message displayed
64 - $this->assertTrue($this->isTextPresent( "exact:Do you want to clear all saved data that you have entered and restart the installation process?" ));
65 -
66 - // Click on the 'Yes, restart' button
67 - $this->click( "submit-restart" );
68 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
69 -
70 - // Navigate to the initial installation page(Language).
71 - $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
72 -
73 - // 'Welcome to MediaWiki!' page
74 - parent::clickContinueButton();
75 -
76 - // 'Connect to database' page
77 - parent::clickContinueButton();
78 -
79 - // saved data should be deleted
80 - $dbNameAfterRestart = $this->getValue("mysql_wgDBname");
81 - $this->assertNotEquals($dbNameBeforeRestart, $dbNameAfterRestart);
82 - }
83 -
84 -
85 - // Verify cancelling restart
86 - public function testCancelRestartInstallation(){
87 -
88 - $dbNameBeforeRestart = DB_NAME_PREFIX."_cancel_restart";
89 -
90 - parent::navigateDatabaseSettingsPage( $dbNameBeforeRestart);
91 - // Verify 'Restart installation' link available
92 - $this->assertTrue($this->isElementPresent( "link=Restart installation" ));
93 -
94 - $this->click( "link=Restart installation" );
95 - $this->waitForPageToLoad( PAGE_LOAD_TIME );
96 -
97 - // 'Restart Installation' page displayed
98 - $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
99 -
100 - // Restart warning message displayed
101 - $this->assertTrue( $this->isTextPresent( "Do you want to clear all saved data that you have entered and restart the installation process?"));
102 -
103 - // Click on the 'Back' button
104 - parent::clickBackButton();
105 -
106 - // Navigates to the previous page
107 - $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));;
108 -
109 - // 'Connect to database' page
110 - parent::clickBackButton();
111 -
112 - // Saved data remain on the page.
113 - $dbNameAfterRestart = $this->getValue( "mysql_wgDBname" );
114 - $this->assertEquals( $dbNameBeforeRestart, $dbNameAfterRestart );
115 - }
116 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiRestartInstallationTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+
 33+require_once 'MediaWikiInstallationCommonFunction.php';
 34+
 35+/*
 36+ * Test Case ID : 11, 12 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 37+ * Test Case Name : Install mediawiki on a already installed Mediawiki.
 38+ * Version : MediaWiki 1.18alpha
 39+*/
 40+
 41+class MediaWikiRestartInstallationTestCase extends MediaWikiInstallationCommonFunction {
 42+
 43+ function setUp() {
 44+ parent::setUp();
 45+ }
 46+
 47+ // Verify restarting the installation
 48+ public function testSuccessRestartInstallation() {
 49+
 50+ $dbNameBeforeRestart = DB_NAME_PREFIX."_db_before";
 51+ parent::navigateDatabaseSettingsPage( $dbNameBeforeRestart );
 52+
 53+ // Verify 'Restart installation' link available
 54+ $this->assertTrue($this->isElementPresent( "link=Restart installation" ));
 55+
 56+ // Click 'Restart installation'
 57+ $this->click( "link=Restart installation ");
 58+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 59+
 60+ // 'Restart Installation' page displayed
 61+ $this->assertEquals( "Restart installation", $this->getText("//div[@id='bodyContent']/div/div/h2"));
 62+
 63+ // Restart warning message displayed
 64+ $this->assertTrue($this->isTextPresent( "exact:Do you want to clear all saved data that you have entered and restart the installation process?" ));
 65+
 66+ // Click on the 'Yes, restart' button
 67+ $this->click( "submit-restart" );
 68+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 69+
 70+ // Navigate to the initial installation page(Language).
 71+ $this->assertEquals( "Language", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 72+
 73+ // 'Welcome to MediaWiki!' page
 74+ parent::clickContinueButton();
 75+
 76+ // 'Connect to database' page
 77+ parent::clickContinueButton();
 78+
 79+ // saved data should be deleted
 80+ $dbNameAfterRestart = $this->getValue("mysql_wgDBname");
 81+ $this->assertNotEquals($dbNameBeforeRestart, $dbNameAfterRestart);
 82+ }
 83+
 84+
 85+ // Verify cancelling restart
 86+ public function testCancelRestartInstallation(){
 87+
 88+ $dbNameBeforeRestart = DB_NAME_PREFIX."_cancel_restart";
 89+
 90+ parent::navigateDatabaseSettingsPage( $dbNameBeforeRestart);
 91+ // Verify 'Restart installation' link available
 92+ $this->assertTrue($this->isElementPresent( "link=Restart installation" ));
 93+
 94+ $this->click( "link=Restart installation" );
 95+ $this->waitForPageToLoad( PAGE_LOAD_TIME );
 96+
 97+ // 'Restart Installation' page displayed
 98+ $this->assertEquals( "Restart installation", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));
 99+
 100+ // Restart warning message displayed
 101+ $this->assertTrue( $this->isTextPresent( "Do you want to clear all saved data that you have entered and restart the installation process?"));
 102+
 103+ // Click on the 'Back' button
 104+ parent::clickBackButton();
 105+
 106+ // Navigates to the previous page
 107+ $this->assertEquals( "Database settings", $this->getText( "//div[@id='bodyContent']/div/div/h2" ));;
 108+
 109+ // 'Connect to database' page
 110+ parent::clickBackButton();
 111+
 112+ // Saved data remain on the page.
 113+ $dbNameAfterRestart = $this->getValue( "mysql_wgDBname" );
 114+ $this->assertEquals( $dbNameBeforeRestart, $dbNameAfterRestart );
 115+ }
 116+}
Property changes on: trunk/phase3/tests/installer/MediaWikiRestartInstallationTestCase.php
___________________________________________________________________
Added: svn:eol-style
117117 + native
Index: trunk/phase3/tests/installer/MediaWikiDifferentDatabaseAccountTestCase.php
@@ -1,84 +1,84 @@
2 -<?php
3 -
4 -/**
5 - * MediaWikiDifferentDatabaseAccountTestCase
6 - *
7 - * @file
8 - * @ingroup Maintenance
9 - * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
10 - * http://citizendium.org/
11 - *
12 - * This program is free software; you can redistribute it and/or modify
13 - * it under the terms of the GNU General Public License as published by
14 - * the Free Software Foundation; either version 2 of the License, or
15 - * (at your option) any later version.
16 - *
17 - * This program is distributed in the hope that it will be useful,
18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 - * GNU General Public License for more details.
21 - *
22 - * You should have received a copy of the GNU General Public License along
23 - * with this program; if not, write to the Free Software Foundation, Inc.,
24 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 - * http://www.gnu.org/copyleft/gpl.html
26 - *
27 - * @addtogroup Maintenance
28 - *
29 - */
30 -
31 -
32 -require_once 'MediaWikiInstallationCommonFunction.php';
33 -
34 -/*
35 - * Test Case ID : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
36 - * Test Case Name : Install MediaWiki with different Database accounts for web access.
37 - * Version : MediaWiki 1.18alpha
38 -*/
39 -
40 -class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCommonFunction {
41 -
42 - function setUp(){
43 - parent::setUp();
44 - }
45 -
46 -
47 - // Install Mediawiki using 'MySQL' database type.
48 - public function testDifferentDatabaseAccount(){
49 -
50 - $databaseName = DB_NAME_PREFIX."_dif_accounts";
51 -
52 - // Navigate to the 'Database settings' page
53 - parent::navigateDatabaseSettingsPage( $databaseName );
54 -
55 - // Click on the 'Use the same account as for installation' check box
56 - $this->click( "mysql__SameAccount" );
57 -
58 - // Change the 'Database username'
59 - $this->type( "mysql_wgDBuser", DB_WEB_USER );
60 -
61 - // Enter 'Database password:'
62 - $this->type( "mysql_wgDBpassword", DB_WEB_USER_PASSWORD );
63 -
64 - // Select 'Create the account if it does not already exist' check box
65 - $this->click( "mysql__CreateDBAccount" );
66 - parent::clickContinueButton();
67 -
68 - // 'Name' page
69 - parent::completeNamePage();
70 -
71 - // 'Options' page
72 - parent::clickContinueButton();
73 -
74 - // 'Install' page
75 - $this->assertEquals( "Creating database user... done",
76 - $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" ));
77 - parent::clickContinueButton();
78 -
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" ));
83 - $this->chooseCancelOnNextConfirmation();
84 - }
85 -}
 2+<?php
 3+
 4+/**
 5+ * MediaWikiDifferentDatabaseAccountTestCase
 6+ *
 7+ * @file
 8+ * @ingroup Maintenance
 9+ * Copyright (C) 2010 Dan Nessett <dnessett@yahoo.com>
 10+ * http://citizendium.org/
 11+ *
 12+ * This program is free software; you can redistribute it and/or modify
 13+ * it under the terms of the GNU General Public License as published by
 14+ * the Free Software Foundation; either version 2 of the License, or
 15+ * (at your option) any later version.
 16+ *
 17+ * This program is distributed in the hope that it will be useful,
 18+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 19+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 20+ * GNU General Public License for more details.
 21+ *
 22+ * You should have received a copy of the GNU General Public License along
 23+ * with this program; if not, write to the Free Software Foundation, Inc.,
 24+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 25+ * http://www.gnu.org/copyleft/gpl.html
 26+ *
 27+ * @addtogroup Maintenance
 28+ *
 29+ */
 30+
 31+
 32+require_once 'MediaWikiInstallationCommonFunction.php';
 33+
 34+/*
 35+ * Test Case ID : 04 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
 36+ * Test Case Name : Install MediaWiki with different Database accounts for web access.
 37+ * Version : MediaWiki 1.18alpha
 38+*/
 39+
 40+class MediaWikiDifferentDatabaseAccountTestCase extends MediaWikiInstallationCommonFunction {
 41+
 42+ function setUp(){
 43+ parent::setUp();
 44+ }
 45+
 46+
 47+ // Install Mediawiki using 'MySQL' database type.
 48+ public function testDifferentDatabaseAccount(){
 49+
 50+ $databaseName = DB_NAME_PREFIX."_dif_accounts";
 51+
 52+ // Navigate to the 'Database settings' page
 53+ parent::navigateDatabaseSettingsPage( $databaseName );
 54+
 55+ // Click on the 'Use the same account as for installation' check box
 56+ $this->click( "mysql__SameAccount" );
 57+
 58+ // Change the 'Database username'
 59+ $this->type( "mysql_wgDBuser", DB_WEB_USER );
 60+
 61+ // Enter 'Database password:'
 62+ $this->type( "mysql_wgDBpassword", DB_WEB_USER_PASSWORD );
 63+
 64+ // Select 'Create the account if it does not already exist' check box
 65+ $this->click( "mysql__CreateDBAccount" );
 66+ parent::clickContinueButton();
 67+
 68+ // 'Name' page
 69+ parent::completeNamePage();
 70+
 71+ // 'Options' page
 72+ parent::clickContinueButton();
 73+
 74+ // 'Install' page
 75+ $this->assertEquals( "Creating database user... done",
 76+ $this->getText( "//div[@id='bodyContent']/div/div/div[2]/form/ul/li[2]" ));
 77+ parent::clickContinueButton();
 78+
 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" ));
 83+ $this->chooseCancelOnNextConfirmation();
 84+ }
 85+}
Property changes on: trunk/phase3/tests/installer/MediaWikiDifferentDatabaseAccountTestCase.php
___________________________________________________________________
Added: svn:eol-style
8686 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78775Add MediaWiki 1.18 alpha installer test casesnadeesha09:35, 22 December 2010

Status & tagging log