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