Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Make special expect statement for Edge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed May 31, 2019
1 parent f774121 commit 888bd88
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions tests/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Font from '../src/font';
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
import env from '@ckeditor/ckeditor5-utils/src/env';

describe( 'Integration test Font', () => {
let element, editor, model;
Expand Down Expand Up @@ -41,15 +42,28 @@ describe( 'Integration test Font', () => {
'</paragraph>'
);

expect( editor.getData() ).to.equal(
'<p>' +
'<span ' +
'class="text-big" ' +
'style="font-family:Arial, Helvetica, sans-serif;background-color:rgb(10,20,30);color:#123456;"' +
'>foo' +
'</span>' +
'</p>'
);
if ( !env.isEdge ) {
expect( editor.getData() ).to.equal(
'<p>' +
'<span ' +
'class="text-big" ' +
'style="font-family:Arial, Helvetica, sans-serif;background-color:rgb(10,20,30);color:#123456;"' +
'>foo' +
'</span>' +
'</p>'
);
} else {
// Edge sorts attributes of an element.
expect( editor.getData() ).to.equal(
'<p>' +
'<span ' +
'class="text-big" ' +
'style="font-family:Arial, Helvetica, sans-serif;color:#123456;background-color:rgb(10,20,30);"' +
'>foo' +
'</span>' +
'</p>'
);
}
} );
} );

Expand Down

0 comments on commit 888bd88

Please sign in to comment.