aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-01-14 13:10:38 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-01-14 13:10:38 +0100
commit92b48d2da14a4870c348c50443a2e22d015c3828 (patch)
tree0972ed3174ee8ec05bd61e479d347b9bec2f1d56 /spec
parentaec779cb019b5ad1c2ea709d9bf8e93d3d1e0c87 (diff)
downloadsvg.js-92b48d2da14a4870c348c50443a2e22d015c3828.tar.gz
svg.js-92b48d2da14a4870c348c50443a2e22d015c3828.zip
fixed `root()`, `textPath()`, `text.path()` and `path.text()` and removed font-family and size from the defaults list3.0.10
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/selector.js15
1 files changed, 14 insertions, 1 deletions
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)
})
})