From 9c344a091039f0f925f00c7e50b6e5401789f75c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 3 Dec 2010 14:16:57 +0000 Subject: [PATCH] Followup r77654, SVN PROPS!!! --- .../suites/MediaWikExtraTestSuite.php | 40 +++--- .../selenium/suites/PageDeleteTestSuite.php | 32 ++--- .../selenium/suites/PreviewPageTestCase.php | 106 ++++++++-------- .../selenium/suites/SavePageTestCase.php | 116 +++++++++--------- 4 files changed, 147 insertions(+), 147 deletions(-) diff --git a/maintenance/tests/selenium/suites/MediaWikExtraTestSuite.php b/maintenance/tests/selenium/suites/MediaWikExtraTestSuite.php index a70ddfe463..205cb33244 100644 --- a/maintenance/tests/selenium/suites/MediaWikExtraTestSuite.php +++ b/maintenance/tests/selenium/suites/MediaWikExtraTestSuite.php @@ -1,20 +1,20 @@ -setLoginBeforeTests( true ); - parent::setUp(); - } - public function addTests() { - $testFiles = array( - 'maintenance/tests/selenium/suites/MyContributionsTestCase.php', - 'maintenance/tests/selenium/suites/MyWatchListTestCase.php', - 'maintenance/tests/selenium/suites/UserPreferencesTestCase.php', - 'maintenance/tests/selenium/suites/MovePageTestCase.php', - 'maintenance/tests/selenium/suites/PageSearchTestCase.php', - 'maintenance/tests/selenium/suites/EmailPasswordTestCase.php', - 'maintenance/tests/selenium/suites/CreateAccountTestCase.php' - ); - parent::addTestFiles( $testFiles ); - } -} +setLoginBeforeTests( true ); + parent::setUp(); + } + public function addTests() { + $testFiles = array( + 'maintenance/tests/selenium/suites/MyContributionsTestCase.php', + 'maintenance/tests/selenium/suites/MyWatchListTestCase.php', + 'maintenance/tests/selenium/suites/UserPreferencesTestCase.php', + 'maintenance/tests/selenium/suites/MovePageTestCase.php', + 'maintenance/tests/selenium/suites/PageSearchTestCase.php', + 'maintenance/tests/selenium/suites/EmailPasswordTestCase.php', + 'maintenance/tests/selenium/suites/CreateAccountTestCase.php' + ); + parent::addTestFiles( $testFiles ); + } +} diff --git a/maintenance/tests/selenium/suites/PageDeleteTestSuite.php b/maintenance/tests/selenium/suites/PageDeleteTestSuite.php index 8c215521e6..2e535c11af 100644 --- a/maintenance/tests/selenium/suites/PageDeleteTestSuite.php +++ b/maintenance/tests/selenium/suites/PageDeleteTestSuite.php @@ -1,16 +1,16 @@ -setLoginBeforeTests( true ); - parent::setUp(); - } - public function addTests() { - $testFiles = array( - 'maintenance/tests/selenium/suites/DeletePageAdminTestCase.php' - ); - parent::addTestFiles( $testFiles ); - } - - -} +setLoginBeforeTests( true ); + parent::setUp(); + } + public function addTests() { + $testFiles = array( + 'maintenance/tests/selenium/suites/DeletePageAdminTestCase.php' + ); + parent::addTestFiles( $testFiles ); + } + + +} diff --git a/maintenance/tests/selenium/suites/PreviewPageTestCase.php b/maintenance/tests/selenium/suites/PreviewPageTestCase.php index aeb432422e..b704bf398e 100644 --- a/maintenance/tests/selenium/suites/PreviewPageTestCase.php +++ b/maintenance/tests/selenium/suites/PreviewPageTestCase.php @@ -1,53 +1,53 @@ - - * http://citizendium.org/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @addtogroup Maintenance - * - */ - -class PreviewPageTestCase extends SeleniumTestCase { - - // Verify adding a new page - public function testPreviewPage() { - $wikiText = "Adding this page to test the \n Preview button functionality"; - $newPage = "Test Preview Page"; - $this->open( $this->getUrl() . - '/index.php?title=Main_Page&action=edit' ); - $this->getNewPage( $newPage ); - $this->type( "wpTextbox1", $wikiText."" ); - $this->assertTrue($this->isElementPresent( "//*[@id='wpPreview']" )); - - $this->click( "wpPreview" ); - - // Verify saved page available - $source = $this->gettext( "firstHeading" ); - $correct = strstr( $source, "Test Preview Page" ); - $this->assertEquals( $correct, true); - - // Verify page content previewed succesfully - $contentOfPreviewPage = $this->getText( "//*[@id='content']" ); - $this->assertContains( $wikiText, $contentOfPreviewPage ); - } -} + + * http://citizendium.org/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @addtogroup Maintenance + * + */ + +class PreviewPageTestCase extends SeleniumTestCase { + + // Verify adding a new page + public function testPreviewPage() { + $wikiText = "Adding this page to test the \n Preview button functionality"; + $newPage = "Test Preview Page"; + $this->open( $this->getUrl() . + '/index.php?title=Main_Page&action=edit' ); + $this->getNewPage( $newPage ); + $this->type( "wpTextbox1", $wikiText."" ); + $this->assertTrue($this->isElementPresent( "//*[@id='wpPreview']" )); + + $this->click( "wpPreview" ); + + // Verify saved page available + $source = $this->gettext( "firstHeading" ); + $correct = strstr( $source, "Test Preview Page" ); + $this->assertEquals( $correct, true); + + // Verify page content previewed succesfully + $contentOfPreviewPage = $this->getText( "//*[@id='content']" ); + $this->assertContains( $wikiText, $contentOfPreviewPage ); + } +} diff --git a/maintenance/tests/selenium/suites/SavePageTestCase.php b/maintenance/tests/selenium/suites/SavePageTestCase.php index 2b9dcadaa2..7f1a692491 100644 --- a/maintenance/tests/selenium/suites/SavePageTestCase.php +++ b/maintenance/tests/selenium/suites/SavePageTestCase.php @@ -1,58 +1,58 @@ - - * http://citizendium.org/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @addtogroup Maintenance - * - */ - -class SavePageTestCase extends SeleniumTestCase { - - // Verify adding a new page - public function testSavePage() { - $wikiText = "Adding this page to test the Save button functionality"; - $newPage = "Test Save Page"; - - $this->open( $this->getUrl() . - '/index.php?title=Main_Page&action=edit' ); - $this->getNewPage($newPage); - $this->type("wpTextbox1", $wikiText); - - // verify 'Save' button available - $this->assertTrue($this->isElementPresent( "wpSave" )); - $this->click( "wpSave" ); - - // Verify saved page available - $source = $this->gettext( "firstHeading" ); - $correct = strstr( $source, "Test Save Page" ); - - // Verify Saved page name displayed correctly - $this->assertEquals( $correct, true ); - - // Verify page content saved succesfully - $contentOfSavedPage = $this->getText( "//*[@id='content']" ); - $this->assertContains( $wikiText, $contentOfSavedPage ); - $this->deletePage( $newPage ); - } -} + + * http://citizendium.org/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @addtogroup Maintenance + * + */ + +class SavePageTestCase extends SeleniumTestCase { + + // Verify adding a new page + public function testSavePage() { + $wikiText = "Adding this page to test the Save button functionality"; + $newPage = "Test Save Page"; + + $this->open( $this->getUrl() . + '/index.php?title=Main_Page&action=edit' ); + $this->getNewPage($newPage); + $this->type("wpTextbox1", $wikiText); + + // verify 'Save' button available + $this->assertTrue($this->isElementPresent( "wpSave" )); + $this->click( "wpSave" ); + + // Verify saved page available + $source = $this->gettext( "firstHeading" ); + $correct = strstr( $source, "Test Save Page" ); + + // Verify Saved page name displayed correctly + $this->assertEquals( $correct, true ); + + // Verify page content saved succesfully + $contentOfSavedPage = $this->getText( "//*[@id='content']" ); + $this->assertContains( $wikiText, $contentOfSavedPage ); + $this->deletePage( $newPage ); + } +} -- 2.20.1