From: Aleksander Ɓukasz Date: Sat, 13 Jul 2013 13:27:00 +0000 (+0200) Subject: fixing test X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/130f0f3d70cde726fb3626cc28de13e8306d1042?ds=sidebyside fixing test --- diff --git a/modules/documentCanvas/canvas/canvas.test3.js b/modules/documentCanvas/canvas/canvas.test3.js index cc2db49..f69ca99 100644 --- a/modules/documentCanvas/canvas/canvas.test3.js +++ b/modules/documentCanvas/canvas/canvas.test3.js @@ -909,13 +909,13 @@ describe('Canvas', function() { it('returns position when browser selection collapsed', function() { var c = canvas.fromXML('
Alice has a cat
'), dom = c.doc().dom(), - text = dom.contents(0); + text = dom.contents()[0]; - expect(text.text()).to.equal('Alice has a cat'); + expect($(text).text()).to.equal('Alice has a cat'); getSelection.returns({ - anchorNode: text[0], - focusNode: text[0], + anchorNode: text, + focusNode: text, anchorOffset: 5, focusOffset: 5, isCollapsed: true