blob: fda0b91781ce1c293230a0aed3da70881f3fcdc4 [file] [log] [blame]
Simon Hunt7ac7be92015-01-06 10:47:56 -08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 ONOS GUI -- SVG -- Glyph Service - Unit Tests
Simon Hunt7ac7be92015-01-06 10:47:56 -080019 */
20describe('factory: fw/svg/glyph.js', function() {
Simon Huntc9b73162015-01-29 14:02:15 -080021 var $log, fs, gs, d3Elem, svg;
Simon Hunt7ac7be92015-01-06 10:47:56 -080022
Bri Prebilic Cole43f17c02015-05-01 10:43:38 -070023 var numBaseGlyphs = 39,
Simon Huntbc39f6d2015-01-06 17:34:28 -080024 vbBird = '352 224 113 112',
Simon Hunt6e459802015-01-06 15:05:42 -080025 vbGlyph = '0 0 110 110',
Simon Hunt58f23bb2015-01-16 16:32:24 -080026 vbBadge = '0 0 10 10',
Bri Prebilic Coledeca6e92015-03-19 12:03:14 -070027 longPrefix = 'M95.8,9.2H14.2c-2.8,0-5,2.2-5,5v81.5c0,2.8,2.2,5,5,' +
28 '5h81.5c2.8,0,5-2.2,5-5V14.2C100.8,11.5,98.5,9.2,95.8,9.2z ',
Simon Hunt58f23bb2015-01-16 16:32:24 -080029 prefixLookup = {
30 bird: 'M427.7,300.4',
31 unknown: 'M35,40a5',
32 node: 'M15,100a5',
33 switch: 'M10,20a10',
34 roadm: 'M10,35l25-',
35 endstation: 'M10,15a5,5',
36 router: 'M10,55A45,45',
37 bgpSpeaker: 'M10,40a45,35',
38 chain: 'M60.4,77.6c-',
39 crown: 'M99.5,21.6c0,',
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070040 lock: 'M79.4,48.6h',
Bri Prebilic Cole6ed04eb2015-04-27 16:26:03 -070041 topo: 'M97.2,76.3H86.6',
Bri Prebilic Cole43f17c02015-05-01 10:43:38 -070042 refresh: 'M102.6,40.8L88.4',
Bri Prebilic Cole6ed04eb2015-04-27 16:26:03 -070043
44 // navigation specific glyphs
45 flowTable: 'M15.9,19.1h-8v-13h',
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070046
47 // toolbar specific glyphs
Bri Prebilic Coledeca6e92015-03-19 12:03:14 -070048 summary: longPrefix + 'M16.7',
49 details: longPrefix + 'M16.9',
50 ports: 'M98,9.2H79.6c',
51 map: 'M95.8,9.2H14.2c-2.8,0-5,2.2-5,5v66',
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070052 cycleLabels: 'M72.5,33.9c',
53 oblique: 'M80.9,30.2h',
Bri Prebilic Coleb5f2b152015-04-07 14:58:09 -070054 filters: 'M24.8,13.3L',
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070055 resetZoom: 'M86,79.8L',
56 relatedIntents: 'M99.9,43.7',
Bri Prebilic Coledb4b87b2015-03-25 09:18:42 -070057 nextIntent: 'M88.1,55.7',
58 prevIntent: 'M22.5,55.6',
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070059 intentTraffic: 'M14.7,71.5h',
60 allTraffic: 'M15.7,64.5h-7v',
61 flows: 'M93.8,46.1c',
Bri Prebilic Cole5a206bb2015-03-25 16:33:27 -070062 eqMaster: 'M100.1,46.9l',
Bri Prebilic Coledeca6e92015-03-19 12:03:14 -070063
Bri Prebilic Cole7c980512015-03-25 12:31:29 -070064 // badges
Simon Hunt58f23bb2015-01-16 16:32:24 -080065 uiAttached: 'M2,2.5a.5,.5',
Simon Huntaa26adf2015-01-20 10:32:49 -080066 checkMark: 'M2.6,4.5c0',
67 xMark: 'M9.0,7.2C8.2',
Bri Prebilic Cole1dc32e62015-02-03 09:44:33 -080068 triangleUp: 'M0.5,6.2c0',
69 triangleDown: 'M9.5,4.2c0',
Simon Hunt3074fb22015-03-31 15:06:25 -070070 plus: 'M4,2h2v2h2v2',
71 minus: 'M2,4h6v2',
72 play: 'M2.5,2l5.5,3',
73 stop: 'M2.5,2.5h5',
Simon Hunt58f23bb2015-01-16 16:32:24 -080074
Simon Hunt9c1c45e2015-04-10 13:38:27 -070075 cloud: 'M37.6,79.5c-6.9,8.7-20.4,8.6',
76
Simon Hunt58f23bb2015-01-16 16:32:24 -080077 // our test ones..
78 triangle: 'M.5,.2',
79 diamond: 'M.2,.5'
Simon Hunt3074fb22015-03-31 15:06:25 -070080 },
81 glyphIds = [
82 'unknown', 'node', 'switch', 'roadm', 'endstation', 'router',
Bri Prebilic Cole43f17c02015-05-01 10:43:38 -070083 'bgpSpeaker', 'chain', 'crown', 'lock', 'topo', 'refresh',
84 'flowTable', 'summary', 'details', 'ports', 'map', 'cycleLabels',
85 'oblique', 'filters', 'resetZoom', 'relatedIntents', 'nextIntent',
Bri Prebilic Coleb5f2b152015-04-07 14:58:09 -070086 'prevIntent', 'intentTraffic', 'allTraffic', 'flows', 'eqMaster'
Simon Hunt3074fb22015-03-31 15:06:25 -070087 ],
88 badgeIds = [
89 'uiAttached', 'checkMark', 'xMark', 'triangleUp', 'triangleDown',
90 'plus', 'minus', 'play', 'stop'
Simon Hunt9c1c45e2015-04-10 13:38:27 -070091 ],
92 spriteIds = [
93 'cloud'
Simon Hunt3074fb22015-03-31 15:06:25 -070094 ];
Simon Hunt6e459802015-01-06 15:05:42 -080095
Simon Hunt51fc40b2015-01-06 13:56:12 -080096 beforeEach(module('onosUtil', 'onosSvg'));
Simon Hunt7ac7be92015-01-06 10:47:56 -080097
Simon Hunt51fc40b2015-01-06 13:56:12 -080098 beforeEach(inject(function (_$log_, FnService, GlyphService) {
Simon Huntc9b73162015-01-29 14:02:15 -080099 var body = d3.select('body');
Simon Hunt51fc40b2015-01-06 13:56:12 -0800100 $log = _$log_;
101 fs = FnService;
Simon Hunt7ac7be92015-01-06 10:47:56 -0800102 gs = GlyphService;
Simon Huntc9b73162015-01-29 14:02:15 -0800103 d3Elem = body.append('defs').attr('id', 'myDefs');
104 svg = body.append('svg').attr('id', 'mySvg');
Simon Hunt7ac7be92015-01-06 10:47:56 -0800105 }));
106
Simon Hunt670e8252015-01-06 18:31:30 -0800107 afterEach(function () {
Simon Huntc9b73162015-01-29 14:02:15 -0800108 d3.select('#mySvg').remove();
Simon Hunt670e8252015-01-06 18:31:30 -0800109 d3.select('#myDefs').remove();
Simon Huntcacce342015-01-07 16:13:05 -0800110 gs.clear();
Simon Hunt670e8252015-01-06 18:31:30 -0800111 });
112
Simon Hunt7ac7be92015-01-06 10:47:56 -0800113 it('should define GlyphService', function () {
114 expect(gs).toBeDefined();
115 });
116
Simon Hunt6e459802015-01-06 15:05:42 -0800117 it('should define api functions', function () {
Simon Hunt51fc40b2015-01-06 13:56:12 -0800118 expect(fs.areFunctions(gs, [
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700119 'clear', 'init', 'registerGlyphs', 'registerGlyphSet',
120 'ids', 'glyph', 'loadDefs', 'addGlyph'
121 ])).toBe(true);
Simon Hunt51fc40b2015-01-06 13:56:12 -0800122 });
123
Simon Hunt6e459802015-01-06 15:05:42 -0800124 it('should start with no glyphs loaded', function () {
125 expect(gs.ids()).toEqual([]);
126 });
127
Simon Hunt58f23bb2015-01-16 16:32:24 -0800128 it('should load the base set of glyphs into the cache', function () {
Simon Hunt6e459802015-01-06 15:05:42 -0800129 gs.init();
Simon Huntbc39f6d2015-01-06 17:34:28 -0800130 expect(gs.ids().length).toEqual(numBaseGlyphs);
Simon Hunt6e459802015-01-06 15:05:42 -0800131 });
132
Simon Hunt58f23bb2015-01-16 16:32:24 -0800133 it('should remove glyphs from the cache on clear', function () {
Simon Huntcacce342015-01-07 16:13:05 -0800134 gs.init();
135 expect(gs.ids().length).toEqual(numBaseGlyphs);
136 gs.clear();
137 expect(gs.ids().length).toEqual(0);
138 });
139
Simon Hunt58f23bb2015-01-16 16:32:24 -0800140 function verifyGlyphLoadedInCache(id, vbox, expPfxId) {
141 var pfxId = expPfxId || id,
142 glyph = gs.glyph(id),
143 prefix = prefixLookup[pfxId],
Simon Hunt6e459802015-01-06 15:05:42 -0800144 plen = prefix.length;
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700145 expect(fs.contains(gs.ids(), id)).toBe(true);
Simon Hunt6e459802015-01-06 15:05:42 -0800146 expect(glyph).toBeDefined();
147 expect(glyph.id).toEqual(id);
148 expect(glyph.vb).toEqual(vbox);
149 expect(glyph.d.slice(0, plen)).toEqual(prefix);
150 }
151
Simon Hunt3074fb22015-03-31 15:06:25 -0700152 it('should be configured with the correct number of glyphs', function () {
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700153 var nGlyphs = 1 + glyphIds.length + badgeIds.length + spriteIds.length;
154 expect(nGlyphs).toEqual(numBaseGlyphs);
Simon Hunt3074fb22015-03-31 15:06:25 -0700155 });
156
Simon Hunt6e459802015-01-06 15:05:42 -0800157 it('should load the bird glyph', function() {
158 gs.init();
Simon Hunt58f23bb2015-01-16 16:32:24 -0800159 verifyGlyphLoadedInCache('bird', vbBird);
Simon Hunt6e459802015-01-06 15:05:42 -0800160 });
Simon Hunt3074fb22015-03-31 15:06:25 -0700161
162 it('should load the regular glyphs', function () {
Simon Hunt6e459802015-01-06 15:05:42 -0800163 gs.init();
Simon Hunt3074fb22015-03-31 15:06:25 -0700164 glyphIds.forEach(function (id) {
165 verifyGlyphLoadedInCache(id, vbGlyph);
Bri Prebilic Cole94a856e2015-01-19 15:16:40 -0800166 });
Simon Hunt3074fb22015-03-31 15:06:25 -0700167 });
168
169 it('should load the badge glyphs', function () {
170 gs.init();
171 badgeIds.forEach(function (id) {
172 verifyGlyphLoadedInCache(id, vbBadge);
173 });
174 });
175
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700176 it('should load the sprites', function () {
177 gs.init();
178 spriteIds.forEach(function (id) {
179 verifyGlyphLoadedInCache(id, vbGlyph);
180 });
181 });
182
Simon Huntbc39f6d2015-01-06 17:34:28 -0800183
184 // define some glyphs that we want to install
185
186 var testVbox = '0 0 1 1',
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700187 triVbox = '0 0 12 12',
188 diaVbox = '0 0 15 15',
Simon Huntbc39f6d2015-01-06 17:34:28 -0800189 dTriangle = 'M.5,.2l.3,.6,h-.6z',
190 dDiamond = 'M.2,.5l.3,-.3l.3,.3l-.3,.3z',
191 newGlyphs = {
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700192 _viewbox: testVbox,
Simon Huntbc39f6d2015-01-06 17:34:28 -0800193 triangle: dTriangle,
194 diamond: dDiamond
195 },
196 dupGlyphs = {
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700197 _viewbox: testVbox,
Simon Huntbc39f6d2015-01-06 17:34:28 -0800198 router: dTriangle,
199 switch: dDiamond
200 },
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700201 altNewGlyphs = {
202 _triangle: triVbox,
203 triangle: dTriangle,
204 _diamond: diaVbox,
205 diamond: dDiamond
206 },
207 altDupGlyphs = {
208 _router: triVbox,
209 router: dTriangle,
210 _switch: diaVbox,
211 switch: dDiamond
212 },
213 badGlyphSet = {
214 triangle: dTriangle,
215 diamond: dDiamond
216 },
217 warnMsg = 'GlyphService.registerGlyphs(): ',
218 warnMsgSet = 'GlyphService.registerGlyphSet(): ',
219 idCollision = warnMsg + 'ID collision: ',
220 idCollisionSet = warnMsgSet + 'ID collision: ',
221 missVbSet = warnMsgSet + 'no "_viewbox" property found',
222 missVbCustom = warnMsg + 'Missing viewbox property: ',
223 missVbTri = missVbCustom + '"_triangle"',
224 missVbDia = missVbCustom + '"_diamond"';
Simon Huntbc39f6d2015-01-06 17:34:28 -0800225
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700226
227 it('should install new glyphs as a glyph-set', function () {
Simon Huntbc39f6d2015-01-06 17:34:28 -0800228 gs.init();
229 expect(gs.ids().length).toEqual(numBaseGlyphs);
230 spyOn($log, 'warn');
231
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700232 var ok = gs.registerGlyphSet(newGlyphs);
233 expect(ok).toBe(true);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800234 expect($log.warn).not.toHaveBeenCalled();
235
236 expect(gs.ids().length).toEqual(numBaseGlyphs + 2);
Simon Hunt58f23bb2015-01-16 16:32:24 -0800237 verifyGlyphLoadedInCache('triangle', testVbox);
238 verifyGlyphLoadedInCache('diamond', testVbox);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800239 });
240
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700241 it('should not overwrite glyphs (via glyph-set) with dup IDs', function () {
242 gs.init();
243 expect(gs.ids().length).toEqual(numBaseGlyphs);
244 spyOn($log, 'warn');
245
246 var ok = gs.registerGlyphSet(dupGlyphs);
247 expect(ok).toBe(false);
248 expect($log.warn).toHaveBeenCalledWith(idCollisionSet + '"switch"');
249 expect($log.warn).toHaveBeenCalledWith(idCollisionSet + '"router"');
250
251 expect(gs.ids().length).toEqual(numBaseGlyphs);
252 // verify original glyphs still exist...
253 verifyGlyphLoadedInCache('router', vbGlyph);
254 verifyGlyphLoadedInCache('switch', vbGlyph);
255 });
256
257 it('should replace glyphs (via glyph-set) if asked nicely', function () {
258 gs.init();
259 expect(gs.ids().length).toEqual(numBaseGlyphs);
260 spyOn($log, 'warn');
261
262 var ok = gs.registerGlyphSet(dupGlyphs, true);
263 expect(ok).toBe(true);
264 expect($log.warn).not.toHaveBeenCalled();
265
266 expect(gs.ids().length).toEqual(numBaseGlyphs);
267 // verify glyphs have been overwritten...
268 verifyGlyphLoadedInCache('router', testVbox, 'triangle');
269 verifyGlyphLoadedInCache('switch', testVbox, 'diamond');
270 });
271
272 it ('should complain if missing _viewbox in a glyph-set', function () {
273 gs.init();
274 expect(gs.ids().length).toEqual(numBaseGlyphs);
275 spyOn($log, 'warn');
276
277 var ok = gs.registerGlyphSet(badGlyphSet);
278 expect(ok).toBe(false);
279 expect($log.warn).toHaveBeenCalledWith(missVbSet);
280 expect(gs.ids().length).toEqual(numBaseGlyphs);
281 });
282
283 it('should install new glyphs', function () {
284 gs.init();
285 expect(gs.ids().length).toEqual(numBaseGlyphs);
286 spyOn($log, 'warn');
287
288 var ok = gs.registerGlyphs(altNewGlyphs);
289 expect(ok).toBe(true);
290 expect($log.warn).not.toHaveBeenCalled();
291
292 expect(gs.ids().length).toEqual(numBaseGlyphs + 2);
293 verifyGlyphLoadedInCache('triangle', triVbox);
294 verifyGlyphLoadedInCache('diamond', diaVbox);
295 });
296
Simon Huntbc39f6d2015-01-06 17:34:28 -0800297 it('should not overwrite glyphs with dup IDs', function () {
298 gs.init();
299 expect(gs.ids().length).toEqual(numBaseGlyphs);
300 spyOn($log, 'warn');
301
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700302 var ok = gs.registerGlyphs(altDupGlyphs);
303 expect(ok).toBe(false);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800304 expect($log.warn).toHaveBeenCalledWith(idCollision + '"switch"');
305 expect($log.warn).toHaveBeenCalledWith(idCollision + '"router"');
306
307 expect(gs.ids().length).toEqual(numBaseGlyphs);
308 // verify original glyphs still exist...
Simon Hunt58f23bb2015-01-16 16:32:24 -0800309 verifyGlyphLoadedInCache('router', vbGlyph);
310 verifyGlyphLoadedInCache('switch', vbGlyph);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800311 });
312
313 it('should replace glyphs if asked nicely', function () {
314 gs.init();
315 expect(gs.ids().length).toEqual(numBaseGlyphs);
316 spyOn($log, 'warn');
317
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700318 var ok = gs.registerGlyphs(altDupGlyphs, true);
319 expect(ok).toBe(true);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800320 expect($log.warn).not.toHaveBeenCalled();
321
322 expect(gs.ids().length).toEqual(numBaseGlyphs);
323 // verify glyphs have been overwritten...
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700324 verifyGlyphLoadedInCache('router', triVbox, 'triangle');
325 verifyGlyphLoadedInCache('switch', diaVbox, 'diamond');
326 });
327
328 it ('should complain if missing custom viewbox', function () {
329 gs.init();
330 expect(gs.ids().length).toEqual(numBaseGlyphs);
331 spyOn($log, 'warn');
332
333 var ok = gs.registerGlyphs(badGlyphSet);
334 expect(ok).toBe(false);
335 expect($log.warn).toHaveBeenCalledWith(missVbTri);
336 expect($log.warn).toHaveBeenCalledWith(missVbDia);
337 expect(gs.ids().length).toEqual(numBaseGlyphs);
Simon Huntbc39f6d2015-01-06 17:34:28 -0800338 });
Simon Hunt670e8252015-01-06 18:31:30 -0800339
340 function verifyPathPrefix(elem, prefix) {
341 var plen = prefix.length,
342 d = elem.select('path').attr('d');
343 expect(d.slice(0, plen)).toEqual(prefix);
344 }
345
Simon Hunt58f23bb2015-01-16 16:32:24 -0800346 function verifyLoadedInDom(id, vb, expPfxId) {
347 var pfxId = expPfxId || id,
348 symbol = d3Elem.select('#' + id);
349 expect(symbol.size()).toEqual(1);
350 expect(symbol.attr('viewBox')).toEqual(vb);
351 verifyPathPrefix(symbol, prefixLookup[pfxId]);
352 }
353
Simon Hunt670e8252015-01-06 18:31:30 -0800354 it('should load base glyphs into the DOM', function () {
355 gs.init();
356 gs.loadDefs(d3Elem);
357 expect(d3Elem.selectAll('symbol').size()).toEqual(numBaseGlyphs);
Simon Hunt58f23bb2015-01-16 16:32:24 -0800358 verifyLoadedInDom('bgpSpeaker', vbGlyph);
Simon Hunt670e8252015-01-06 18:31:30 -0800359 });
360
361 it('should load custom glyphs into the DOM', function () {
362 gs.init();
Simon Hunt9c1c45e2015-04-10 13:38:27 -0700363 gs.registerGlyphSet(newGlyphs);
Simon Hunt670e8252015-01-06 18:31:30 -0800364 gs.loadDefs(d3Elem);
365 expect(d3Elem.selectAll('symbol').size()).toEqual(numBaseGlyphs + 2);
Simon Hunt58f23bb2015-01-16 16:32:24 -0800366 verifyLoadedInDom('diamond', testVbox);
367 });
Simon Hunt670e8252015-01-06 18:31:30 -0800368
Simon Hunt58f23bb2015-01-16 16:32:24 -0800369 it('should load only specified glyphs into the DOM', function () {
370 gs.init();
371 gs.loadDefs(d3Elem, ['crown', 'chain', 'node']);
372 expect(d3Elem.selectAll('symbol').size()).toEqual(3);
373 verifyLoadedInDom('crown', vbGlyph);
374 verifyLoadedInDom('chain', vbGlyph);
375 verifyLoadedInDom('node', vbGlyph);
Simon Hunt670e8252015-01-06 18:31:30 -0800376 });
Simon Huntc9b73162015-01-29 14:02:15 -0800377
378 it('should add a glyph with default size', function () {
379 gs.init();
Simon Hunt4b668592015-01-29 17:33:53 -0800380 var retval = gs.addGlyph(svg, 'crown');
Simon Huntc9b73162015-01-29 14:02:15 -0800381 var what = svg.selectAll('use');
382 expect(what.size()).toEqual(1);
383 expect(what.attr('width')).toEqual('40');
384 expect(what.attr('height')).toEqual('40');
385 expect(what.attr('xlink:href')).toEqual('#crown');
386 expect(what.classed('glyph')).toBeTruthy();
387 expect(what.classed('overlay')).toBeFalsy();
Simon Hunt4b668592015-01-29 17:33:53 -0800388
389 // check a couple on retval, which should be the same thing..
390 expect(retval.attr('xlink:href')).toEqual('#crown');
391 expect(retval.classed('glyph')).toBeTruthy();
Simon Huntc9b73162015-01-29 14:02:15 -0800392 });
393
394 it('should add a glyph with given size', function () {
395 gs.init();
396 gs.addGlyph(svg, 'crown', 37);
397 var what = svg.selectAll('use');
398 expect(what.size()).toEqual(1);
399 expect(what.attr('width')).toEqual('37');
400 expect(what.attr('height')).toEqual('37');
401 expect(what.attr('xlink:href')).toEqual('#crown');
402 expect(what.classed('glyph')).toBeTruthy();
403 expect(what.classed('overlay')).toBeFalsy();
404 });
405
406 it('should add a glyph marked as overlay', function () {
407 gs.init();
408 gs.addGlyph(svg, 'crown', 20, true);
409 var what = svg.selectAll('use');
410 expect(what.size()).toEqual(1);
411 expect(what.attr('width')).toEqual('20');
412 expect(what.attr('height')).toEqual('20');
413 expect(what.attr('xlink:href')).toEqual('#crown');
414 expect(what.classed('glyph')).toBeTruthy();
415 expect(what.classed('overlay')).toBeTruthy();
416 });
Simon Hunt7ac7be92015-01-06 10:47:56 -0800417});