Merge lp:~hatch/juju-gui/remove-strict-bundle-flag into lp:juju-gui/experimental

Proposed by Jeff Pihach
Status: Merged
Merged at revision: 1155
Proposed branch: lp:~hatch/juju-gui/remove-strict-bundle-flag
Merge into: lp:juju-gui/experimental
Diff against target: 136 lines (+24/-17)
4 files modified
app/subapps/browser/views/bundle.js (+3/-7)
test/data/browserbundle.json (+18/-2)
test/test_browser_app.js (+3/-3)
test/test_bundle_details_view.js (+0/-5)
To merge this branch: bzr merge lp:~hatch/juju-gui/remove-strict-bundle-flag
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+192748@code.launchpad.net

Description of the change

Removes strictBundle flag

Also includes a driveby to fix some of the onboarding tests

https://codereview.appspot.com/17340043/

To post a comment you must log in.
Revision history for this message
Jeff Pihach (hatch) wrote :
Download full text (5.2 KiB)

Reviewers: mp+192748_code.launchpad.net,

Message:
Please take a look.

Description:
Removes strictBundle flag

Also includes a driveby to fix some of the onboarding tests

https://code.launchpad.net/~hatch/juju-gui/remove-strict-bundle-flag/+merge/192748

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/17340043/

Affected files (+26, -17 lines):
   A [revision details]
   M app/subapps/browser/views/bundle.js
   M test/data/browserbundle.json
   M test/test_browser_app.js
   M test/test_bundle_details_view.js

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: test/test_browser_app.js
=== modified file 'test/test_browser_app.js'
--- test/test_browser_app.js 2013-10-21 23:05:08 +0000
+++ test/test_browser_app.js 2013-10-25 21:00:21 +0000
@@ -1251,7 +1251,7 @@

          browser.routeView(req, undefined, function() {});
          assert.deepEqual(hits, expected);
- window.flags.onboard = {};
+ window.flags = {};
        });

        it('onboarding is not called with a charm id', function() {
@@ -1272,7 +1272,7 @@

          browser.routeView(req, undefined, function() {});
          assert.deepEqual(hits, expected);
- window.flags.onboard = {};
+ window.flags = {};
        });

        it('onboarding is not called with a search', function() {
@@ -1292,7 +1292,7 @@

          browser.routeView(req, undefined, function() {});
          assert.deepEqual(hits, expected);
- window.flags.onboard = {};
+ window.flags = {};
        });

        it('/minimized dispatches correctly', function() {

Index: test/test_bundle_details_view.js
=== modified file 'test/test_bundle_details_view.js'
--- test/test_bundle_details_view.js 2013-10-24 21:03:02 +0000
+++ test/test_bundle_details_view.js 2013-10-25 21:00:21 +0000
@@ -148,7 +148,6 @@

    it('fails gracefully if services don\'t provide xy annotations',
       function() {
- window.flags = { strictBundle: true };
         view._parseData = function() {
           return new Y.Promise(function(resolve) { resolve(); });
         };
@@ -170,17 +169,14 @@
                }
              };
            }});
- view.set('entity', new models.Bundle(data));
         view.render();
         assert.isNull(container.one('#bws-bundle'));
         assert.isNull(container.one('a[href=#bws-bundle]'));
         // Check that the charms tab is the landing tab
         assert.equal(view.tabview.get('selection').get('index'), 2);
