Skip to content

Commit

Permalink
Fix DOM-dependent tests for IE Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
mixonic committed Nov 19, 2015
1 parent 0dc9ec6 commit 49bc53d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/acceptance/editor-sections-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ test('deleting when after deletion there is a trailing space positions cursor at
Helpers.dom.insertText(editor, text);

setTimeout(() => {
assert.equal($('#editor p:eq(0)').text(), `first ${text}`, 'character is placed after space');
assert.equal(editor.post.sections.head.text, `first ${text}`, 'character is placed after space');

done();
});
Expand All @@ -504,7 +504,7 @@ test('deleting when after deletion there is a leading space positions cursor at
Helpers.dom.insertText(editor, text);

setTimeout(() => {
assert.equal($('#editor p:eq(1)').text(), `${text} section`, 'correct text after insertion');
assert.equal(editor.post.sections.tail.text, `${text} section`, 'correct text after insertion');
done();
});
});
Expand Down
8 changes: 4 additions & 4 deletions tests/acceptance/editor-selections-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ test('selecting text bounded by space and typing replaces it', (assert) => {
Helpers.dom.selectText('trick', editorElement);
Helpers.dom.insertText(editor, 'X');

assert.hasElement('#editor p:contains(one X pony)',
'new text present');
assert.equal(editor.post.sections.head.text, 'one X pony',
'new text present');

Helpers.dom.insertText(editor, 'Y');
assert.hasElement('#editor p:contains(one XY pony)',
'cursor positioned correctly');
assert.equal(editor.post.sections.head.text, 'one XY pony',
'further new text present');
});

test('selecting all text across sections and hitting enter deletes and moves cursor to empty section', (assert) => {
Expand Down

0 comments on commit 49bc53d

Please sign in to comment.