|
|
@@ -40,7 +40,7 @@ describe( 'TableEditing', () => {
|
|
|
} );
|
|
|
|
|
|
it( 'should set proper schema rules', () => {
|
|
|
- // table:
|
|
|
+ // Table:
|
|
|
expect( model.schema.isRegistered( 'table' ) ).to.be.true;
|
|
|
expect( model.schema.isObject( 'table' ) ).to.be.true;
|
|
|
expect( model.schema.isLimit( 'table' ) ).to.be.true;
|
|
|
@@ -49,14 +49,14 @@ describe( 'TableEditing', () => {
|
|
|
expect( model.schema.checkAttribute( [ '$root', 'table' ], 'headingRows' ) ).to.be.true;
|
|
|
expect( model.schema.checkAttribute( [ '$root', 'table' ], 'headingColumns' ) ).to.be.true;
|
|
|
|
|
|
- // table row:
|
|
|
+ // Table row:
|
|
|
expect( model.schema.isRegistered( 'tableRow' ) ).to.be.true;
|
|
|
expect( model.schema.isLimit( 'tableRow' ) ).to.be.true;
|
|
|
|
|
|
expect( model.schema.checkChild( [ '$root' ], 'tableRow' ) ).to.be.false;
|
|
|
expect( model.schema.checkChild( [ 'table' ], 'tableRow' ) ).to.be.true;
|
|
|
|
|
|
- // table cell:
|
|
|
+ // Table cell:
|
|
|
expect( model.schema.isRegistered( 'tableCell' ) ).to.be.true;
|
|
|
expect( model.schema.isLimit( 'tableCell' ) ).to.be.true;
|
|
|
|
|
|
@@ -68,9 +68,10 @@ describe( 'TableEditing', () => {
|
|
|
expect( model.schema.checkAttribute( [ 'tableCell' ], 'colspan' ) ).to.be.true;
|
|
|
expect( model.schema.checkAttribute( [ 'tableCell' ], 'rowspan' ) ).to.be.true;
|
|
|
|
|
|
- // table cell contents:
|
|
|
- expect( model.schema.checkChild( [ 'tableCell' ], '$text' ) ).to.be.true;
|
|
|
- expect( model.schema.checkChild( [ 'tableCell' ], '$block' ) ).to.be.true;
|
|
|
+ // Table cell contents:
|
|
|
+ expect( model.schema.checkChild( [ '$root', 'table', 'tableRow', 'tableCell' ], '$text' ) ).to.be.true;
|
|
|
+ expect( model.schema.checkChild( [ '$root', 'table', 'tableRow', 'tableCell' ], '$block' ) ).to.be.true;
|
|
|
+ expect( model.schema.checkChild( [ '$root', 'table', 'tableRow', 'tableCell' ], 'table' ) ).to.be.false;
|
|
|
} );
|
|
|
|
|
|
it( 'adds insertTable command', () => {
|