diff --git a/test/transforms/fixtures/at-current-range/set-block/with-is-void/index.js b/test/transforms/fixtures/at-current-range/set-block/with-is-void/index.js index 459b8b054..254ae85f7 100644 --- a/test/transforms/fixtures/at-current-range/set-block/with-is-void/index.js +++ b/test/transforms/fixtures/at-current-range/set-block/with-is-void/index.js @@ -3,8 +3,7 @@ import assert from 'assert' export default function (state) { const { document, selection } = state - const texts = document.getTexts() - const first = texts.first() + let first = document.getTexts().first() const range = selection.merge({ anchorKey: first.key, anchorOffset: 0, @@ -21,9 +20,16 @@ export default function (state) { }) .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 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 f33b19612..17df492a4 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 @@ -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 range = selection.merge({ anchorKey: first.key, anchorOffset: 0, @@ -21,10 +21,17 @@ export default function (state) { }) .apply() - assert.deepEqual( - next.selection.toJS(), - range.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 }