X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16..72f859c70150e9268ee7fd1829917ce0823750f6:/modules/documentCanvas/tests/canvasNode.test.js?ds=inline diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index bc11a80..5c55d9c 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -33,6 +33,21 @@ suite('Create canvas node', function() { }); }); +suite('class information', function() { + test('class of', function() { + var node = canvasNode.create({tag: 'header', klass: 'a-b-c'}); + assert.ok(node.isOfClass('a'), 'first level'); + assert.ok(node.isOfClass('a-b'), 'second level'); + assert.ok(node.isOfClass('a-b-c'), 'third level'); + assert.notOk(node.isOfClass('b-c')); + + var node2 = canvasNode.create({tag: 'header'}); + assert.notOk(node2.isOfClass('b')); + + }); + +}); + suite('comparing nodes', function() { test('isSame', function() { var html = '
';