Skip to content

Commit

Permalink
Merge pull request #8827 from ckeditor/i/8825
Browse files Browse the repository at this point in the history
Fix (horizontal-line): The horizontal line feature should require the `Widget` plugin. Closes #8825.

Fix (page-break): The page break feature should require the `Widget` plugin. Closes #8825.
  • Loading branch information
oleq authored Jan 13, 2021
2 parents 2025f40 + 6bf0717 commit 9f26d2b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/ckeditor5-horizontal-line/src/horizontalline.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
import HorizontalLineEditing from './horizontallineediting';
import HorizontalLineUI from './horizontallineui';

Expand All @@ -25,7 +26,7 @@ export default class HorizontalLine extends Plugin {
* @inheritDoc
*/
static get requires() {
return [ HorizontalLineEditing, HorizontalLineUI ];
return [ HorizontalLineEditing, HorizontalLineUI, Widget ];
}

/**
Expand Down
6 changes: 4 additions & 2 deletions packages/ckeditor5-horizontal-line/tests/horizontalline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

import Widget from '@ckeditor/ckeditor5-widget/src/widget';

import HorizontalLine from '../src/horizontalline';
import HorizontalLineEditing from '../src/horizontallineediting';
import HorizontalLineUI from '../src/horizontallineui';

describe( 'HorizontalLine', () => {
it( 'should require HorizontalLineEditing and HorizontalLineUI', () => {
expect( HorizontalLine.requires ).to.deep.equal( [ HorizontalLineEditing, HorizontalLineUI ] );
it( 'should require HorizontalLineEditing, HorizontalLineUI and Widget', () => {
expect( HorizontalLine.requires ).to.deep.equal( [ HorizontalLineEditing, HorizontalLineUI, Widget ] );
} );

it( 'should be named', () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/ckeditor5-page-break/src/pagebreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
import PageBreakEditing from './pagebreakediting';
import PageBreakUI from './pagebreakui';

Expand All @@ -25,7 +26,7 @@ export default class PageBreak extends Plugin {
* @inheritDoc
*/
static get requires() {
return [ PageBreakEditing, PageBreakUI ];
return [ PageBreakEditing, PageBreakUI, Widget ];
}

/**
Expand Down
6 changes: 4 additions & 2 deletions packages/ckeditor5-page-break/tests/pagebreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

import Widget from '@ckeditor/ckeditor5-widget/src/widget';

import PageBreak from '../src/pagebreak';
import PageBreakEditing from '../src/pagebreakediting';
import PageBreakUI from '../src/pagebreakui';

describe( 'PageBreak', () => {
it( 'should require PageBreakEditing and PageBreakUI', () => {
expect( PageBreak.requires ).to.deep.equal( [ PageBreakEditing, PageBreakUI ] );
it( 'should require PageBreakEditing, PageBreakUI and Widget', () => {
expect( PageBreak.requires ).to.deep.equal( [ PageBreakEditing, PageBreakUI, Widget ] );
} );

it( 'should be named', () => {
Expand Down

0 comments on commit 9f26d2b

Please sign in to comment.