|
@@ -2157,13 +2157,13 @@ describe( 'Writer', () => {
|
|
|
it( 'should throw if options.usingOperation is not defined', () => {
|
|
it( 'should throw if options.usingOperation is not defined', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name' );
|
|
addMarker( 'name' );
|
|
|
- }, /^writer-addMarker-no-usingOperation/, model );
|
|
|
|
|
|
|
+ }, '^writer-addmarker-no-usingoperation', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw if name and range is defined but options.usingOperation is not defined', () => {
|
|
it( 'should throw if name and range is defined but options.usingOperation is not defined', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name', { range } );
|
|
addMarker( 'name', { range } );
|
|
|
- }, /^writer-addMarker-no-usingOperation/, model );
|
|
|
|
|
|
|
+ }, '^writer-addmarker-no-usingoperation', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should add marker to the document marker collection', () => {
|
|
it( 'should add marker to the document marker collection', () => {
|
|
@@ -2215,7 +2215,7 @@ describe( 'Writer', () => {
|
|
|
|
|
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name', { range: range2, usingOperation: false } );
|
|
addMarker( 'name', { range: range2, usingOperation: false } );
|
|
|
- }, /^writer-addMarker-marker-exists/, model );
|
|
|
|
|
|
|
+ }, 'writer-addmarker-marker-exists', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should use operations when having set usingOperation to true', () => {
|
|
it( 'should use operations when having set usingOperation to true', () => {
|
|
@@ -2235,13 +2235,13 @@ describe( 'Writer', () => {
|
|
|
it( 'should throw if marker with given name does not exist and range is not passed', () => {
|
|
it( 'should throw if marker with given name does not exist and range is not passed', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name', { usingOperation: true } );
|
|
addMarker( 'name', { usingOperation: true } );
|
|
|
- }, /^writer-addMarker-no-range/, model );
|
|
|
|
|
|
|
+ }, 'writer-addmarker-no-range', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw if marker is set directly and range is not passed', () => {
|
|
it( 'should throw if marker is set directly and range is not passed', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name', { usingOperation: false } );
|
|
addMarker( 'name', { usingOperation: false } );
|
|
|
- }, /^writer-addMarker-no-range/, model );
|
|
|
|
|
|
|
+ }, 'writer-addmarker-no-range', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw when trying to use detached writer', () => {
|
|
it( 'should throw when trying to use detached writer', () => {
|
|
@@ -2487,13 +2487,13 @@ describe( 'Writer', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
addMarker( 'name', { range, usingOperation: false } );
|
|
addMarker( 'name', { range, usingOperation: false } );
|
|
|
updateMarker( 'name', {} );
|
|
updateMarker( 'name', {} );
|
|
|
- }, /^writer-updateMarker-wrong-options/, model );
|
|
|
|
|
|
|
+ }, 'writer-updatemarker-wrong-options', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw when marker provided by name does not exists', () => {
|
|
it( 'should throw when marker provided by name does not exists', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
updateMarker( 'name', { usingOperation: false } );
|
|
updateMarker( 'name', { usingOperation: false } );
|
|
|
- }, /^writer-updateMarker-marker-not-exists/, model );
|
|
|
|
|
|
|
+ }, 'writer-updatemarker-marker-not-exists', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should only refresh the marker when there is no provided options to update', () => {
|
|
it( 'should only refresh the marker when there is no provided options to update', () => {
|
|
@@ -2540,7 +2540,7 @@ describe( 'Writer', () => {
|
|
|
it( 'should throw when trying to remove non existing marker', () => {
|
|
it( 'should throw when trying to remove non existing marker', () => {
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
removeMarker( 'name' );
|
|
removeMarker( 'name' );
|
|
|
- }, /^writer-removeMarker-no-marker/, model );
|
|
|
|
|
|
|
+ }, 'writer-removemarker-no-marker', model );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw when trying to use detached writer', () => {
|
|
it( 'should throw when trying to use detached writer', () => {
|