diff --git a/test/transforms/fixtures/at-current-range/set-inline/with-is-void/index.js b/test/transforms/fixtures/at-current-range/set-inline/with-is-void/index.js index 17df492a4..48d39e192 100644 --- a/test/transforms/fixtures/at-current-range/set-inline/with-is-void/index.js +++ b/test/transforms/fixtures/at-current-range/set-inline/with-is-void/index.js @@ -21,17 +21,17 @@ export default function (state) { }) .apply() - // Selection is reset, in theory it should me on the emoji - first = next.document.getTexts().first() - assert.deepEqual( - next.selection.toJS(), - range.merge({ - anchorKey: first.key, - anchorOffset: 0, - focusKey: first.key, - focusOffset: 0 - }).toJS() - ) + // Selection is reset, in theory it should me on the emoji + first = next.document.getTexts().first() + assert.deepEqual( + next.selection.toJS(), + range.merge({ + anchorKey: first.key, + anchorOffset: 0, + focusKey: first.key, + focusOffset: 0 + }).toJS() + ) return next } diff --git a/test/transforms/fixtures/at-current-range/unwrap-inline/across-blocks/index.js b/test/transforms/fixtures/at-current-range/unwrap-inline/across-blocks/index.js index 04259ba25..49c6255e8 100644 --- a/test/transforms/fixtures/at-current-range/unwrap-inline/across-blocks/index.js +++ b/test/transforms/fixtures/at-current-range/unwrap-inline/across-blocks/index.js @@ -4,7 +4,7 @@ import assert from 'assert' export default function (state) { const { document, selection } = state const texts = document.getTexts() - const first = texts.first() + let first = texts.first() const second = texts.last() const range = selection.merge({ anchorKey: first.key, @@ -19,9 +19,16 @@ export default function (state) { .unwrapInline('hashtag') .apply() + // Selection is reset, in theory it should me on the image + first = next.document.getTexts().first() assert.deepEqual( next.selection.toJS(), - range.toJS() + range.merge({ + anchorKey: first.key, + anchorOffset: 0, + focusKey: first.key, + focusOffset: 0 + }).toJS() ) return next