Moving the SimpleSelenium tests into the suites sub dir r75311
authorPriyanka Dhanda <pdhanda@users.mediawiki.org>
Mon, 1 Nov 2010 16:29:24 +0000 (16:29 +0000)
committerPriyanka Dhanda <pdhanda@users.mediawiki.org>
Mon, 1 Nov 2010 16:29:24 +0000 (16:29 +0000)
maintenance/tests/selenium/SimpleSeleniumConfig.php [deleted file]
maintenance/tests/selenium/SimpleSeleniumTestCase.php [deleted file]
maintenance/tests/selenium/SimpleSeleniumTestSuite.php [deleted file]
maintenance/tests/selenium/suites/SimpleSeleniumConfig.php [new file with mode: 0644]
maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php [new file with mode: 0644]
maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php [new file with mode: 0644]

diff --git a/maintenance/tests/selenium/SimpleSeleniumConfig.php b/maintenance/tests/selenium/SimpleSeleniumConfig.php
deleted file mode 100644 (file)
index cffa83c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-class SimpleSeleniumConfig {
-       
-       public static function getSettings(&$includeFiles, &$globalConfigs) {
-               $includes = array(
-                       //files that needed to be included would go here
-               );
-               $configs = array(
-                       'wgDefaultSkin' => 'chick'
-               );
-               $includeFiles = array_merge( $includeFiles, $includes );
-               $globalConfigs = array_merge( $globalConfigs, $configs);
-               return true; 
-       }
-}
\ No newline at end of file
diff --git a/maintenance/tests/selenium/SimpleSeleniumTestCase.php b/maintenance/tests/selenium/SimpleSeleniumTestCase.php
deleted file mode 100644 (file)
index 8f01b43..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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');
-       }
-
-}
diff --git a/maintenance/tests/selenium/SimpleSeleniumTestSuite.php b/maintenance/tests/selenium/SimpleSeleniumTestSuite.php
deleted file mode 100644 (file)
index 49a06d4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/*
- * Sample test suite. 
- * Two ways to configure MW for these tests
- * 1) If you are running multiple test suites, add the following in LocalSettings.php
- * require_once("maintenance/tests/selenium/SimpleSeleniumConfig.php");
- * $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings';
- * OR
- * 2) Add the following to your Localsettings.php
- * $wgDefaultSkin = 'chick';
- */
-class SimpleSeleniumTestSuite extends SeleniumTestSuite
-{
-       public function setUp() {
-               $this->setLoginBeforeTests( false );
-               parent::setUp();
-       } 
-       public function addTests() {
-               $testFiles = array(
-                       'maintenance/tests/selenium/SimpleSeleniumTestCase.php'
-               );
-               parent::addTestFiles( $testFiles );
-       }
-
-
-}
diff --git a/maintenance/tests/selenium/suites/SimpleSeleniumConfig.php b/maintenance/tests/selenium/suites/SimpleSeleniumConfig.php
new file mode 100644 (file)
index 0000000..cffa83c
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+class SimpleSeleniumConfig {
+       
+       public static function getSettings(&$includeFiles, &$globalConfigs) {
+               $includes = array(
+                       //files that needed to be included would go here
+               );
+               $configs = array(
+                       'wgDefaultSkin' => 'chick'
+               );
+               $includeFiles = array_merge( $includeFiles, $includes );
+               $globalConfigs = array_merge( $globalConfigs, $configs);
+               return true; 
+       }
+}
\ No newline at end of file
diff --git a/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php b/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php
new file mode 100644 (file)
index 0000000..8f01b43
--- /dev/null
@@ -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');
+       }
+
+}
diff --git a/maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php b/maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php
new file mode 100644 (file)
index 0000000..49a06d4
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/*
+ * Sample test suite. 
+ * Two ways to configure MW for these tests
+ * 1) If you are running multiple test suites, add the following in LocalSettings.php
+ * require_once("maintenance/tests/selenium/SimpleSeleniumConfig.php");
+ * $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings';
+ * OR
+ * 2) Add the following to your Localsettings.php
+ * $wgDefaultSkin = 'chick';
+ */
+class SimpleSeleniumTestSuite extends SeleniumTestSuite
+{
+       public function setUp() {
+               $this->setLoginBeforeTests( false );
+               parent::setUp();
+       } 
+       public function addTests() {
+               $testFiles = array(
+                       'maintenance/tests/selenium/SimpleSeleniumTestCase.php'
+               );
+               parent::addTestFiles( $testFiles );
+       }
+
+
+}