Localisation updates from http://translatewiki.net.
[mediawiki.git] / tests / selenium / suites / SimpleSeleniumTestCase.php
blob14c9e6b991204c56f1128f657770848d4dd5a25c
1 <?php
2 /*
3 * This test case is part of the SimpleSeleniumTestSuite.
4 * Configuration for these tests are documented 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( SeleniumTestConstants::WIKI_TEST_WAIT_TIME );
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 );
20 /**
21 * All this test really does is verify that a global var was set.
22 * It depends on $wgDefaultSkin = 'chick'; being set
24 public function testGlobalVariableForDefaultSkin() {
25 $this->open( $this->getUrl() . '/index.php' );
26 $bodyClass = $this->getAttribute( "//body/@class" );
27 $this->assertContains( 'skin-chick', $bodyClass, 'Chick skin not set' );
30 /**
31 * Just verify that the test db was loaded correctly
33 public function testDatabaseResourceLoadedCorrectly() {
34 $this->open( $this->getUrl() . '/index.php/TestResources?action=purge' );
35 $testString = $this->gettext( "//body//*[@id='firstHeading']" );
36 $this->assertEquals( 'TestResources', $testString, 'Article that should be present in the test db was not found.' );