Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
353 assert.strictEqual(5, db.services.size(), 'total'); | 353 assert.strictEqual(5, db.services.size(), 'total'); |
354 // But only three of those are actually displayed. | 354 // But only three of those are actually displayed. |
355 assert.strictEqual(3, Y.Object.size(boxes), 'displayed'); | 355 assert.strictEqual(3, Y.Object.size(boxes), 'displayed'); |
356 // And they are the visible ones. | 356 // And they are the visible ones. |
357 assert.deepPropertyVal(boxes, 'haproxy.model', haproxy); | 357 assert.deepPropertyVal(boxes, 'haproxy.model', haproxy); |
358 assert.deepPropertyVal(boxes, 'django.model', django); | 358 assert.deepPropertyVal(boxes, 'django.model', django); |
359 // Service wordpress is displayed because it has units in an error state. | 359 // Service wordpress is displayed because it has units in an error state. |
360 assert.deepPropertyVal(boxes, 'wordpress.model', wordpress); | 360 assert.deepPropertyVal(boxes, 'wordpress.model', wordpress); |
361 }); | 361 }); |
362 | 362 |
363 it('should deploy a service on charm token drop events', function(done) { | |
364 d3.event._event = {dataTransfer: { | |
365 getData: function(name) { | |
366 if (name === 'dataType') { | |
367 return 'charm-token-drag-and-drop'; | |
368 } else if (name === 'charmData') { | |
369 return '{"id": "cs:foo/bar-1"}'; | |
370 } | |
371 }}}; | |
372 var eventHandle = Y.on('initiateDeploy', function(charm) { | |
jeff.pihach
2013/06/24 22:35:08
see previous comment about firing from the topolog
benji
2013/06/25 20:56:36
Done.
| |
373 eventHandle.detach(); | |
374 done(); | |
375 }); | |
376 serviceModule.canvasDropHandler(); | |
377 }); | |
378 | |
363 }); | 379 }); |
OLD | NEW |