X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16..ca7d9f0db18dff8083e5f06e52efec85ca522900:/modules/documentCanvas/tests/canvasNode.test.js 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 = '
';