]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / maintenance / tests / selenium / suites / SimpleSeleniumTestCase.php
1 <?php
2 /* 
3  * This test case is part of the SimpleSeleniumTestSuite.
4  * Configuration for these tests are dosumented as part of SimpleSeleniumTestSuite.php
5  */
6 class SimpleSeleniumTestCase extends SeleniumTestCase {
7         public function testBasic() {
8                 $this->open( $this->getUrl() . 
9                         '/index.php?title=Selenium&action=edit' );
10                 $this->type( "wpTextbox1", "This is a basic test" );
11                 $this->click( "wpPreview" );
12                 $this->waitForPageToLoad( 10000 );
13
14                 // check result
15                 $source = $this->getText( "//div[@id='wikiPreview']/p" );
16                 $correct = strstr( $source, "This is a basic test" );
17                 $this->assertEquals( $correct, true );
18         }
19         
20         /*
21          * All this test really does is verify that a global var was set.
22          * It depends on $wgDefaultSkin = 'chick'; being set
23          */
24         public function testGlobalVariableForDefaultSkin() {
25                 $this->open( $this->getUrl() . '/index.php?&action=purge' );
26                 $bodyClass = $this->getAttribute( "//body/@class" );
27                 $this-> assertContains('skin-chick', $bodyClass, 'Chick skin not set');
28         }
29
30 }