From 98697eb003d9177686ddfecfb64fc6652782de47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 21 Jul 2013 16:44:30 -0700 Subject: [PATCH] Fix Layer#insertAbove / insertBelow test. --- test/tests/Item_Cloning.js | 1 + test/tests/Layer.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/tests/Item_Cloning.js b/test/tests/Item_Cloning.js index c1e0c965..b6019be9 100644 --- a/test/tests/Item_Cloning.js +++ b/test/tests/Item_Cloning.js @@ -16,6 +16,7 @@ function cloneAndCompare(item) { return item.parent == copy.parent; }, true); equals(function() { + // Cloned items appear above the original. return item.nextSibling == copy; }, true); if (item.name) { diff --git a/test/tests/Layer.js b/test/tests/Layer.js index 88f117ca..ac9fd049 100644 --- a/test/tests/Layer.js +++ b/test/tests/Layer.js @@ -76,10 +76,11 @@ test('insertAbove / insertBelow', function() { var path = new Path(); firstLayer.addChild(path); - // move the layer above the path, inside the firstLayer: + // move the layer above the path, inside the firstLayer. + // 'Above' means visually appearing on top, thus with a larger index. secondLayer.insertAbove(path); equals(function() { - return secondLayer.nextSibling == path; + return path.nextSibling == secondLayer; }, true); equals(function() { return secondLayer.parent == firstLayer;