MediaWiki
REL1_19
|
00001 <?php 00002 00030 require_once dirname( dirname( __FILE__ ) ) . '/SeleniumTestConstants.php'; 00031 00032 class MyWatchListTestCase extends SeleniumTestCase { 00033 00034 // Verify user watchlist 00035 public function testMyWatchlist() { 00036 00037 $pageName = $this->createNewTestPage( "MyWatchListTest", true ); 00038 // Verify link 'My Watchlist' available 00039 $this->assertTrue( $this->isElementPresent( SeleniumTestConstants::LINK_START."Watchlist" ) ); 00040 00041 $this->click( SeleniumTestConstants::LINK_START."Watchlist" ); 00042 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME ); 00043 00044 // Verify newly added page to the watchlist is available 00045 $this->assertEquals( $pageName, $this->getText( SeleniumTestConstants::LINK_START.$pageName )); 00046 00047 $this->click( SeleniumTestConstants::LINK_START.$pageName ); 00048 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME ); 00049 $this->click( SeleniumTestConstants::LINK_EDIT ); 00050 $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME ); 00051 $this->click( "wpWatchthis" ); 00052 $this->click( SeleniumTestConstants::BUTTON_SAVE ); 00053 $this->assertFalse( $this->isElementPresent( SeleniumTestConstants::LINK_START.$pageName ) ); 00054 //todo watch using the dropdown menu 00055 } 00056 } 00057