@@ -8,9 +8,10 @@ import { EditorComponent, TINYMCE_SCRIPT_SRC } from '../../../main/ts/public_api
88import { Version } from '../../../main/ts/editor/editor.component' ;
99import { editorHook , tinymceVersionHook } from '../alien/TestHooks' ;
1010import type { Editor } from 'tinymce' ;
11- import { deleteTinymce } from '../alien/TestHelpers' ;
11+ import { apiKey , deleteTinymce } from '../alien/TestHelpers' ;
1212
1313describe ( 'LoadTinyTest' , ( ) => {
14+ const key = apiKey ( ) ;
1415 const assertTinymceVersion = ( version : Version , editor : Editor ) => {
1516 Assertions . assertEq ( `Loaded version of TinyMCE should be ${ version } ` , version , editor . editorManager . majorVersion ) ;
1617 Assertions . assertEq ( `Loaded version of TinyMCE should be ${ version } ` , version , Global . tinymce . majorVersion ) ;
@@ -46,19 +47,18 @@ describe('LoadTinyTest', () => {
4647 } ) ;
4748 }
4849
49- for ( const version of [ '5' , '6' , '7' , '8' ] as Version [ ] ) {
50+ for ( const version of [ '4' , ' 5', '6' , '7' , '8' ] as Version [ ] ) {
5051 context ( `With cloud version ${ version } ` , ( ) => {
5152 const createFixture = editorHook ( EditorComponent ) ;
5253
5354 before ( deleteTinymce ) ;
5455
5556 it ( `Should be able to load TinyMCE ${ version } from Cloud` , async ( ) => {
56- const apiKey = 'fake-api-key' ;
57- const { editor } = await createFixture ( { cloudChannel : version , apiKey } ) ;
57+ const { editor } = await createFixture ( { cloudChannel : version , apiKey : key } ) ;
5858 assertTinymceVersion ( version , editor ) ;
5959 Assertions . assertEq (
6060 'TinyMCE should have been loaded from Cloud' ,
61- `https://cdn.tiny.cloud/1/${ apiKey } /tinymce/${ version } ` ,
61+ `https://cdn.tiny.cloud/1/${ key } /tinymce/${ version } ` ,
6262 Global . tinymce . baseURI . source
6363 ) ;
6464 } ) ;
0 commit comments