From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- extensions/WikiEditor/.gitreview | 6 - extensions/WikiEditor/.jshintignore | 2 - extensions/WikiEditor/.jshintrc | 9 - .../tests/selenium/WikiDialogs_Links.php | 67 ----- .../tests/selenium/WikiDialogs_Links_Setup.php | 295 --------------------- .../tests/selenium/WikiEditorConstants.php | 84 ------ .../tests/selenium/WikiEditorSeleniumConfig.php | 27 -- .../tests/selenium/WikiEditorTestSuite.php | 35 --- 8 files changed, 525 deletions(-) delete mode 100644 extensions/WikiEditor/.gitreview delete mode 100644 extensions/WikiEditor/.jshintignore delete mode 100644 extensions/WikiEditor/.jshintrc delete mode 100644 extensions/WikiEditor/tests/selenium/WikiDialogs_Links.php delete mode 100644 extensions/WikiEditor/tests/selenium/WikiDialogs_Links_Setup.php delete mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorConstants.php delete mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorSeleniumConfig.php delete mode 100644 extensions/WikiEditor/tests/selenium/WikiEditorTestSuite.php (limited to 'extensions/WikiEditor') 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 @@ -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 @@ -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 @@ - '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 @@ - 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 ); - } - - -} -- cgit v1.2.3-54-g00ecf