MediaWiki  REL1_21
MyContributionsTestCase.php
Go to the documentation of this file.
00001 <?php
00026 require_once dirname( __DIR__ ) . '/SeleniumTestConstants.php';
00027 
00028 class MyContributionsTestCase extends SeleniumTestCase {
00029         // Verify user contributions
00030         public function testRecentChangesAvailability() {
00031                 $newPage = $this->createNewTestPage( "MyContributionsTest" );
00032 
00033                 // Verify My contributions Link available
00034                 $this->assertTrue( $this->isElementPresent( "link=Contributions" ) );
00035 
00036 
00037                 $this->click( "link=Contributions" );
00038                 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
00039 
00040                 // Verify recent page adding available on My Contributions list
00041                 $this->assertEquals( $newPage, $this->getText( "link=" . $newPage ) );
00042 
00043                 $this->type( SeleniumTestConstants::INPUT_SEARCH_BOX, $newPage );
00044                 $this->click( SeleniumTestConstants::BUTTON_SEARCH );
00045                 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
00046 
00047                 $this->click( SeleniumTestConstants::LINK_EDIT );
00048                 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
00049                 $this->type( SeleniumTestConstants::TEXT_EDITOR, $newPage . " text changed" );
00050                 $this->click( SeleniumTestConstants::BUTTON_SAVE );
00051                 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
00052                 $this->click( "link=Contributions" );
00053                 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
00054 
00055                 // Verify recent page changes available on My Contributions
00056                 $this->assertTrue( $this->isTextPresent( $newPage ) );
00057         }
00058 }
00059