@@ -44,13 +44,20 @@ describe( 'ClassicTestEditor', () => {
4444 expect ( editor . data . processor ) . to . be . instanceof ( HtmlDataProcessor ) ;
4545 } ) ;
4646
47- it ( 'creates editable DOM ' , ( ) => {
47+ it ( 'creates the instance of the editable (without rendering) ' , ( ) => {
4848 const editor = new ClassicTestEditor ( editorElement ) ;
4949
5050 expect ( editor . ui . view . editable ) . to . be . instanceOf ( InlineEditableUIView ) ;
51+ expect ( editor . ui . view . editable . isRendered ) . to . be . false ;
52+ } ) ;
53+
54+ it ( 'creates the #ui and ui#view (without rendering)' , ( ) => {
55+ const editor = new ClassicTestEditor ( editorElement ) ;
5156
52- expect ( editor . ui . view . editableElement . tagName ) . to . equal ( 'DIV' ) ;
53- expect ( editor . ui . view . editableElement ) . to . equal ( editor . ui . view . editable . element ) ;
57+ expect ( editor . ui ) . to . be . instanceOf ( EditorUI ) ;
58+ expect ( editor . ui . view ) . to . be . instanceOf ( BoxedEditorUIView ) ;
59+ expect ( editor . ui . view . isRendered ) . to . be . false ;
60+ expect ( editor . ui . view . editableElement ) . to . be . undefined ;
5461 } ) ;
5562
5663 it ( 'creates main root element' , ( ) => {
@@ -79,11 +86,14 @@ describe( 'ClassicTestEditor', () => {
7986 } ) ;
8087 } ) ;
8188
82- it ( 'creates and initializes the UI ' , ( ) => {
89+ it ( 'renders the view including #editable and sets #editableElement ' , ( ) => {
8390 return ClassicTestEditor . create ( editorElement , { foo : 1 } )
8491 . then ( editor => {
85- expect ( editor . ui ) . to . be . instanceOf ( EditorUI ) ;
86- expect ( editor . ui . view ) . to . be . instanceOf ( BoxedEditorUIView ) ;
92+ const view = editor . ui . view ;
93+
94+ expect ( view . isRendered ) . to . be . true ;
95+ expect ( view . editableElement . tagName ) . to . equal ( 'DIV' ) ;
96+ expect ( view . editableElement ) . to . equal ( view . editable . element ) ;
8797 } ) ;
8898 } ) ;
8999
0 commit comments