浏览代码

Tests: Added the compact ToolbarView to the manual test.

Aleksander Nowodzinski 6 年之前
父节点
当前提交
0e789b05de

+ 3 - 0
packages/ckeditor5-theme-lark/tests/manual/theme.html

@@ -120,6 +120,9 @@
 	<h3>Toolbar: Multi-row</h3>
 	<div id="toolbar-multi-row" class="ck ck-reset_all"></div>
 
+	<h3>Toolbar: Compact</h3>
+	<div id="toolbar-compact" class="ck ck-reset_all"></div>
+
 <h2>Inputs</h2>
 
 	<h3>Labeled</h3>

+ 23 - 0
packages/ckeditor5-theme-lark/tests/manual/theme.js

@@ -80,6 +80,7 @@ const ui = testUtils.createTestUIView( {
 	'toolbarWrap': '#toolbar-wrap',
 	'toolbarSeparator': '#toolbar-separator',
 	'toolbarMultiRow': '#toolbar-multi-row',
+	'toolbarCompact': '#toolbar-compact',
 
 	'inputLabeled': '#input-labeled',
 	'inputReadOnly': '#input-read-only'
@@ -485,6 +486,28 @@ function renderToolbar() {
 			icon: boldIcon
 		} )
 	] ) );
+
+	// --- Compact ------------------------------------------------------------
+
+	const compactToolbar = toolbar( [
+		button( {
+			icon: boldIcon,
+			withText: false
+		} ),
+		button( {
+			icon: italicIcon,
+			withText: false,
+			isOn: true
+		} ),
+		button( {
+			icon: cancelIcon,
+			withText: false
+		} )
+	] );
+
+	compactToolbar.isCompact = true;
+
+	ui.toolbarCompact.add( compactToolbar );
 }
 
 function renderInput() {