Sfoglia il codice sorgente

Tests: Aligned the test to the LabeledInputView API with #isReadOnly attribute.

Aleksander Nowodzinski 8 anni fa
parent
commit
e23b3208c4

+ 2 - 2
packages/ckeditor5-theme-lark/tests/manual/theme.html

@@ -102,5 +102,5 @@
 	<h3>Labeled</h3>
 	<div id="input-labeled" class="ck-reset_all"></div>
 
-	<h3>Disabled</h3>
-	<div id="input-disabled" class="ck-reset_all"></div>
+	<h3>Read–only</h3>
+	<div id="input-read-only" class="ck-reset_all"></div>

+ 7 - 7
packages/ckeditor5-theme-lark/tests/manual/theme.js

@@ -72,7 +72,7 @@ const ui = testUtils.createTestUIView( {
 	'toolbarMultiRow': '#toolbar-multi-row',
 
 	'inputLabeled': '#input-labeled',
-	'inputDisabled': '#input-disabled'
+	'inputReadOnly': '#input-read-only'
 } );
 
 renderIcon();
@@ -309,10 +309,10 @@ function renderToolbar() {
 
 function renderInput() {
 	ui.inputLabeled.add( input() );
-	ui.inputDisabled.add( input( {
-		label: 'A disabled input',
-		isEnabled: false,
-		value: 'Disabled input value'
+	ui.inputReadOnly.add( input( {
+		label: 'A read–only input',
+		isReadOnly: true,
+		value: 'Read–only input value'
 	} ) );
 }
 
@@ -373,12 +373,12 @@ function toolbarNewLine() {
 
 function input( {
 	label = 'Labeled input',
-	isEnabled = true,
+	isReadOnly = false,
 	value = 'The value of the input'
 } = {} ) {
 	const labeledInput = new LabeledInputView( {}, InputTextView );
 
-	labeledInput.set( { isEnabled, label, value } );
+	labeledInput.set( { isReadOnly, label, value } );
 
 	return labeledInput;
 }