diff --git a/docs/getting-started/licensing/license-key-and-activation.md b/docs/getting-started/licensing/license-key-and-activation.md index 72db1cf12dd..32a90e3807a 100644 --- a/docs/getting-started/licensing/license-key-and-activation.md +++ b/docs/getting-started/licensing/license-key-and-activation.md @@ -117,8 +117,7 @@ This key grants access to your subscription features. It does not consume editor * **Features**: Grants access to subscription features. * **Functionality**: - * Similar to the trial license, the editor is limited functionally, including session time and the number of changes allowed. - * Additionally, there are limitations on development domains. The editor can be used in the following domains: `localhost`, `*.test`, `*.localhost`, `*.local`, and IP addresses: `127.0.0.1`, `192.168.*.*`, `10.*.*.*`, `172.*.*.*`. + * Limitations on development domains apply on usage-based plans. The editor can be used in the following domains: `localhost`, `*.test`, `*.localhost`, `*.local`, and IP addresses: `127.0.0.1`, `192.168.*.*`, `10.*.*.*`, `172.*.*.*`. * The editor will show a banner informing it was launched for development purposes. * **Intended use**: Designed for development environments such as local work, continuous integration (CI), and end-to-end (E2E) tests. * **Usage limitation**: Must not be used for production environments. diff --git a/packages/ckeditor5-core/src/editor/editor.ts b/packages/ckeditor5-core/src/editor/editor.ts index b6f1ab010bc..55f75d65be9 100644 --- a/packages/ckeditor5-core/src/editor/editor.ts +++ b/packages/ckeditor5-core/src/editor/editor.ts @@ -525,8 +525,8 @@ export default abstract class Editor extends /* #__PURE__ */ ObservableMixin() { return; } - if ( [ 'evaluation', 'trial', 'development' ].includes( licensePayload.licenseType ) ) { - const licenseType: 'evaluation' | 'trial' | 'development' = licensePayload.licenseType; + if ( [ 'evaluation', 'trial' ].includes( licensePayload.licenseType ) ) { + const licenseType: 'evaluation' | 'trial' = licensePayload.licenseType; console.info( `You are using the ${ licenseType } version of CKEditor 5 with limited usage. ` + @@ -542,6 +542,13 @@ export default abstract class Editor extends /* #__PURE__ */ ObservableMixin() { } ); } + if ( licensePayload.licenseType === 'development' ) { + console.info( + 'You are using the development version of CKEditor 5. ' + + 'Make sure you will not use it in the production environment.' + ); + } + if ( licensePayload.usageEndpoint ) { editor.once( 'ready', () => { const request = { diff --git a/packages/ckeditor5-core/tests/editor/licensecheck.js b/packages/ckeditor5-core/tests/editor/licensecheck.js index b5a2701f2de..74be3944912 100644 --- a/packages/ckeditor5-core/tests/editor/licensecheck.js +++ b/packages/ckeditor5-core/tests/editor/licensecheck.js @@ -441,8 +441,8 @@ describe( 'Editor - license check', () => { expect( editor.isReadOnly ).to.be.false; sinon.assert.calledOnce( consoleInfoStub ); - sinon.assert.calledWith( consoleInfoStub, 'You are using the development version of CKEditor 5 with ' + - 'limited usage. Make sure you will not use it in the production environment.' ); + sinon.assert.calledWith( consoleInfoStub, 'You are using the development version of CKEditor 5. ' + + 'Make sure you will not use it in the production environment.' ); } ); it( 'should not block the editor if 10 minutes have not passed (development license)', () => { @@ -466,7 +466,7 @@ describe( 'Editor - license check', () => { dateNow.restore(); } ); - it( 'should block editor after 10 minutes (development license)', () => { + it( 'should not block editor after 10 minutes (development license)', () => { const { licenseKey, todayTimestamp } = generateKey( { licenseType: 'development' } ); @@ -480,13 +480,13 @@ describe( 'Editor - license check', () => { sinon.clock.tick( 600100 ); - sinon.assert.calledWithMatch( showErrorStub, 'developmentLimit' ); - expect( editor.isReadOnly ).to.be.true; + sinon.assert.notCalled( showErrorStub ); + expect( editor.isReadOnly ).to.be.false; dateNow.restore(); } ); - it( 'should clear timer on editor destroy', done => { + it( 'should not interact with timers', done => { const { licenseKey, todayTimestamp } = generateKey( { licenseType: 'development' } ); @@ -497,7 +497,7 @@ describe( 'Editor - license check', () => { editor.fire( 'ready' ); editor.on( 'destroy', () => { - sinon.assert.calledOnce( clearTimeoutSpy ); + sinon.assert.notCalled( clearTimeoutSpy ); done(); } );