[testSuite]
-SimpleSeleniumTestSuite = "maintenance/tests/selenium/SimpleSeleniumTestSuite.php"
-PagedTiffHandlerSeleniumTestSuite = "extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestSuite.php"
+SimpleSeleniumTestSuite = "maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php"
+WikiEditorTestSuite = "extensions/WikiEditor/selenium/WikiEditorTestSuite.php"
[SeleniumTests]
-testSuite[SimpleSeleniumTestSuite] = "maintenance/tests/selenium/SimpleSeleniumTestSuite.php"
-testSuite[PagedTiffHandlerSeleniumTestSuite] = "extensions/PagedTiffHandler/selenium/PagedTiffHandlerTestSuite.php"
+testSuite[SimpleSeleniumTestSuite] = "maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php"
+testSuite[WikiEditorTestSuite] = "extensions/WikiEditor/selenium/WikiEditorTestSuite.php"
--- /dev/null
+<?php
+/*
+ * Stub of tests be need as part of the hack-a-ton
+ */
+class MediawikiCoreSmokeTestCase extends SeleniumTestCase {
+ public function testUserLogin() {
+
+ }
+
+ public function testChangeUserPreference() {
+
+ }
+
+ /*
+ * TODO: generalize this test to be reusable for different skins
+ */
+ public function testCreateNewPageVector() {
+
+ }
+
+ /*
+ * TODO: generalize this test to be reusable for different skins
+ */
+ public function testEditExistingPageVector() {
+
+ }
+
+ /*
+ * TODO: generalize this test to be reusable for different skins
+ */
+ public function testCreateNewPageMonobook() {
+
+ }
+
+ /*
+ * TODO: generalize this test to be reusable for different skins
+ */
+ public function testEditExistingPageMonobook() {
+
+ }
+
+ public function testImageUpload() {
+
+ }
+
+
+}
--- /dev/null
+<?php
+/*
+ * Stubs for now. We're going to start populating this test.
+ */
+class MediawikiCoreSmokeTestSuite extends SeleniumTestSuite
+{
+ public function setUp() {
+ $this->setLoginBeforeTests( false );
+ parent::setUp();
+ }
+ public function addTests() {
+ $testFiles = array(
+ 'maintenance/tests/selenium/suites/MediawikiCoreSmokeTestCase.php'
+ );
+ parent::addTestFiles( $testFiles );
+ }
+
+
+}
--- /dev/null
+<?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
--- /dev/null
+<?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');
+ }
+
+}
--- /dev/null
+<?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/suites/SimpleSeleniumTestCase.php'
+ );
+ parent::addTestFiles( $testFiles );
+ }
+
+
+}