From 92b48d2da14a4870c348c50443a2e22d015c3828 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Mon, 14 Jan 2019 13:10:38 +0100 Subject: fixed `root()`, `textPath()`, `text.path()` and `path.text()` and removed font-family and size from the defaults list --- spec/spec/selector.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/spec/selector.js b/spec/spec/selector.js index 99823cf..470eaef 100644 --- a/spec/spec/selector.js +++ b/spec/spec/selector.js @@ -44,7 +44,20 @@ describe('Selector', function() { , e4 = draw.rect(100, 100).addClass('unselectable-element') , e5 = group.rect(100, 100).addClass('selectable-element') - expect(group.find('rect.selectable-element').valueOf()).toEqual([e3, e5]) + expect(group.find('rect.selectable-element')).toEqual([e3, e5]) + }) + }) + + describe('Parent#findOne()', function() { + it('gets all elements with a given class name inside a given element', function() { + var group = draw.group() + , e1 = draw.rect(100, 100).addClass('selectable-element') + , e2 = draw.rect(100, 100).addClass('unselectable-element') + , e3 = group.rect(100, 100).addClass('selectable-element') + , e4 = draw.rect(100, 100).addClass('unselectable-element') + , e5 = group.rect(100, 100).addClass('selectable-element') + + expect(group.findOne('rect.selectable-element')).toBe(e3) }) }) -- cgit v1.2.3