Index: trunk/phase3/tests/selenium/installer/MediaWikiUpgradeExistingDatabaseTestCase.php |
— | — | @@ -38,80 +38,80 @@ |
39 | 39 | |
40 | 40 | |
41 | 41 | class MediaWikiUpgradeExistingDatabaseTestCase extends MediaWikiInstallationCommonFunction { |
42 | | - |
| 42 | + |
43 | 43 | function setUp() { |
44 | 44 | parent::setUp(); |
45 | 45 | } |
46 | | - |
| 46 | + |
47 | 47 | // Install Mediawiki using 'MySQL' database type. |
48 | 48 | public function testUpgradeExistingDatabase() { |
49 | | - |
| 49 | + |
50 | 50 | $databaseName = DB_NAME_PREFIX."_upgrade_existing"; |
51 | 51 | parent::navigateInstallPage( $databaseName ); |
52 | | - |
| 52 | + |
53 | 53 | $this->open( "http://localhost:".PORT."/".DIRECTORY_NAME."/config/index.php" ); |
54 | 54 | $this->assertEquals( "Install", $this->getText( LINK_DIV."h2" )); |
55 | 55 | $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
56 | 56 | $this->getText( LINK_DIV."div[2]/form/div[1]/div[2]" )); |
57 | | - |
| 57 | + |
58 | 58 | // 'Optionis' page |
59 | 59 | parent::clickBackButton(); |
60 | | - |
| 60 | + |
61 | 61 | // 'Name' page |
62 | 62 | parent::clickBackButton(); |
63 | | - |
| 63 | + |
64 | 64 | // 'Database settings' page |
65 | 65 | parent::clickBackButton(); |
66 | | - |
| 66 | + |
67 | 67 | // 'Connect to database' page |
68 | 68 | parent::clickBackButton(); |
69 | 69 | $this->type( "mysql_wgDBname", $databaseName ); |
70 | 70 | parent::clickContinueButton(); |
71 | | - |
| 71 | + |
72 | 72 | // 'Upgrade existing installation' page displayed next to the 'Connect to database' page. |
73 | 73 | $this->assertEquals( "Upgrade existing installation", $this->getText( LINK_DIV."h2" )); |
74 | | - |
| 74 | + |
75 | 75 | // Warning message displayed. |
76 | 76 | $this->assertEquals( "There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.18alpha, click Continue.", |
77 | 77 | $this->getText( LINK_DIV."div[2]/form/div[1]/div[2]" )); |
78 | | - |
| 78 | + |
79 | 79 | parent::clickContinueButton(); |
80 | 80 | $this->assertEquals( "Upgrade existing installation", |
81 | 81 | $this->getText( LINK_DIV."h2" )); |
82 | | - |
| 82 | + |
83 | 83 | // 'Upgrade complete.' text display |
84 | 84 | $this->assertEquals("Upgrade complete.", |
85 | | - $this->getText( "[@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[1]" )); |
86 | | - |
| 85 | + $this->getText("//div[@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[1]")); |
| 86 | + |
87 | 87 | $this->assertEquals("You can now Folder/index.php start using your wiki.", |
88 | | - $this->getText( "[@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[2]" )); |
89 | | - |
90 | | - $this->assertEquals( "Folder/index.php start using your wiki", |
91 | | - $this->getText( "link=Folder/index.php start using your wiki" )); |
92 | | - |
| 88 | + $this->getText("//div[@id='bodyContent']/div/div[1]/div[4]/form/div[1]/div[2]/p[2]" )); |
| 89 | + |
| 90 | + $this->assertEquals( "Folder/index.php start using your wiki", |
| 91 | + $this->getText( "link=Folder/index.php start using your wiki" )); |
| 92 | + |
93 | 93 | $this->assertTrue($this->isElementPresent( "submit-regenerate" )); |
94 | 94 | $this->click( "submit-regenerate" ); |
95 | 95 | $this->waitForPageToLoad( PAGE_LOAD_TIME ); |
96 | 96 | $this->assertEquals( "Database settings", |
97 | 97 | $this->getText( LINK_DIV."h2" )); |
98 | | - |
| 98 | + |
99 | 99 | // 'Database settings' page |
100 | 100 | parent::clickContinueButton(); |
101 | | - |
| 101 | + |
102 | 102 | // Name page |
103 | 103 | parent::completeNamePage(); |
104 | | - |
| 104 | + |
105 | 105 | // Options page |
106 | 106 | parent::clickContinueButton(); |
107 | | - |
| 107 | + |
108 | 108 | // Install page |
109 | 109 | $this->assertEquals( "Warning: You seem to have already installed MediaWiki and are trying to install it again. Please proceed to the next page.", |
110 | 110 | $this->getText( LINK_FORM."div[1]/div[2]" )); |
111 | 111 | parent::clickContinueButton(); |
112 | | - |
| 112 | + |
113 | 113 | // complete |
114 | 114 | parent::completePageSuccessfull(); |
115 | 115 | $this->chooseCancelOnNextConfirmation(); |
116 | 116 | parent::restartInstallation(); |
117 | 117 | } |
118 | | -} |
| 118 | +} |
\ No newline at end of file |