diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-04-25 06:26:49 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-04-25 06:26:49 +0200 |
commit | 2e44b49a2db3026050b136de9b00f749dd3ff939 (patch) | |
tree | ef048f4db79a93c25cfc86319264aa7ae2a4ae0b /extensions | |
parent | 9441dde8bfb95277df073717ed7817dced40f948 (diff) |
Update to MediaWiki 1.22.6
Diffstat (limited to 'extensions')
30 files changed, 0 insertions, 998 deletions
diff --git a/extensions/Cite/.gitreview b/extensions/Cite/.gitreview deleted file mode 100644 index 6ae9db41..00000000 --- a/extensions/Cite/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Cite.git -defaultbranch=master diff --git a/extensions/Cite/.jshintignore b/extensions/Cite/.jshintignore deleted file mode 100644 index df46ab97..00000000 --- a/extensions/Cite/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -modules/jquery.tooltip/jquery.tooltip.js diff --git a/extensions/Cite/.jshintrc b/extensions/Cite/.jshintrc deleted file mode 100644 index 4b356f81..00000000 --- a/extensions/Cite/.jshintrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "camelcase": true, - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "supernew": true, - "shadow": true, - "noarg": true, - "noempty": true, - "nonew": true, - "quotmark": false, // sometimes double quotes make sense, e.g. "foo's" is better readable than 'foo\'s' - "trailing": true, - "undef": true, - "unused": "vars", // we want to allow unused function parameters - "laxbreak": true, - "laxcomma": false, - "onevar": false, - "bitwise": false, - "forin": false, - "regexp": false, - "strict": true, - "scripturl": true, - - // Environment - "browser": true, - - // Globals - "predef": [ - "jQuery", - "mediaWiki" - ] -} diff --git a/extensions/ConfirmEdit/.gitreview b/extensions/ConfirmEdit/.gitreview deleted file mode 100644 index 780d35df..00000000 --- a/extensions/ConfirmEdit/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/ConfirmEdit.git -defaultbranch=master diff --git a/extensions/Gadgets/.gitreview b/extensions/Gadgets/.gitreview deleted file mode 100644 index a1a8ead4..00000000 --- a/extensions/Gadgets/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Gadgets.git -defaultbranch=master diff --git a/extensions/Gadgets/tests/GadgetTest.php b/extensions/Gadgets/tests/GadgetTest.php deleted file mode 100644 index c9332a6c..00000000 --- a/extensions/Gadgets/tests/GadgetTest.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * @group Gadgets - */ - -class GadgetsTest extends MediaWikiTestCase { - private function create( $line ) { - $g = Gadget::newFromDefinition( $line ); - // assertInstanceOf() is available since PHPUnit 3.5 - $this->assertEquals( 'Gadget', get_class( $g ) ); - - return $g; - } - - function testInvalidLines() { - $this->assertFalse( Gadget::newFromDefinition( '' ) ); - $this->assertFalse( Gadget::newFromDefinition( '<foo|bar>' ) ); - } - - function testSimpleCases() { - $g = $this->create( '* foo bar| foo.css|foo.js|foo.bar' ); - $this->assertEquals( 'foo_bar', $g->getName() ); - $this->assertEquals( 'ext.gadget.foo_bar', $g->getModuleName() ); - $this->assertEquals( array( 'Gadget-foo.js' ), $g->getScripts() ); - $this->assertEquals( array( 'Gadget-foo.css' ), $g->getStyles() ); - $this->assertEquals( array( 'Gadget-foo.js', 'Gadget-foo.css' ), - $g->getScriptsAndStyles() ); - $this->assertEquals( array( 'Gadget-foo.js' ), $g->getLegacyScripts() ); - $this->assertFalse( $g->supportsResourceLoader() ); - $this->assertTrue( $g->hasModule() ); - } - - function testRLtag() { - $g = $this->create( '*foo [ResourceLoader]|foo.js|foo.css' ); - $this->assertEquals( 'foo', $g->getName() ); - $this->assertTrue( $g->supportsResourceLoader() ); - $this->assertEquals( 0, count( $g->getLegacyScripts() ) ); - } - - function testDependencies() { - $g = $this->create( '* foo[ResourceLoader|dependencies=jquery.ui]|bar.js' ); - $this->assertEquals( array( 'Gadget-bar.js' ), $g->getScripts() ); - $this->assertTrue( $g->supportsResourceLoader() ); - $this->assertEquals( array( 'jquery.ui' ), $g->getDependencies() ); - } - - function testPreferences() { - global $wgUser, $wgOut, $wgTitle; - - // This test makes call to the parser which requires valids Outputpage - // and Title objects. Set them up there, they will be released at the - // end of the test. - $old_wgOut = $wgOut; - $old_wgTitle = $wgTitle; - $wgTitle = Title::newFromText( 'Parser test for Gadgets extension' ); - - // Proceed with test setup: - $prefs = array(); - $context = new RequestContext(); - $wgOut = $context->getOutput(); - $wgOut->setTitle( Title::newFromText( 'test' ) ); - - Gadget::loadStructuredList( '* foo | foo.js -==keep-section1== -* bar| bar.js -==remove-section== -* baz [rights=embezzle] |baz.js -==keep-section2== -* quux [rights=read] | quux.js' ); - $this->assertTrue( GadgetHooks::getPreferences( $wgUser, $prefs ), 'GetPrefences hook should return true' ); - - $options = $prefs['gadgets']['options']; - $this->assertFalse( isset( $options['<gadget-section-remove-section>'] ), 'Must not show empty sections' ); - $this->assertTrue( isset( $options['<gadget-section-keep-section1>'] ) ); - $this->assertTrue( isset( $options['<gadget-section-keep-section2>'] ) ); - - // Restore globals - $wgOut = $old_wgOut; - $wgTitle = $old_wgTitle; - } -} diff --git a/extensions/ImageMap/.gitreview b/extensions/ImageMap/.gitreview deleted file mode 100644 index 2629c9d9..00000000 --- a/extensions/ImageMap/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/ImageMap.git -defaultbranch=master diff --git a/extensions/InputBox/.gitreview b/extensions/InputBox/.gitreview deleted file mode 100644 index 9d0c704d..00000000 --- a/extensions/InputBox/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/InputBox.git -defaultbranch=master diff --git a/extensions/Interwiki/.gitreview b/extensions/Interwiki/.gitreview deleted file mode 100644 index fcc03f61..00000000 --- a/extensions/Interwiki/.gitreview +++ /dev/null @@ -1,6 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Interwiki.git -defaultbranch=master -defaultrebase=0
\ No newline at end of file diff --git a/extensions/LocalisationUpdate/.gitreview b/extensions/LocalisationUpdate/.gitreview deleted file mode 100644 index da37d04d..00000000 --- a/extensions/LocalisationUpdate/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/LocalisationUpdate.git -defaultbranch=master diff --git a/extensions/LocalisationUpdate/tests/tokenTest.php b/extensions/LocalisationUpdate/tests/tokenTest.php deleted file mode 100644 index 1112313c..00000000 --- a/extensions/LocalisationUpdate/tests/tokenTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -$IP = strval( getenv( 'MW_INSTALL_PATH' ) ) !== '' - ? getenv( 'MW_INSTALL_PATH' ) - : realpath( dirname( __FILE__ ) . "/../../../" ); - -require_once( "$IP/maintenance/commandLine.inc" ); - -function evalExtractArray( $php, $varname ) { - eval( $php ); - return @$$varname; -} - -function confExtractArray( $php, $varname ) { - try { - $ce = new ConfEditor("<?php $php"); - $vars = $ce->getVars(); - $retval = @$vars[$varname]; - } catch( Exception $e ) { - print $e . "\n"; - $retval = null; - } - return $retval; -} - -function quickTokenExtractArray( $php, $varname ) { - $reader = new QuickArrayReader("<?php $php"); - return $reader->getVar( $varname ); -} - - -if( count( $args ) ) { - $sources = $args; -} else { - $sources = - array_merge( - glob("$IP/extensions/*/*.i18n.php"), - glob("$IP/languages/messages/Messages*.php") ); -} - -foreach( $sources as $sourceFile ) { - $rel = basename( $sourceFile ); - $out = str_replace( '/', '-', $rel ); - - $sourceData = file_get_contents( $sourceFile ); - - if( preg_match( '!extensions/!', $sourceFile ) ) { - $sourceData = LocalisationUpdate::cleanupExtensionFile( $sourceData ); - $items = 'langs'; - } else { - $sourceData = LocalisationUpdate::cleanupFile( $sourceData ); - $items = 'messages'; - } - - file_put_contents( "$out.txt", $sourceData ); - - $start = microtime(true); - $eval = evalExtractArray( $sourceData, 'messages' ); - $deltaEval = microtime(true) - $start; - - $start = microtime(true); - $quick = quickTokenExtractArray( $sourceData, 'messages' ); - $deltaQuick = microtime(true) - $start; - - $start = microtime(true); - $token = confExtractArray( $sourceData, 'messages' ); - $deltaToken = microtime(true) - $start; - - $hashEval = md5(serialize($eval)); - $hashToken = md5(serialize($token)); - $hashQuick = md5(serialize($quick)); - $countEval = count( (array)$eval); - $countToken = count( (array)$token ); - $countQuick = count( (array)$quick ); - - printf( "%s %s %d $items - %0.1fms - eval\n", $rel, $hashEval, $countEval, $deltaEval * 1000 ); - printf( "%s %s %d $items - %0.1fms - QuickArrayReader\n", $rel, $hashQuick, $countQuick, $deltaQuick * 1000 ); - printf( "%s %s %d $items - %0.1fms - ConfEditor\n", $rel, $hashToken, $countToken, $deltaToken * 1000 ); - - if( $hashEval !== $hashToken || $hashEval !== $hashQuick ) { - echo "FAILED on $rel\n"; - file_put_contents( "$out-eval.txt", var_export( $eval, true ) ); - file_put_contents( "$out-token.txt", var_export( $token, true ) ); - file_put_contents( "$out-quick.txt", var_export( $quick, true ) ); - #die("check eval.txt and token.txt\n"); - } - echo "\n"; -} - -echo "ok\n"; - diff --git a/extensions/Nuke/.gitreview b/extensions/Nuke/.gitreview deleted file mode 100644 index c623aede..00000000 --- a/extensions/Nuke/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Nuke.git -defaultbranch=master diff --git a/extensions/ParserFunctions/.gitreview b/extensions/ParserFunctions/.gitreview deleted file mode 100644 index decb9867..00000000 --- a/extensions/ParserFunctions/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/ParserFunctions.git -defaultbranch=master diff --git a/extensions/ParserFunctions/tests/ExpressionTest.php b/extensions/ParserFunctions/tests/ExpressionTest.php deleted file mode 100644 index 169a9cb4..00000000 --- a/extensions/ParserFunctions/tests/ExpressionTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -class ExpressionTest extends MediaWikiTestCase { - - /** - * @var ExprParser - */ - protected $parser; - - protected function setUp() { - parent::setUp(); - $this->parser = new ExprParser(); - } - - /** - * @dataProvider provideExpressions - */ - function testExpression( $input, $expected ) { - $this->assertEquals( - $expected, - $this->parser->doExpression( $input ) - ); - } - - function provideExpressions() { - return array( - array( '1 or 0', '1' ), - array( 'not (1 and 0)', '1' ), - array( 'not 0', '1' ), - array( '4 < 5', '1' ), - array( '-5 < 2', '1' ), - array( '-2 <= -2', '1' ), - array( '4 > 3', '1' ), - array( '4 > -3', '1' ), - array( '5 >= 2', '1' ), - array( '2 >= 2', '1' ), - array( '1 != 2', '1' ), - array( '-4 * -4 = 4 * 4', '1' ), - array( 'not (1 != 1)', '1' ), - array( '1 + 1', '2' ), - array( '-1 + 1', '0' ), - array( '+1 + 1', '2' ), - array( '4 * 4', '16' ), - array( '(1/3) * 3', '1' ), - array( '3 / 1.5', '2' ), - array( '3 / 0.2', '15' ), - array( '3 / ( 2.0 * 0.1 )', '15' ), - array( '3 / ( 2.0 / 10 )', '15' ), - array( '3 / (- 0.2 )', '-15' ), - array( '3 / abs( 0.2 )', '15' ), - array( '3 mod 2', '1' ), - array( '1e4', '10000' ), - array( '1e-2', '0.01' ), - array( '4.0 round 0', '4' ), - array( 'ceil 4', '4' ), - array( 'floor 4', '4' ), - array( '4.5 round 0', '5' ), - array( '4.2 round 0', '4' ), - array( '-4.2 round 0', '-4' ), - array( '-4.5 round 0', '-5' ), - array( '-2.0 round 0', '-2' ), - array( 'ceil -3', '-3' ), - array( 'floor -6.0', '-6' ), - array( 'ceil 4.2', '5' ), - array( 'ceil -4.5', '-4' ), - array( 'floor -4.5', '-5' ), - array( 'abs(-2)', '2' ), - array( 'ln(exp(1))', '1' ), - array( 'trunc(4.5)', '4' ), - array( 'trunc(-4.5)', '-4' ), - array( '123 fmod (2^64-1)', '123' ), - array( '5.7 mod 1.3', '0' ), - array( '5.7 fmod 1.3', '0.5' ), - ); - } -} - diff --git a/extensions/PdfHandler/.gitreview b/extensions/PdfHandler/.gitreview deleted file mode 100644 index f5eca40e..00000000 --- a/extensions/PdfHandler/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/PdfHandler.git -defaultbranch=master diff --git a/extensions/Poem/.gitreview b/extensions/Poem/.gitreview deleted file mode 100644 index aac78b2b..00000000 --- a/extensions/Poem/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Poem.git -defaultbranch=master diff --git a/extensions/Renameuser/.gitreview b/extensions/Renameuser/.gitreview deleted file mode 100644 index 0d757141..00000000 --- a/extensions/Renameuser/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/Renameuser.git -defaultbranch=master diff --git a/extensions/SpamBlacklist/.gitreview b/extensions/SpamBlacklist/.gitreview deleted file mode 100644 index d74ae8f9..00000000 --- a/extensions/SpamBlacklist/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/SpamBlacklist.git -defaultbranch=master diff --git a/extensions/SyntaxHighlight_GeSHi/.gitreview b/extensions/SyntaxHighlight_GeSHi/.gitreview deleted file mode 100644 index cb9e4b44..00000000 --- a/extensions/SyntaxHighlight_GeSHi/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/SyntaxHighlight_GeSHi.git -defaultbranch=master diff --git a/extensions/TitleBlacklist/.gitreview b/extensions/TitleBlacklist/.gitreview deleted file mode 100644 index 964229c3..00000000 --- a/extensions/TitleBlacklist/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/TitleBlacklist.git -defaultbranch=master diff --git a/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php b/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php deleted file mode 100644 index 1f8164e7..00000000 --- a/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * Test the TitleBlacklist API. - * - * This wants to run with phpunit.php, like so: - * cd $IP/tests/phpunit - * php phpunit.php ../../extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php - * - * The blacklist file is `testSource` and shared by all tests. - * - * Ian Baker <ian@wikimedia.org> - */ - -ini_set( 'include_path', ini_get( 'include_path' ) . ':' . __DIR__ . '/../../../tests/phpunit/includes/api' ); - -/** - * @group medium - **/ -class ApiQueryTitleBlacklistTest extends ApiTestCase { - - function setUp() { - global $wgTitleBlacklistSources; - parent::setUp(); - $this->doLogin(); - - $wgTitleBlacklistSources = array( - array( - 'type' => TBLSRC_FILE, - 'src' => __DIR__ . '/testSource', - ), - ); - } - - /** - * Verify we allow a title which is not blacklisted - */ - function testCheckingUnlistedTitle() { - $unlisted = $this->doApiRequest( array( - 'action' => 'titleblacklist', - // evil_acc is blacklisted as <newaccountonly> - 'tbtitle' => 'evil_acc', - 'tbaction' => 'create', - 'tbnooverride' => true, - ) ); - - $this->assertEquals( - 'ok', - $unlisted[0]['titleblacklist']['result'], - 'Not blacklisted title returns ok' - ); - } - - /** - * Verify tboverride works - */ - function testTboverride() { - global $wgGroupPermissions; - - // Allow all users to override the titleblacklist - $wgGroupPermissions['*']['tboverride'] = true; - - $unlisted = $this->doApiRequest( array( - 'action' => 'titleblacklist', - 'tbtitle' => 'bar', - 'tbaction' => 'create', - ) ); - - $this->assertEquals( - 'ok', - $unlisted[0]['titleblacklist']['result'], - 'Blacklisted title returns ok if the user is allowd to tboverride' - ); - } - - /** - * Verify a blacklisted title gives out an error. - */ - function testCheckingBlackListedTitle() { - $listed = $this->doApiRequest( array( - 'action' => 'titleblacklist', - 'tbtitle' => 'bar', - 'tbaction' => 'create', - 'tbnooverride' => true, - ) ); - - $this->assertEquals( - 'blacklisted', - $listed[0]['titleblacklist']['result'], - 'Listed title returns error' - ); - $this->assertEquals( - "The title \"bar\" has been banned from creation.\nIt matches the following blacklist entry: <code>[Bb]ar #example blacklist entry</code>", - $listed[0]['titleblacklist']['reason'], - 'Listed title error text is as expected' - ); - - $this->assertEquals( - "titleblacklist-forbidden-edit", - $listed[0]['titleblacklist']['message'], - 'Correct blacklist message name is returned' - ); - - $this->assertEquals( - "[Bb]ar #example blacklist entry", - $listed[0]['titleblacklist']['line'], - 'Correct blacklist line is returned' - ); - - } -} diff --git a/extensions/TitleBlacklist/tests/testSource b/extensions/TitleBlacklist/tests/testSource deleted file mode 100644 index f73d9dd7..00000000 --- a/extensions/TitleBlacklist/tests/testSource +++ /dev/null @@ -1,4 +0,0 @@ -[Bb]ar #example blacklist entry -.*[Ff]ail.* -.*[Nn]yancat.* <errmsg=blacklisted-nyancat> -.*evil_acc.* <newaccountonly> diff --git a/extensions/WikiEditor/.gitreview b/extensions/WikiEditor/.gitreview deleted file mode 100644 index 622413f0..00000000 --- a/extensions/WikiEditor/.gitreview +++ /dev/null @@ -1,6 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/WikiEditor.git -defaultbranch=master -defaultrebase=0 diff --git a/extensions/WikiEditor/.jshintignore b/extensions/WikiEditor/.jshintignore deleted file mode 100644 index 66a218b5..00000000 --- a/extensions/WikiEditor/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -# upstream lib from Google -modules/contentCollector.js diff --git a/extensions/WikiEditor/.jshintrc b/extensions/WikiEditor/.jshintrc deleted file mode 100644 index 64cd5087..00000000 --- a/extensions/WikiEditor/.jshintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "predef": [ - "mediaWiki", - "jQuery" - ], - "browser": true, - "smarttabs": true, - "multistr": true -} diff --git a/extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php b/extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php deleted file mode 100644 index 7153f49f..00000000 --- a/extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -require_once 'WikiDialogs_Links_Setup.php'; -/** - * Description of WikiNewPageDialogs - * - * @author bhagyag, pdhanda - * - * This test case is part of the WikiEditorTestSuite. - * Configuration for these tests are dosumented as part of extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php - * - */ -class WikiDialogs_Links extends WikiDialogs_Links_Setup { - // Set up the testing environment - function setup() { - parent::setUp(); - parent::doCreateInternalTestPageIfMissing(); - } - - function tearDown() { - parent::doLogout(); - parent::tearDown(); - } - - // Create a new page temporary - function createNewPage() { - parent::doOpenLink(); - parent::login(); - parent::doCreateNewPageTemporary(); - } - - // Add a internal link and verify - function testInternalLink() { - $this->createNewPage(); - parent::verifyInternalLink(); - } - - // Add a internal link with different display text and verify - function testInternalLinkWithDisplayText() { - $this->createNewPage(); - parent::verifyInternalLinkWithDisplayText(); - } - - // Add a internal link with blank display text and verify - function testInternalLinkWithBlankDisplayText() { - $this->createNewPage(); - parent::verifyInternalLinkWithBlankDisplayText(); - } - - // Add external link and verify - function testExternalLink() { - $this->createNewPage(); - parent::verifyExternalLink(); - } - - // Add external link with different display text and verify - function testExternalLinkWithDisplayText( ) { - $this->createNewPage(); - parent::verifyExternalLinkWithDisplayText(); - } - - // Add external link with Blank display text and verify - function testExternalLinkWithBlankDisplayText() { - $this->createNewPage(); - parent::verifyExternalLinkWithBlankDisplayText(); - } - -} diff --git a/extensions/WikiEditor/tests/selenium/WikiDialogs_Links_Setup.php b/extensions/WikiEditor/tests/selenium/WikiDialogs_Links_Setup.php deleted file mode 100644 index 352ebec0..00000000 --- a/extensions/WikiEditor/tests/selenium/WikiDialogs_Links_Setup.php +++ /dev/null @@ -1,295 +0,0 @@ -<?php -include( "WikiEditorConstants.php" ); -/** - * This test case will be handling the Wiki Tool bar Dialog functions - * Date : Apr - 2010 - * @author : BhagyaG - Calcey - */ -class WikiDialogs_Links_Setup extends SeleniumTestCase { - - // Open the page. - function doOpenLink() { - $this->open( $this->getUrl() . '/index.php' ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - } - - // Expand advance tool bar section if its not - function doExpandAdvanceSection() { - if ( !$this->isTextPresent( TEXT_HEADING ) ) { - $this->click( LINK_ADVANCED ); - } - } - - // Log out from the application - function doLogout() { - $this->open( $this->getUrl() . '/index.php' ); - if ( $this->isTextPresent( TEXT_LOGOUT ) ) { - $this->click( LINK_LOGOUT ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( TEXT_LOGOUT_CONFIRM, $this->getText( LINK_LOGIN ) ); - $this->open( $this->getUrl() . '/index.php' ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - } - } - - // Create a temporary fixture page - function doCreateInternalTestPageIfMissing() { - $this->type( INPUT_SEARCH_BOX, WIKI_INTERNAL_LINK ); - $this->click( BUTTON_SEARCH ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->click( LINK_START . WIKI_INTERNAL_LINK ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $location = $this->getLocation() . "\n"; - if ( strpos( $location, '&redlink=1' ) !== false ) { - $this->type( TEXT_EDITOR, "Test fixture page. No real content here" ); - $this->click( BUTTON_SAVE_WATCH ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isTextPresent( WIKI_INTERNAL_LINK ), - $this->getText( TEXT_PAGE_HEADING ) ); - } - } - - // Create a temporary new page - function doCreateNewPageTemporary() { - $this->type( INPUT_SEARCH_BOX, WIKI_TEMP_NEWPAGE ); - $this->click( BUTTON_SEARCH ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->click( LINK_START . WIKI_TEMP_NEWPAGE ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - } - - // Add a internal link and verify - function verifyInternalLink() { - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDLINK ); - $this->waitForPopup( 'addLink', WIKI_TEST_WAIT_TIME ); - $this->type( TEXT_LINKNAME, ( WIKI_INTERNAL_LINK ) ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXISTS ), 'Element ' . ICON_PAGEEXISTS . 'Not found' ); - $this->assertEquals( "on", $this->getValue( OPT_INTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( ( WIKI_INTERNAL_LINK ), $this->getText( LINK_START . WIKI_INTERNAL_LINK ) ); - $this->click( LINK_START . WIKI_INTERNAL_LINK ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isTextPresent( WIKI_INTERNAL_LINK ), $this->getText( TEXT_PAGE_HEADING ) ); - } - - // Add a internal link with different display text and verify - function verifyInternalLinkWithDisplayText() { - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDLINK ); - $this->waitForPopup( 'addLink', WIKI_TEST_WAIT_TIME ); - $this->type( TEXT_LINKNAME, WIKI_INTERNAL_LINK ); - $this->type ( TEXT_LINKDISPLAYNAME, WIKI_INTERNAL_LINK . TEXT_LINKDISPLAYNAME_APPENDTEXT ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXISTS ) ); - $this->assertEquals( "on", $this->getValue( OPT_INTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_INTERNAL_LINK . TEXT_LINKDISPLAYNAME_APPENDTEXT, - $this->getText( LINK_START . WIKI_INTERNAL_LINK . TEXT_LINKDISPLAYNAME_APPENDTEXT ) ); - $this->click( LINK_START . WIKI_INTERNAL_LINK . TEXT_LINKDISPLAYNAME_APPENDTEXT ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isTextPresent( WIKI_INTERNAL_LINK ), $this->getText( TEXT_PAGE_HEADING ) ); - - } - - // Add a internal link with blank display text and verify - function verifyInternalLinkWithBlankDisplayText() { - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDLINK ); - $this->waitForPopup( 'addLink', WIKI_TEST_WAIT_TIME ); - $this->type( TEXT_LINKNAME, WIKI_INTERNAL_LINK ); - $this->type( TEXT_LINKDISPLAYNAME, "" ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXISTS ) ); - $this->assertEquals( "on", $this->getValue( OPT_INTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_INTERNAL_LINK, $this->getText( LINK_START . WIKI_INTERNAL_LINK ) ); - $this->click( LINK_START . WIKI_INTERNAL_LINK ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_INTERNAL_LINK, $this->getText( TEXT_PAGE_HEADING ) ); - - } - - // Add external link and verify - function verifyExternalLink() { - $this->type( LINK_PREVIEW, "" ); - $this->click( LINK_ADDLINK ); - $this->type( TEXT_LINKNAME, WIKI_EXTERNAL_LINK ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXTERNAL ) ); - $this->assertEquals( "on", $this->getValue( OPT_EXTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_EXTERNAL_LINK, $this->getText( LINK_START . WIKI_EXTERNAL_LINK ) ); - - $this->click( LINK_START . WIKI_EXTERNAL_LINK ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_EXTERNAL_LINK_TITLE, $this->getTitle() ); - } - - // Add external link with different display text and verify - function verifyExternalLinkWithDisplayText() { - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDLINK ); - $this->type( TEXT_LINKNAME, WIKI_EXTERNAL_LINK ); - $this->type( TEXT_LINKDISPLAYNAME, WIKI_EXTERNAL_LINK_TITLE ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXTERNAL ) ); - $this->assertEquals( "on", $this->getValue( OPT_EXTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_EXTERNAL_LINK_TITLE, $this->getText( LINK_START . WIKI_EXTERNAL_LINK_TITLE ) ); - $this->click( LINK_START . ( WIKI_EXTERNAL_LINK_TITLE ) ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_EXTERNAL_LINK_TITLE , $this->getTitle() ); - } - - // Add external link with Blank display text and verify - function verifyExternalLinkWithBlankDisplayText() { - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDLINK ); - $this->type( TEXT_LINKNAME, WIKI_EXTERNAL_LINK ); - $this->type( TEXT_LINKDISPLAYNAME, "" ); - $this->assertTrue( $this->isElementPresent( ICON_PAGEEXTERNAL ) ); - $this->assertEquals( "on", $this->getValue( OPT_EXTERNAL ) ); - $this->click( BUTTON_INSERTLINK ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( "[1]", $this->getText( LINK_START . "[1]" ) ); - $this->click( LINK_START . "[1]" ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertEquals( WIKI_EXTERNAL_LINK_TITLE, $this->getTitle() ); - } - - // Add a table and verify - function verifyCreateTable() { - $WIKI_TABLE_ROW = 2; - $WIKI_TABLE_COL = "5"; - $this->doExpandAdvanceSection(); - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_SORT ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( CHK_SORT ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $WIKI_TABLE_ROW = $WIKI_TABLE_ROW + 1; - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_OTHER . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - - // Add a table and verify only with head row - function verifyCreateTableWithHeadRow() { - $WIKI_TABLE_ROW = 3; - $WIKI_TABLE_COL = "4"; - $this->doExpandAdvanceSection(); - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_BOARDER ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $WIKI_TABLE_ROW = $WIKI_TABLE_ROW + 1; - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_OTHER . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - - // Add a table and verify only with borders - function verifyCreateTableWithBorders() { - $WIKI_TABLE_ROW = "4"; - $WIKI_TABLE_COL = "6"; - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_HEADER ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( CHK_HEADER ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_OTHER . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - - // Add a table and verify only with sort row - function verifyCreateTableWithSortRow() { - $WIKI_TABLE_ROW = "2"; - $WIKI_TABLE_COL = "5"; - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_HEADER ); - $this->click( CHK_BOARDER ); - $this->click( CHK_SORT ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( CHK_HEADER ); - $this->click( CHK_BOARDER ); - $this->click( CHK_SORT ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_WITHALLFEATURES . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - - // Add a table without headers,borders and sort rows - function verifyCreateTableWithNoSpecialEffects() { - $WIKI_TABLE_ROW = "6"; - $WIKI_TABLE_COL = "2"; - $this-> - $this->doExpandAdvanceSection(); - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_BOARDER ); - $this->click( CHK_HEADER ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( CHK_BOARDER ); - $this->click( CHK_HEADER ); - $this->click( INK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_OTHER . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - - // Add a table with headers,borders and sort rows - function verifyCreateTableWithAllSpecialEffects() { - $WIKI_TABLE_ROW = 6; - $WIKI_TABLE_COL = "2"; - $this->doExpandAdvanceSection(); - $this->type( TEXT_EDITOR, "" ); - $this->click( LINK_ADDTABLE ); - $this->click( CHK_SORT ); - $this->type( TEXT_ROW, $WIKI_TABLE_ROW ); - $this->type( TEXT_COL, $WIKI_TABLE_COL ); - $this->click( BUTTON_INSERTABLE ); - $this->click( CHK_SORT ); - $this->click( LINK_PREVIEW ); - $this->waitForPageToLoad( WIKI_TEST_WAIT_TIME ); - $WIKI_TABLE_ROW = $WIKI_TABLE_ROW + 1; - $this->assertTrue( $this->isElementPresent( TEXT_TABLEID_WITHALLFEATURES . - TEXT_VALIDATE_TABLE_PART1 . $WIKI_TABLE_ROW . - TEXT_VALIDATE_TABLE_PART2 . $WIKI_TABLE_COL . - TEXT_VALIDATE_TABLE_PART3 ) ); - } - -} diff --git a/extensions/WikiEditor/tests/selenium/WikiEditorConstants.php b/extensions/WikiEditor/tests/selenium/WikiEditorConstants.php deleted file mode 100644 index 090f96bf..00000000 --- a/extensions/WikiEditor/tests/selenium/WikiEditorConstants.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -define ( 'WIKI_TEST_WAIT_TIME', "3000" ); // Waiting time - -// tool bar, buttons , links -// commonly using links -define ( 'LINK_MAIN_PAGE', "link=Main page" ); -define ( 'LINK_RANDOM_PAGE', "link=Random article" ); -define ( 'TEXT_PAGE_HEADING', "firstHeading" ); -define ( 'LINK_START', "link=" ); -define ( 'LINK_EDITPAGE', "//li[@id='ca-edit']/a/span" ); -define ( 'TEXT_EDITOR', "wpTextbox1" ); -define ( 'LINK_PREVIEW', "wpPreview" ); - -define ( 'WIKI_SEARCH_PAGE', "Hair (musical)" ); // Page name to search -define ( 'WIKI_TEXT_SEARCH', "TV" ); // Text to search -define ( 'WIKI_INTERNAL_LINK', "Wikieditor-Fixture-Page" ); // Exisiting page name to add as an internal tag -define ( 'WIKI_EXTERNAL_LINK', "www.google.com" ); // External web site name -define ( 'WIKI_EXTERNAL_LINK_TITLE', "Google" ); // Page title of the external web site name -define ( 'WIKI_CODE_PATH', getcwd() ); // get the current path of the program -define ( 'WIKI_SCREENSHOTS_PATH', "screenshots" ); // the folder the error screen shots will be saved -define ( 'WIKI_SCREENSHOTS_TYPE', "png" ); // screen print type -define ( 'WIKI_TEMP_NEWPAGE', "TestWikiPage" ); // temporary creating new page name -// for WikiCommonFunction_TC - -// for WikiSearch_TC -define ( 'INPUT_SEARCH_BOX', "searchInput" ); -define ( 'BUTTON_SEARCH', "mw-searchButton" ); -define ( 'TEXT_SEARCH_RESULT_HEADING', " - Search results - Wikipedia, the free encyclopedia" ); - -// for WikiWatchUnWatch_TC -define ( 'LINK_WATCH_PAGE', "link=Watch" ); -define ( 'LINK_WATCH_LIST', "link=My watchlist" ); -define ( 'LINK_WATCH_EDIT', "link=View and edit watchlist" ); -define ( 'LINK_UNWATCH', "link=Unwatch" ); -define ( 'BUTTON_WATCH', "wpWatchthis" ); -define ( 'BUTTON_SAVE_WATCH', "wpSave" ); -define ( 'TEXT_WATCH', "Watch" ); -define ( 'TEXT_UNWATCH', "Unwatch" ); - -// for WikiCommonFunction_TC -define ( 'TEXT_LOGOUT', "Log out" ); -define ( 'LINK_LOGOUT', "link=Log out" ); -define ( 'LINK_LOGIN', "link=Log in / create account" ); -define ( 'TEXT_LOGOUT_CONFIRM', "Log in / create account" ); -define ( 'INPUT_USER_NAME', "wpName1" ); -define ( 'INPUT_PASSWD', "wpPassword1" ); -define ( 'BUTTON_LOGIN', "wpLoginAttempt" ); -define ( 'TEXT_HEADING', "Heading" ); -define ( 'LINK_ADVANCED', "link=Advanced" ); - -// for WikiDialogs_TC -define ( 'LINK_ADDLINK', "//div[@id='wikiEditor-ui-toolbar']/div[1]/div[2]/span[2 ]" ); -define ( 'TEXT_LINKNAME', "wikieditor-toolbar-link-int-target" ); -define ( 'TEXT_LINKDISPLAYNAME', "wikieditor-toolbar-link-int-text" ); -define ( 'TEXT_LINKDISPLAYNAME_APPENDTEXT', " Test" ); -define ( 'ICON_PAGEEXISTS', "wikieditor-toolbar-link-int-target-status-exists" ); -define ( 'ICON_PAGEEXTERNAL', "wikieditor-toolbar-link-int-target-status-external" ); -define ( 'OPT_INTERNAL', "wikieditor-toolbar-link-type-int" ); -define ( 'OPT_EXTERNAL', "wikieditor-toolbar-link-type-ext" ); -define ( 'BUTTON_INSERTLINK', "//div[10]/div[11]/button[1]" ); -define ( 'LINK_ADDTABLE', "//div[@id='wikiEditor-ui-toolbar']/div[3]/div[1]/div[4]/span[2]" ); -define ( 'CHK_HEADER', "wikieditor-toolbar-table-dimensions-header" ); -define ( 'CHK_BOARDER', "wikieditor-toolbar-table-wikitable" ); -define ( 'CHK_SORT', "wikieditor-toolbar-table-sortable" ); -define ( 'TEXT_ROW', "wikieditor-toolbar-table-dimensions-rows" ); -define ( 'TEXT_COL', "wikieditor-toolbar-table-dimensions-columns" ); -define ( 'BUTTON_INSERTABLE', "//div[3]/button[1]" ); -define ( 'TEXT_HEADTABLE_TEXT', "Header text" ); -define ( 'TEXT_TABLEID_WITHALLFEATURES', "//table[@id='sortable_table_id_0']/tbody/" ); -define ( 'TEXT_TABLEID_OTHER', "//div[@id='wikiPreview']/table/tbody/" ); -define ( 'TEXT_VALIDATE_TABLE_PART1', "tr[" ); -define ( 'TEXT_VALIDATE_TABLE_PART2', "]/td[" ); -define ( 'TEXT_VALIDATE_TABLE_PART3', "]" ); -define ( 'LINK_SEARCH', "//div[@id='wikiEditor-ui-toolbar']/div[3]/div[1]/div[5]/span" ); -define ( 'INPUT_SEARCH', "wikieditor-toolbar-replace-search" ); -define ( 'INPUT_REPLACE', "wikieditor-toolbar-replace-replace" ); -define ( 'BUTTON_REPLACEALL', "//button[3]" ); -define ( 'BUTTON_REPLACENEXT', "//button[2]" ); -define ( 'BUTTON_CANCEL', "//button[4]" ); -define ( 'TEXT_PREVIEW_TEXT1', "//div[@id='wikiPreview']/p[1]" ); -define ( 'TEXT_PREVIEW_TEXT2', "//div[@id='wikiPreview']/p[2]" ); -define ( 'TEXT_PREVIEW_TEXT3', "//div[@id='wikiPreview']/p[3]" ); - - diff --git a/extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php b/extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php deleted file mode 100644 index ad4be489..00000000 --- a/extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -class WikiEditorSeleniumConfig { - - public static function getSettings( &$includeFiles, &$globalConfigs ) { - $includes = array( - 'extensions/Vector/Vector.php', - 'extensions/WikiEditor/WikiEditor.php' - ); - $configs = array( - 'wgDefaultSkin' => 'vector', - 'wgWikiEditorFeatures' => array( - 'toolbar' => array( 'global' => true, 'user' => true ), - 'toc' => array( 'global' => false, 'user' => false ), - 'highlight' => array( 'global' => false, 'user' => false ), - 'templateEditor' => array( 'global' => false, 'user' => false ), - 'dialogs' => array( 'global' => true, 'user' => true ) - ), - 'wgVectorFeatures' => array( - 'editwarning' => array( 'global' => false, 'user' => false ) - ) - ); - $includeFiles = array_merge( $includeFiles, $includes ); - $globalConfigs = array_merge( $globalConfigs, $configs ); - return true; - } -}
\ No newline at end of file diff --git a/extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php b/extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php deleted file mode 100644 index b4029d3a..00000000 --- a/extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/** - * To configure MW for these tests - * 1) If you are running multiple test suites, add the following in LocalSettings.php - * require_once("extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php"); - * $wgSeleniumTestConfigs['WikiEditorTestSuite'] = 'WikiEditorSeleniumConfig::getSettings'; - * OR - * 2) Add the following to your Localsettings.php - * require_once( "$IP/extensions/Vector/Vector.php" ); - * require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); - * $wgDefaultSkin = 'vector'; - * $wgVectorFeatures['editwarning'] = array( 'global' => false, 'user' => false ); - * $wgWikiEditorFeatures['templateEditor'] = array( 'global' => false, 'user' => false ); - * $wgWikiEditorFeatures['toolbar'] = array( 'global' => true, 'user' => true ); - * $wgWikiEditorFeatures['toc'] = array( 'global' => false, 'user' => false ); - * $wgWikiEditorFeatures['highlight'] = array( 'global' => false, 'user' => false ); - * $wgWikiEditorFeatures['dialogs'] = array( 'global' => true, 'user' => true ); - * - */ -class WikiEditorTestSuite extends SeleniumTestSuite -{ - public function setUp() { - $this->setLoginBeforeTests( false ); - parent::setUp(); - } - public function addTests() { - $testFiles = array( - 'extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php' - ); - parent::addTestFiles( $testFiles ); - } - - -} |