Skip to content

Commit

Permalink
use triggerDelete instead of execCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Aug 12, 2015
1 parent 44ec6c9 commit c0a84a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/acceptance/editor-sections-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ test('deleting across 0 sections merges them', (assert) => {
p1 = $('#editor p:eq(1)')[0];

Helpers.dom.selectText('tion', p0, 'sec', p1);
document.execCommand('delete', false);
Helpers.dom.triggerDelete(editor);

assert.equal($('#editor p').length, 1, 'has only 1 paragraph after deletion');
assert.hasElement('#editor p:contains(first second section)',
Expand All @@ -189,9 +189,7 @@ test('deleting across 1 section removes it, joins the 2 boundary sections', (ass
assert.ok(p0 && p1 && p2, 'precond - paragraphs exist');

Helpers.dom.selectText('section', p0, 'third ', p2);

document.execCommand('delete', false);

Helpers.dom.triggerDelete(editor);

assert.equal($('#editor p').length, 1, 'has only 1 paragraph after deletion');
assert.hasElement('#editor p:contains(first section)',
Expand Down

0 comments on commit c0a84a9

Please sign in to comment.