Ckeditor5: Manual tests do not work

Created on 19 Nov 2018  Â·  11Comments  Â·  Source: ckeditor/ckeditor5

ckeditorerror.js:46 Uncaught CKEditorError: view-createPositionAt-offset-required: View#createPositionAt() requires the offset when the first parameter is a view item. 
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-view-createPositionAt-offset-required

Not sure about the rest.

engine bug

Most helpful comment

I'll repeat what I told @pomek - I am not sure how it worked before but it makes sense that it is impossible to set selection after X UI element. These two view positions are equal in the model, so if the conversion flow is view (current) -> model -> view (expected) then the current and expected view can be different, so I am not shocked that the selection is moved before X.

All 11 comments

http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.html this test throws an error:

Uncaught CKEditorError: view-renderer-filler-was-lost: The inline filler node was lost. 
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-view-renderer-filler-was-lost


    at Renderer._removeInlineFiller (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:43858:10)
    at Renderer.render (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:43651:9)
    at View._render (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46864:18)
    at View.on (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46472:9)
    at View.fire (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:49630:29)
    at View.change (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46686:9)
    at View.render (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46700:8)
    at MutationObserver._onMutations (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:42076:13)

http://localhost:8125/ckeditor5-engine/tests/view/manual/noselection-iframe.html

renderer.js:394 Uncaught TypeError: Cannot read property 'removeChild' of null
    at Renderer._removeInlineFiller (renderer.js:394)
    at Renderer.render (renderer.js:183)
    at View._render (view.js:554)
    at View.on (view.js:162)
    at View.fire (emittermixin.js:196)
    at View.change (view.js:376)
    at View.render (view.js:390)
    at MutationObserver._onMutations (mutationobserver.js:251)
_removeInlineFiller @ renderer.js:394
render @ renderer.js:183
_render @ view.js:554
View.on @ view.js:162
fire @ emittermixin.js:196
change @ view.js:376
render @ view.js:390
_onMutations @ mutationobserver.js:251
childList (async)
remove @ remove.js:19
_updateChildren @ renderer.js:557
render @ renderer.js:203
_render @ view.js:554
View.on @ view.js:162
fire @ emittermixin.js:196
change @ view.js:376
setData @ view.js:100
./packages/ckeditor5-engine/tests/view/manual/noselection-iframe.js @ noselection-iframe.js:18
__webpack_require__ @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ bootstrap:83
ckeditorerror.js:46 Uncaught CKEditorError: cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-cannot-change-view-tree


    at View.change (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46661:10)
    at View.render (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:46700:8)
    at _renderTimeoutId.setTimeout (http://localhost:8125/ckeditor5-engine/tests/view/manual/immutable.js:41647:51)

http://localhost:8125/ckeditor5-engine/tests/view/manual/uielement.html

I am not able to put a caret after X:

image

Chrome, Firefox and Safari.

I've just pushed the branch t/1592 that fixes some of manual tests.

BTW, old Position.createAt( el ) should be replaced with createAt( el, 0 ), not createAt( el, 'in' ).

I fixed all tests except the one – uielement.html – I am not able to put selection after X (UI element).

  • immutable.html failed because of Grammarly (I didn't disable it for localhost facepalm),
  • noselection-iframe.html failed because when we were removing Bender, I made a mistake (https://github.com/ckeditor/ckeditor5-engine/commit/8b3ee0ef419a1761f26444b9462d492ad6b28763#diff-c67f7e8e2a9b57c71703b6a384ab1795L1).

The rest manual tests are fine.

http://localhost:8125/ckeditor5-engine/tests/view/manual/uielement.html

I asked @scofalik about this test – is it a bug or not and he answered that not. So I'm going to prepare a PR.

cc @scofalik regarding uielement.html's failure.

I'll repeat what I told @pomek - I am not sure how it worked before but it makes sense that it is impossible to set selection after X UI element. These two view positions are equal in the model, so if the conversion flow is view (current) -> model -> view (expected) then the current and expected view can be different, so I am not shocked that the selection is moved before X.

Makes sense. Once you wrote it, I also think that it worked this way previously. @pomek, you could perhaps clarify this in the manual test description.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pomek picture pomek  Â·  3Comments

oleq picture oleq  Â·  3Comments

hamenon picture hamenon  Â·  3Comments

oleq picture oleq  Â·  3Comments

Reinmar picture Reinmar  Â·  3Comments