Mglaser has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/176922

Change subject: Enabled colorpicker plugin
......................................................................

Enabled colorpicker plugin

This enables a visual colorpicker in TinyMCE dialogues.

Change-Id: Iea596772a7daee51b801d334080f9bc40ba411cd
---
A Checklist/tests/phpunit/ChecklistTest.php
M VisualEditor/VisualEditor.class.php
2 files changed, 69 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/22/176922/1

diff --git a/Checklist/tests/phpunit/ChecklistTest.php 
b/Checklist/tests/phpunit/ChecklistTest.php
new file mode 100644
index 0000000..d672057
--- /dev/null
+++ b/Checklist/tests/phpunit/ChecklistTest.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * @group Checklist
+ * @group BlueSpiceExtensions
+ * @covers Checklist
+ */
+class ChecklistTest extends MediaWikiTestCase {
+       protected function setUp() {
+               parent::setUp();
+               $this->extension = new Checklist();
+       }
+
+       protected function tearDown() {
+               unset( $this->extension );
+               parent::tearDown();
+  }
+
+       public function testPregReplaceNth() {
+               // Input test data
+               $sContent = '<bs:checklist value="test" /><bs:checklist 
value="test" /><bs:checklist value="test" />';
+
+               // Test call of method
+               $res = Checklist::preg_replace_nth("/(<bs:checklist 
)([^>]*?>)/", "$1".'value="new" '."$2", $sContent, 2);
+
+               // Make sure result is ok
+               $this->assertTrue(
+                               $res == '<bs:checklist value="test" 
/><bs:checklist value="new1" /><bs:checklist value="test" />',
+                               "replacement of 2nd element failed"
+               );
+       }
+
+       public function testOnVisualEditorConfig() {
+               $aConfigStandard = array(
+                       "toolbar1" => array(
+                               "test",
+                               "unlink",
+                               "test1"
+                       ),
+                       "contextmenu" => "bsContextMenuMarker"
+               );
+               $aConfigOverwrite = array();
+               $aLoaderUsingDeps = array();
+
+               $this->extension->onVisualEditorConfig( $aConfigStandard, 
$aConfigOverwrite, $aLoaderUsingDeps );
+
+               $this->assertTrue(
+                               $aConfigStandard["toolbar1"][2] == "bscheckbox",
+                               "Checkbox item not inserted in toobar"
+               );
+               $this->assertTrue(
+                               $aConfigStandard["contextmenu"] == 
"bsContextMenuMarker bsChecklist",
+                               "Checkbox menu item not inserted in contextmenu"
+               );
+               $this->assertTrue(
+                               in_array('ext.bluespice.checklist', 
$aLoaderUsingDeps),
+                               "Checkbox ext module is not loaded"
+               );
+       }
+
+       public function testAjaxGetItemStoreData() {
+               $res = Checklist::ajaxGetItemStoreData();
+               $this->assertTrue(
+                               $res == "[]",
+                               "ItemStoreData is not empty"
+               );
+       }
+}
\ No newline at end of file
diff --git a/VisualEditor/VisualEditor.class.php 
b/VisualEditor/VisualEditor.class.php
index 25aec9b..b6876a1 100644
--- a/VisualEditor/VisualEditor.class.php
+++ b/VisualEditor/VisualEditor.class.php
@@ -68,7 +68,8 @@
                        //"link" //Needed for "unlink"
                        //"autoresize",
                        "charmap",
-                       "noneditable"
+                       "noneditable",
+                       "colorpicker"
                ),
                'external_plugins' => array(
                        'bswikicode'  => 
'../tiny_mce_plugins/bswikicode/plugin.js',

-- 
To view, visit https://gerrit.wikimedia.org/r/176922
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea596772a7daee51b801d334080f9bc40ba411cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to