X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a398f2a96740ebe6dd60559d90e74c648e7009af..ac31ad7e5c9642a6703ae75ca072a43255e4a230:/modules/documentCanvas/tests/canvas.test.js?ds=inline diff --git a/modules/documentCanvas/tests/canvas.test.js b/modules/documentCanvas/tests/canvas.test.js index a9ed767..53f4aee 100644 --- a/modules/documentCanvas/tests/canvas.test.js +++ b/modules/documentCanvas/tests/canvas.test.js @@ -260,6 +260,38 @@ define([ ')); + }); + + test('removing list containing nested list', function() { + var nestedList = utils.cleanUp('\ +
\ +
\ +
alice
\ +
\ +
\ +
cat
\ +
dog
\ +
\ +
\ +
bee
\ +
\ +
'); + + var c = canvas.create(nestedList); + var alice_item = c.findNodes('[wlxml-class=list-items] > div')[0]; + assert.equal(alice_item.getContent(), 'alice'); + + c.listRemove({pointer: alice_item}); + + assertDomEqual(c.getContent(), utils.cleanUp('\ +
\ +
alice
\ +
cat
\ +
dog
\ +
bee
\ +
')); + + }); }); }); \ No newline at end of file