Skip to content

Commit

Permalink
Comment of @bantic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoran Brondsema committed May 11, 2016
1 parent de1d869 commit b033f02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/acceptance/editor-selections-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ test('when editing is disabled, the selection detection code is disabled', (asse
editor.render(editorElement);
editor.disableEditing();

let firstSection = $('p:contains(one trick pony)')[0];
let outsideSection = $('p:contains(outside section)')[0];
const firstSection = $('p:contains(one trick pony)')[0];
const outsideSection = $('p:contains(outside section)')[0];

Helpers.dom.selectText(editor ,'trick', firstSection,
'outside', outsideSection);

Helpers.dom.triggerEvent(document, 'mouseup');

assert.equal(editor.activeSections.length, 0, 'no selection inside the editor');
// Edge and IE11 do not introduce newlines
assert.equal(Helpers.dom.getSelectedText().replace(/\n/g, ''), "trick ponyoutside");
const selectedText = Helpers.dom.getSelectedText();
assert.ok(selectedText.indexOf('trick pony') !== -1 && selectedText.indexOf('outside') !== -1, 'selects the text');
});

test('selecting an entire section and deleting removes it', (assert) => {
Expand Down

0 comments on commit b033f02

Please sign in to comment.