|
@@ -8,7 +8,7 @@
|
|
|
import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
|
|
import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
|
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
|
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
|
|
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
|
|
|
-import { getData as getModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
|
|
|
|
|
|
+import { getData as getModelData, setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
|
|
|
|
|
|
|
import Undo from '@ckeditor/ckeditor5-undo/src/undo';
|
|
import Undo from '@ckeditor/ckeditor5-undo/src/undo';
|
|
|
import Batch from '@ckeditor/ckeditor5-engine/src/model/batch';
|
|
import Batch from '@ckeditor/ckeditor5-engine/src/model/batch';
|
|
@@ -21,6 +21,7 @@ import TableCellPropertiesEditing from '../../src/tablecellproperties/tablecellp
|
|
|
import TableCellPropertiesUI from '../../src/tablecellproperties/tablecellpropertiesui';
|
|
import TableCellPropertiesUI from '../../src/tablecellproperties/tablecellpropertiesui';
|
|
|
import TableCellPropertiesUIView from '../../src/tablecellproperties/ui/tablecellpropertiesview';
|
|
import TableCellPropertiesUIView from '../../src/tablecellproperties/ui/tablecellpropertiesview';
|
|
|
import { defaultColors } from '../../src/ui/utils';
|
|
import { defaultColors } from '../../src/ui/utils';
|
|
|
|
|
+import { modelTable } from '../_utils/utils';
|
|
|
|
|
|
|
|
describe( 'table cell properties', () => {
|
|
describe( 'table cell properties', () => {
|
|
|
describe( 'TableCellPropertiesUI', () => {
|
|
describe( 'TableCellPropertiesUI', () => {
|
|
@@ -529,6 +530,19 @@ describe( 'table cell properties', () => {
|
|
|
expect( firstBatch ).to.not.equal( secondBatch );
|
|
expect( firstBatch ).to.not.equal( secondBatch );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
|
|
+ it( 'should show the ui for multi-cell selection', () => {
|
|
|
|
|
+ setData( editor.model, modelTable( [ [ '01', '02' ] ] ) );
|
|
|
|
|
+ editor.model.change( writer => {
|
|
|
|
|
+ writer.setSelection( [
|
|
|
|
|
+ writer.createRangeOn( editor.model.document.getRoot().getNodeByPath( [ 0, 0, 0 ] ) ),
|
|
|
|
|
+ writer.createRangeOn( editor.model.document.getRoot().getNodeByPath( [ 0, 0, 1 ] ) )
|
|
|
|
|
+ ], 0 );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
|
|
+ tableCellPropertiesButton.fire( 'execute' );
|
|
|
|
|
+ expect( contextualBalloon.visibleView ).to.equal( tableCellPropertiesView );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
describe( 'initial data', () => {
|
|
describe( 'initial data', () => {
|
|
|
it( 'should be set from the command values', () => {
|
|
it( 'should be set from the command values', () => {
|
|
|
editor.commands.get( 'tableCellBorderStyle' ).value = 'a';
|
|
editor.commands.get( 'tableCellBorderStyle' ).value = 'a';
|