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

Unified Diff: test/test_browser_editorial.js

Issue 8651046: Add failing provider notice and fix #1173333
Patch Set: Add failing provider notice and fix #1173333 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 | « test/test_browser_charm_details.js ('k') | test/test_model.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_browser_editorial.js
=== modified file 'test/test_browser_editorial.js'
--- test/test_browser_editorial.js 2013-04-24 18:30:17 +0000
+++ test/test_browser_editorial.js 2013-04-27 20:50:25 +0000
@@ -140,6 +140,50 @@
node.one('.charm-token').simulate('click');
});
+ it('setting the activeID marks the div active', function() {
+ fakeStore = new Y.juju.Charmworld0({});
+ fakeStore.set('datasource', {
+ sendRequest: function(params) {
+ // Stubbing the server callback value
+ params.callback.success({
+ response: {
+ results: [sampleData]
+ }
+ });
+ }
+ });
+ view = new EditorialView({
+ renderTo: Y.one('.bws-content'),
+ store: fakeStore,
+ activeID: 'precise/ceph-7'
+ });
+ view.render();
+ node.all('.yui3-charmtoken.active').size().should.equal(1);
+ });
+
+ it('unsetting the activeID will remove the active markings', function() {
+ fakeStore = new Y.juju.Charmworld0({});
+ fakeStore.set('datasource', {
+ sendRequest: function(params) {
+ // Stubbing the server callback value
+ params.callback.success({
+ response: {
+ results: [sampleData]
+ }
+ });
+ }
+ });
+ view = new EditorialView({
+ renderTo: Y.one('.bws-content'),
+ store: fakeStore,
+ activeID: 'precise/ceph-7'
+ });
+ view.render();
+
+ view.set('activeID', null);
+ node.all('.yui3-charmtoken.active').size().should.equal(0);
+ });
+
});
})();
« no previous file with comments | « test/test_browser_charm_details.js ('k') | test/test_model.js » ('j') | no next file with comments »

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