Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1327)

Unified Diff: test/test_browser_charm_details.js

Issue 8909044: Wire up the charm browser "Add" button.
Patch Set: Wire up the charm browser "Add" button. Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/views/charm-panel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_browser_charm_details.js
=== modified file 'test/test_browser_charm_details.js'
--- test/test_browser_charm_details.js 2013-04-18 05:01:43 +0000
+++ test/test_browser_charm_details.js 2013-04-22 15:40:54 +0000
@@ -122,6 +122,29 @@
node.one('.charm .add').simulate('click');
});
+
+ it('_addCharmEnvironment displays the config panel', function(done) {
+ view = new CharmView({
+ charm: new models.BrowserCharm({
+ files: [
+ 'hooks/install'
+ ],
+ id: 'precise/ceph-9'
+ }),
+ container: Y.Node.create('<div class="charmview"/>')
+ });
+ view.set('deploy', function(charm) {
+ // The charm passed in is not a BrowserCharm but a charm-panel charm.
+ var browserCharm = view.get('charm');
+ assert.notDeepEqual(charm, browserCharm);
+ var madeCharm = new models.Charm(browserCharm.getAttrs());
+ assert.equal(charm.get('id'), madeCharm.get('id'));
+ done();
+ });
+ view._addCharmEnvironment({halt: function() {}});
+ });
+
+
it('should load a file when a hook is selected', function() {
var fakeStore = new Y.juju.Charmworld0({});
fakeStore.set('datasource', {
« no previous file with comments | « app/views/charm-panel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b