X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a398f2a96740ebe6dd60559d90e74c648e7009af..039f0edb73590283bc38ef5421e670fa40ff2480:/modules/documentCanvas/tests/canvas.test.js 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