|
|
@@ -131,7 +131,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'sideStyle' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'sideStyle', image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image side-class"><img src="foo.png"></figure>' );
|
|
|
@@ -146,7 +146,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', null );
|
|
|
+ batch.setAttribute( 'imageStyle', null, image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
|
|
|
@@ -161,7 +161,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'sideStyle' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'sideStyle', image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image side-class"><img src="foo.png"></figure>' );
|
|
|
@@ -172,7 +172,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
);
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'dummyStyle' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'dummyStyle', image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image dummy-class"><img src="foo.png"></figure>' );
|
|
|
@@ -193,7 +193,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'sideStyle' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'sideStyle', image );
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
|
|
|
@@ -211,7 +211,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', null );
|
|
|
+ batch.setAttribute( 'imageStyle', null, image );
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
|
|
|
@@ -229,7 +229,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'sideStyle' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'sideStyle', image );
|
|
|
} );
|
|
|
|
|
|
expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
|
|
|
@@ -243,7 +243,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'foo' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'foo', image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
|
|
|
@@ -258,7 +258,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', 'foo' );
|
|
|
+ batch.setAttribute( 'imageStyle', 'foo', image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
|
|
|
@@ -273,7 +273,7 @@ describe( 'ImageStyleEngine', () => {
|
|
|
const batch = document.batch();
|
|
|
|
|
|
document.enqueueChanges( () => {
|
|
|
- batch.setAttribute( image, 'imageStyle', null );
|
|
|
+ batch.setAttribute( 'imageStyle', null, image );
|
|
|
} );
|
|
|
|
|
|
expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
|