summaryrefslogtreecommitdiff
path: root/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php')
-rw-r--r--maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php b/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
new file mode 100644
index 00000000..8f01b437
--- /dev/null
+++ b/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
@@ -0,0 +1,30 @@
+<?php
+/*
+ * This test case is part of the SimpleSeleniumTestSuite.
+ * Configuration for these tests are dosumented 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( 10000 );
+
+ // 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?&action=purge' );
+ $bodyClass = $this->getAttribute( "//body/@class" );
+ $this-> assertContains('skin-chick', $bodyClass, 'Chick skin not set');
+ }
+
+}