X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ee83d407018193482c72fdc57a8cfea17d38127a..ca7d9f0db18dff8083e5f06e52efec85ca522900:/modules/documentCanvas/tests/canvas.test.js
diff --git a/modules/documentCanvas/tests/canvas.test.js b/modules/documentCanvas/tests/canvas.test.js
index 5e44dd9..12fb8a5 100644
--- a/modules/documentCanvas/tests/canvas.test.js
+++ b/modules/documentCanvas/tests/canvas.test.js
@@ -69,6 +69,14 @@ define([
assertDomEqual(c.getContent(), '
Alice has a cat
');
});
+ test('wrap text with nodes inside', function() {
+ var c = canvas.create('Alice has a small cat
');
+ var header = c.findNodes({tag: 'header'})[0];
+ var wrapper = canvasNode.create({tag: 'aside'});
+ c.nodeWrap({inside: header, _with: wrapper, offsetStart: 6, offsetEnd: 4, textNodeIdx: [0,2]})
+ assertDomEqual(c.getContent(), 'Alice has a small cat
');
+ });
+
test('split node', function() {
var c = canvas.create('');
var header = c.findNodes({tag: 'header'})[0];