- window.flags = {};
       });

    it('renders the bundle topology into the view', function(done) {
- window.flags = { strictBundle: true };
      view._parseData = function() {
        return new Y.Promise(function(resolve) { resolve(); });
      };
@@ -219,7 +215,6 @@
        assert.isNotNull(container.one('.topology-canvas'));
        // Check that the bundle topology tab is the landing tab.
        asse...

Read more...

Revision history for this message
Madison Scott-Clary (makyo) wrote :
Revision history for this message
Madison Scott-Clary (makyo) wrote :
Revision history for this message
Jeff Pihach (hatch) wrote :

*** Submitted:

Removes strictBundle flag

Also includes a driveby to fix some of the onboarding tests

R=matthew.scott
CC=
https://codereview.appspot.com/17340043

https://codereview.appspot.com/17340043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/subapps/browser/views/bundle.js'
2--- app/subapps/browser/views/bundle.js 2013-10-24 15:54:23 +0000
3+++ app/subapps/browser/views/bundle.js 2013-10-25 21:03:52 +0000
4@@ -177,13 +177,9 @@
5 var options = {size: [720, 500]};
6 this.hideIndicator(renderTo);
7
8- var showTopo = true;
9- // remove the flag in the test(test_bundle_details_view.js)
10- // when this flag is no longer needed.
11- if (window.flags && window.flags.strictBundle) {
12- showTopo = this._positionAnnotationsIncluded(
13- bundleData.data.services);
14- }
15+ var showTopo = this._positionAnnotationsIncluded(
16+ bundleData.data.services);
17+
18 if (showTopo) {
19 // Setup the fake backend to create topology to display the canvas-like
20 // rendering of the bundle.
21
22=== modified file 'test/data/browserbundle.json'
23--- test/data/browserbundle.json 2013-10-08 22:04:39 +0000
24+++ test/data/browserbundle.json 2013-10-25 21:03:52 +0000
25@@ -1076,24 +1076,40 @@
26 "services": {
27 "haproxy": {
28 "charm": "haproxy",
29- "num_units": 5
30+ "num_units": 5,
31+ "annotations": {
32+ "gui-x": 1,
33+ "gui-y": 1
34+ }
35 },
36 "mediawiki": {
37 "charm": "mediawiki",
38 "num_units": 9,
39 "options": {
40 "name": "Intranet"
41+ },
42+ "annotations": {
43+ "gui-x": 1,
44+ "gui-y": 1
45 }
46 },
47 "memcached": {
48 "charm": "memcached",
49- "num_units": 3
50+ "num_units": 3,
51+ "annotations": {
52+ "gui-x": 1,
53+ "gui-y": 1
54+ }
55 },
56 "mysql": {
57 "charm": "mysql",
58 "num_units": 3,
59 "options": {
60 "tuning-level": "safest"
61+ },
62+ "annotations": {
63+ "gui-x": 1,
64+ "gui-y": 1
65 }
66 }
67 }
68
69=== modified file 'test/test_browser_app.js'
70--- test/test_browser_app.js 2013-10-21 23:05:08 +0000
71+++ test/test_browser_app.js 2013-10-25 21:03:52 +0000
72@@ -1251,7 +1251,7 @@
73
74 browser.routeView(req, undefined, function() {});
75 assert.deepEqual(hits, expected);
76- window.flags.onboard = {};
77+ window.flags = {};
78 });
79
80 it('onboarding is not called with a charm id', function() {
81@@ -1272,7 +1272,7 @@
82
83 browser.routeView(req, undefined, function() {});
84 assert.deepEqual(hits, expected);
85- window.flags.onboard = {};
86+ window.flags = {};
87 });
88
89 it('onboarding is not called with a search', function() {
90@@ -1292,7 +1292,7 @@
91
92 browser.routeView(req, undefined, function() {});
93 assert.deepEqual(hits, expected);
94- window.flags.onboard = {};
95+ window.flags = {};
96 });
97
98 it('/minimized dispatches correctly', function() {
99
100=== modified file 'test/test_bundle_details_view.js'
101--- test/test_bundle_details_view.js 2013-10-24 21:03:02 +0000
102+++ test/test_bundle_details_view.js 2013-10-25 21:03:52 +0000
103@@ -148,7 +148,6 @@
104
105 it('fails gracefully if services don\'t provide xy annotations',
106 function() {
107- window.flags = { strictBundle: true };
108 view._parseData = function() {
109 return new Y.Promise(function(resolve) { resolve(); });
110 };
111@@ -170,17 +169,14 @@
112 }
113 };
114 }});
115- view.set('entity', new models.Bundle(data));
116 view.render();
117 assert.isNull(container.one('#bws-bundle'));
118 assert.isNull(container.one('a[href=#bws-bundle]'));
119 // Check that the charms tab is the landing tab
120 assert.equal(view.tabview.get('selection').get('index'), 2);
121- window.flags = {};
122 });
123
124 it('renders the bundle topology into the view', function(done) {
125- window.flags = { strictBundle: true };
126 view._parseData = function() {
127 return new Y.Promise(function(resolve) { resolve(); });
128 };
129@@ -219,7 +215,6 @@
130 assert.isNotNull(container.one('.topology-canvas'));
131 // Check that the bundle topology tab is the landing tab.
132 assert.equal(view.tabview.get('selection').get('index'), 0);
133- window.flags = {};
134 done();
135 });
136 view.set('entity', new models.Bundle(entity));

Subscribers

People subscribed via source and target branches