Skip to content

Commit

Permalink
Fix finicky test failure for FF at SauceLabs
Browse files Browse the repository at this point in the history
Refs #428
  • Loading branch information
bantic committed Jul 5, 2016
1 parent 4f789d8 commit 23bce3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/editor/editor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,12 @@ test('#insertAtom returns the inserted atom', (assert) => {
return post();
}, {atoms: [atom]});

// Force the selection -- this is necessary for tests in Firefox at
// SauceLabs.
Helpers.dom.selectRange(editorElement, 0, editorElement, 0);

assert.ok(editor.hasCursor(), 'precond - editor has cursor');

const insertedAtom = editor.insertAtom('the-atom', 'THEATOMTEXT');

assert.equal(insertedAtom.value, 'THEATOMTEXT', 'return value is the inserted atom');
Expand Down

0 comments on commit 23bce3e

Please sign in to comment.