From 68e8be229d943c20969ef9bb524aa9b855b357c3 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 30 Aug 2016 15:35:07 -0700 Subject: [PATCH] fix selection transform tests --- .../fixtures/on-selection/collapse-to-anchor/basic/index.js | 2 +- .../fixtures/on-selection/collapse-to-end/basic/index.js | 2 +- .../fixtures/on-selection/collapse-to-focus/basic/index.js | 2 +- .../fixtures/on-selection/collapse-to-start/basic/index.js | 2 +- .../{set-selection => move-to}/with-object/index.js | 2 +- .../{set-selection => move-to}/with-object/input.yaml | 0 .../{set-selection => move-to}/with-selection/index.js | 2 +- .../{set-selection => move-to}/with-selection/input.yaml | 0 8 files changed, 6 insertions(+), 6 deletions(-) rename test/transforms/fixtures/on-selection/{set-selection => move-to}/with-object/index.js (94%) rename test/transforms/fixtures/on-selection/{set-selection => move-to}/with-object/input.yaml (100%) rename test/transforms/fixtures/on-selection/{set-selection => move-to}/with-selection/index.js (94%) rename test/transforms/fixtures/on-selection/{set-selection => move-to}/with-selection/input.yaml (100%) diff --git a/test/transforms/fixtures/on-selection/collapse-to-anchor/basic/index.js b/test/transforms/fixtures/on-selection/collapse-to-anchor/basic/index.js index 37744b5e9..92fde6996 100644 --- a/test/transforms/fixtures/on-selection/collapse-to-anchor/basic/index.js +++ b/test/transforms/fixtures/on-selection/collapse-to-anchor/basic/index.js @@ -8,7 +8,7 @@ export default function (state) { const next = state .transform() - .setSelection({ + .moveTo({ anchorKey: second.key, anchorOffset: 0, focusKey: second.key, diff --git a/test/transforms/fixtures/on-selection/collapse-to-end/basic/index.js b/test/transforms/fixtures/on-selection/collapse-to-end/basic/index.js index d61fd5179..6ae8069fa 100644 --- a/test/transforms/fixtures/on-selection/collapse-to-end/basic/index.js +++ b/test/transforms/fixtures/on-selection/collapse-to-end/basic/index.js @@ -8,7 +8,7 @@ export default function (state) { const next = state .transform() - .setSelection({ + .moveTo({ anchorKey: second.key, anchorOffset: 0, focusKey: second.key, diff --git a/test/transforms/fixtures/on-selection/collapse-to-focus/basic/index.js b/test/transforms/fixtures/on-selection/collapse-to-focus/basic/index.js index edc29998c..de73516e6 100644 --- a/test/transforms/fixtures/on-selection/collapse-to-focus/basic/index.js +++ b/test/transforms/fixtures/on-selection/collapse-to-focus/basic/index.js @@ -8,7 +8,7 @@ export default function (state) { const next = state .transform() - .setSelection({ + .moveTo({ anchorKey: second.key, anchorOffset: 0, focusKey: second.key, diff --git a/test/transforms/fixtures/on-selection/collapse-to-start/basic/index.js b/test/transforms/fixtures/on-selection/collapse-to-start/basic/index.js index 26aa540be..153b4743d 100644 --- a/test/transforms/fixtures/on-selection/collapse-to-start/basic/index.js +++ b/test/transforms/fixtures/on-selection/collapse-to-start/basic/index.js @@ -8,7 +8,7 @@ export default function (state) { const next = state .transform() - .setSelection({ + .moveTo({ anchorKey: second.key, anchorOffset: 0, focusKey: second.key, diff --git a/test/transforms/fixtures/on-selection/set-selection/with-object/index.js b/test/transforms/fixtures/on-selection/move-to/with-object/index.js similarity index 94% rename from test/transforms/fixtures/on-selection/set-selection/with-object/index.js rename to test/transforms/fixtures/on-selection/move-to/with-object/index.js index 39d17830c..79b1b35a9 100644 --- a/test/transforms/fixtures/on-selection/set-selection/with-object/index.js +++ b/test/transforms/fixtures/on-selection/move-to/with-object/index.js @@ -13,7 +13,7 @@ export default function (state) { const sel = selection.merge(props) const next = state .transform() - .setSelection(props) + .moveTo(props) .apply() assert.deepEqual( diff --git a/test/transforms/fixtures/on-selection/set-selection/with-object/input.yaml b/test/transforms/fixtures/on-selection/move-to/with-object/input.yaml similarity index 100% rename from test/transforms/fixtures/on-selection/set-selection/with-object/input.yaml rename to test/transforms/fixtures/on-selection/move-to/with-object/input.yaml diff --git a/test/transforms/fixtures/on-selection/set-selection/with-selection/index.js b/test/transforms/fixtures/on-selection/move-to/with-selection/index.js similarity index 94% rename from test/transforms/fixtures/on-selection/set-selection/with-selection/index.js rename to test/transforms/fixtures/on-selection/move-to/with-selection/index.js index 0647e6b78..c9c6cf0a9 100644 --- a/test/transforms/fixtures/on-selection/set-selection/with-selection/index.js +++ b/test/transforms/fixtures/on-selection/move-to/with-selection/index.js @@ -12,7 +12,7 @@ export default function (state) { const next = state .transform() - .setSelection(sel) + .moveTo(sel) .apply() assert.deepEqual( diff --git a/test/transforms/fixtures/on-selection/set-selection/with-selection/input.yaml b/test/transforms/fixtures/on-selection/move-to/with-selection/input.yaml similarity index 100% rename from test/transforms/fixtures/on-selection/set-selection/with-selection/input.yaml rename to test/transforms/fixtures/on-selection/move-to/with-selection/input.yaml