From 87725f05d5f7fe86649525ce69794b77e3c5f101 Mon Sep 17 00:00:00 2001 From: Mateusz Samsel Date: Fri, 21 Jul 2017 10:42:46 +0200 Subject: [PATCH] Review fixes --- tests/plugins/stylescombo/manual/stylewithnoselection.md | 6 +++--- tests/plugins/stylescombo/stylescombo.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/plugins/stylescombo/manual/stylewithnoselection.md b/tests/plugins/stylescombo/manual/stylewithnoselection.md index bab1aee6dba..c1d247bfb64 100644 --- a/tests/plugins/stylescombo/manual/stylewithnoselection.md +++ b/tests/plugins/stylescombo/manual/stylewithnoselection.md @@ -3,9 +3,9 @@ @bender-ckeditor-plugins: wysiwygarea, toolbar, stylescombo 1. Open browser console. -1. Press empty button in toolbar,next to style selection. -1. Press style drop down menu to open style list. +1. Press empty button in toolbar. It's located on the right next to the styles' list. +1. Open styles' list and check if there anyting appear in the console. -**Expected:** There is nothing happen. +**Expected:** There is no error in the console. **Unexpected:** Error is logged in console. diff --git a/tests/plugins/stylescombo/stylescombo.js b/tests/plugins/stylescombo/stylescombo.js index 2efc9c46dbc..803162c7ffb 100644 --- a/tests/plugins/stylescombo/stylescombo.js +++ b/tests/plugins/stylescombo/stylescombo.js @@ -73,6 +73,8 @@ var editor = bot.editor; var selection = editor.getSelection(); + // During opening combo is modifying selection, what force selection to be at the beginning of editable. + // Stub resets native selection before every execution of `getNative`, to properly simulate error case. var stub = sinon.stub( CKEDITOR.dom.selection.prototype, 'getNative', function() { if ( typeof window.getSelection != 'function' ) { this.document.$.selection.empty();