Commit c28d3b68 authored by panr's avatar panr

Update Decoupled Editor tests

parent d4c8e8f7
...@@ -192,6 +192,7 @@ describe( 'DecoupledEditor build', () => { ...@@ -192,6 +192,7 @@ describe( 'DecoupledEditor build', () => {
editor.setData( data ); editor.setData( data );
expect( editor.getData() ).to.equal( data ); expect( editor.getData() ).to.equal( data );
expect( editor.model.document.selection.getAttribute( 'fontSize' ) ).to.equal( 'big' );
} ); } );
it( 'font family works', () => { it( 'font family works', () => {
...@@ -199,13 +200,23 @@ describe( 'DecoupledEditor build', () => { ...@@ -199,13 +200,23 @@ describe( 'DecoupledEditor build', () => {
editor.setData( data ); editor.setData( data );
expect( editor.getData() ).to.equal( data ); expect( editor.getData() ).to.equal( data );
expect( editor.model.document.selection.getAttribute( 'fontFamily' ) ).to.equal( 'Georgia' );
} ); } );
it( 'highlight works', () => { it( 'font background color works', () => {
const data = '<p><mark class="marker-green">foo</mark></p>'; const data = '<p><span style="background-color:gold;">foo</span></p>';
editor.setData( data ); editor.setData( data );
expect( editor.getData() ).to.equal( data ); expect( editor.getData() ).to.equal( data );
expect( editor.model.document.selection.getAttribute( 'fontBackgroundColor' ) ).to.equal( 'gold' );
} );
it( 'font color works', () => {
const data = '<p><span style="color:red;">foo</span></p>';
editor.setData( data );
expect( editor.getData() ).to.equal( data );
expect( editor.model.document.selection.getAttribute( 'fontColor' ) ).to.equal( 'red' );
} ); } );
it( 'alignment works', () => { it( 'alignment works', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment