-
Notifications
You must be signed in to change notification settings - Fork 7
T/3 #78
Conversation
plugins: [ Enter, Typing, Paragraph, Undo, Bold, Italic, Heading ], | ||
toolbar: [ 'headings', 'bold', 'italic', 'undo', 'redo' ] | ||
} ) | ||
.then( editor => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't indent these lines.
tests/manual/spellchecking.md
Outdated
Try to correct all misspelled words using native spell checking mechanism in the browser. | ||
|
||
* Words should be corrected and selection placed after corrected word. _In Safari selection is placed | ||
at the beginning of corrected word. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing terminating _
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if this is a bug, you can link to the issue on GH to explain that this is a bug.
tests/spellchecking.js
Outdated
it( 'should replace with longer word (collapsed)', ( done ) => { | ||
emulateSpellcheckerInsertText( editor, 0, 12, 12, 'e' ); | ||
|
||
setTimeout( () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we avoid using setTimeout()
? Perhaps the check can be done on editor.document#changeDone
? It'll be more reliable (if the timeout is longer). Also, it'd be good to know that the changes are done immediately.
PS. When using listener to check such a thing there may be issues with the event being fired after the test terminated. This will cause crashing tests in an unpredictable manner. So make sure to use a proper afterEach()
with editor destroy. Also, you can secure it by using once()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made use of changesDone
event. I used once
and then off
in afterEach
instead of destroying editor every time - c38452a.
Very nice tests. I like such mechanisms which let you build many cases quickly and maintain them afterwards. A general remark – a shorter content of paragraphs would be better because the indexes would be lower :P. Always try to make tests as short as possible but not shorter :D |
Tests: Introduced integration tests for spellchecking. Closes ckeditor/ckeditor5#3034.
Additional information
Those tests covers only cases with spellchecking corrections on a non-styled text. The styled one will be covered in ckeditor/ckeditor5#3073.