diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /tests/selenium/suites/SimpleSeleniumTestCase.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'tests/selenium/suites/SimpleSeleniumTestCase.php')
-rw-r--r-- | tests/selenium/suites/SimpleSeleniumTestCase.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/selenium/suites/SimpleSeleniumTestCase.php b/tests/selenium/suites/SimpleSeleniumTestCase.php new file mode 100644 index 00000000..99a75c12 --- /dev/null +++ b/tests/selenium/suites/SimpleSeleniumTestCase.php @@ -0,0 +1,39 @@ +<?php +/* + * This test case is part of the SimpleSeleniumTestSuite. + * Configuration for these tests are documented as part of SimpleSeleniumTestSuite.php + */ +class SimpleSeleniumTestCase extends SeleniumTestCase { + public function testBasic() { + $this->open( $this->getUrl() . + '/index.php?title=Selenium&action=edit' ); + $this->type( "wpTextbox1", "This is a basic test" ); + $this->click( "wpPreview" ); + $this->waitForPageToLoad( SeleniumTestConstants::WIKI_TEST_WAIT_TIME ); + + // check result + $source = $this->getText( "//div[@id='wikiPreview']/p" ); + $correct = strstr( $source, "This is a basic test" ); + $this->assertEquals( $correct, true ); + } + + /* + * All this test really does is verify that a global var was set. + * It depends on $wgDefaultSkin = 'chick'; being set + */ + public function testGlobalVariableForDefaultSkin() { + $this->open( $this->getUrl() . '/index.php' ); + $bodyClass = $this->getAttribute( "//body/@class" ); + $this-> assertContains('skin-chick', $bodyClass, 'Chick skin not set'); + } + + /* + * Just verify that the test db was loaded correctly + */ + public function testDatabaseResourceLoadedCorrectly() { + $this->open( $this->getUrl() . '/index.php/TestResources?action=purge' ); + $testString = $this->gettext( "//body//*[@id='firstHeading']" ); + $this-> assertEquals('TestResources', $testString, 'Article that should be present in the test db was not found.'); + } + +} |