Merge lp:~cjwatson/launchpad/eslint-remove-dead-code into lp:launchpad
- eslint-remove-dead-code
- Merge into devel
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | 18429 |
Proposed branch: | lp:~cjwatson/launchpad/eslint-remove-dead-code |
Merge into: | lp:launchpad |
Diff against target: |
1003 lines (+18/-186) 49 files modified
lib/lp/app/javascript/autocomplete/autocomplete.js (+0/-1) lib/lp/app/javascript/choiceedit/choiceedit.js (+0/-1) lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js (+2/-10) lib/lp/app/javascript/client.js (+0/-2) lib/lp/app/javascript/expander.js (+0/-1) lib/lp/app/javascript/formoverlay/formoverlay.js (+0/-2) lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js (+0/-3) lib/lp/app/javascript/indicator/tests/test_indicator.js (+0/-1) lib/lp/app/javascript/inlineedit/editor.js (+1/-6) lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js (+0/-15) lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js (+0/-1) lib/lp/app/javascript/listing_navigator.js (+0/-2) lib/lp/app/javascript/overlay/overlay.js (+1/-2) lib/lp/app/javascript/overlay/tests/test_overlay.js (+2/-3) lib/lp/app/javascript/picker/tests/test_picker.js (+0/-5) lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js (+0/-5) lib/lp/app/javascript/testing/tests/test_mockio.js (+1/-2) lib/lp/app/javascript/tests/test_comment.js (+1/-5) lib/lp/app/javascript/tests/test_information_type.js (+0/-4) lib/lp/app/javascript/tests/test_listing_navigator.js (+0/-1) lib/lp/app/javascript/tests/test_longpoll.js (+0/-1) lib/lp/blueprints/javascript/tests/test_workitems.js (+0/-2) lib/lp/bugs/javascript/bugtask_index.js (+0/-3) lib/lp/bugs/javascript/bugtracker_overlay.js (+0/-1) lib/lp/bugs/javascript/duplicates.js (+0/-1) lib/lp/bugs/javascript/filebug_dupefinder.js (+0/-22) lib/lp/bugs/javascript/tests/test_async_comment_loading.js (+1/-3) lib/lp/bugs/javascript/tests/test_duplicates.js (+0/-1) lib/lp/bugs/javascript/tests/test_me_too.js (+2/-3) lib/lp/bugs/javascript/tests/test_official_bug_tags.js (+0/-1) lib/lp/bugs/javascript/tests/test_subscription.js (+0/-16) lib/lp/code/javascript/branch.information_type_choice.js (+0/-1) lib/lp/code/javascript/productseries-setbranch.js (+0/-1) lib/lp/code/javascript/tests/test_bugspeclinks.js (+0/-4) lib/lp/registry/javascript/distroseries/differences.js (+1/-2) lib/lp/registry/javascript/distroseries/tests/test_initseries.js (+0/-1) lib/lp/registry/javascript/product_views.js (+0/-1) lib/lp/registry/javascript/sharing/granteetable.js (+0/-1) lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js (+0/-1) lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js (+0/-3) lib/lp/registry/javascript/structural-subscription.js (+0/-3) lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+0/-5) lib/lp/registry/javascript/tests/test_milestone_creation.js (+1/-4) lib/lp/registry/javascript/tests/test_structural_subscription.js (+0/-18) lib/lp/registry/javascript/tests/test_team_mailinglists.js (+2/-4) lib/lp/registry/javascript/timeline.js (+0/-2) lib/lp/soyuz/javascript/tests/test_archive-packages.html (+1/-1) lib/lp/soyuz/javascript/tests/test_archive-packages.js (+2/-4) lib/lp/translations/javascript/sourcepackage_sharing_details.js (+0/-4) |
To merge this branch: | bzr merge lp:~cjwatson/launchpad/eslint-remove-dead-code |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | Approve | ||
Review via email: mp+327892@code.launchpad.net |
Commit message
Remove lots of dead JavaScript code spotted by ESLint.
Description of the change
To post a comment you must log in.
Revision history for this message
William Grant (wgrant) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/app/javascript/autocomplete/autocomplete.js' | |||
2 | --- lib/lp/app/javascript/autocomplete/autocomplete.js 2013-03-20 03:41:40 +0000 | |||
3 | +++ lib/lp/app/javascript/autocomplete/autocomplete.js 2017-07-21 16:50:14 +0000 | |||
4 | @@ -428,7 +428,6 @@ | |||
5 | 428 | // is indexed by the start of the match. | 428 | // is indexed by the start of the match. |
6 | 429 | 429 | ||
7 | 430 | var midx; | 430 | var midx; |
8 | 431 | var match_key; | ||
9 | 432 | var match_string; | 431 | var match_string; |
10 | 433 | var start_indicies = []; | 432 | var start_indicies = []; |
11 | 434 | 433 | ||
12 | 435 | 434 | ||
13 | === modified file 'lib/lp/app/javascript/choiceedit/choiceedit.js' | |||
14 | --- lib/lp/app/javascript/choiceedit/choiceedit.js 2013-03-20 03:41:40 +0000 | |||
15 | +++ lib/lp/app/javascript/choiceedit/choiceedit.js 2017-07-21 16:50:14 +0000 | |||
16 | @@ -20,7 +20,6 @@ | |||
17 | 20 | C_NULLTEXTLOCATION = 'nulltext', | 20 | C_NULLTEXTLOCATION = 'nulltext', |
18 | 21 | C_ADDICON = 'addicon', | 21 | C_ADDICON = 'addicon', |
19 | 22 | SAVE = 'save', | 22 | SAVE = 'save', |
20 | 23 | LEFT_MOUSE_BUTTON = 1, | ||
21 | 24 | RENDERUI = "renderUI", | 23 | RENDERUI = "renderUI", |
22 | 25 | BINDUI = "bindUI", | 24 | BINDUI = "bindUI", |
23 | 26 | SYNCUI = "syncUI", | 25 | SYNCUI = "syncUI", |
24 | 27 | 26 | ||
25 | === modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js' | |||
26 | --- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2013-04-09 07:20:39 +0000 | |||
27 | +++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2017-07-21 16:50:14 +0000 | |||
28 | @@ -5,9 +5,8 @@ | |||
29 | 5 | var tests = Y.namespace('lp.choiceedit.test'); | 5 | var tests = Y.namespace('lp.choiceedit.test'); |
30 | 6 | tests.suite = new Y.Test.Suite('choiceedit tests'); | 6 | tests.suite = new Y.Test.Suite('choiceedit tests'); |
31 | 7 | 7 | ||
35 | 8 | // Local aliases | 8 | // Local alias. |
36 | 9 | var Assert = Y.Assert, | 9 | var Assert = Y.Assert; |
34 | 10 | ArrayAssert = Y.ArrayAssert; | ||
37 | 11 | 10 | ||
38 | 12 | /* | 11 | /* |
39 | 13 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts | 12 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
40 | @@ -172,7 +171,6 @@ | |||
41 | 172 | 171 | ||
42 | 173 | test_choicelist_html_has_disabled: function() { | 172 | test_choicelist_html_has_disabled: function() { |
43 | 174 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); | 173 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
44 | 175 | var configcount = this.config.items.length; | ||
45 | 176 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); | 174 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); |
46 | 177 | // confirm that disabled LIs are disabled | 175 | // confirm that disabled LIs are disabled |
47 | 178 | var that = this; | 176 | var that = this; |
48 | @@ -193,7 +191,6 @@ | |||
49 | 193 | 191 | ||
50 | 194 | test_choicelist_html_has_current: function() { | 192 | test_choicelist_html_has_current: function() { |
51 | 195 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); | 193 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
52 | 196 | var configcount = this.config.items.length; | ||
53 | 197 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); | 194 | var choicelist_lis = Y.one(document).all(".yui3-ichoicelist li"); |
54 | 198 | // confirm that current value has an LI with current style | 195 | // confirm that current value has an LI with current style |
55 | 199 | var that = this; | 196 | var that = this; |
56 | @@ -221,7 +218,6 @@ | |||
57 | 221 | 218 | ||
58 | 222 | test_clicking_choicelist_item_fires_signal: function() { | 219 | test_clicking_choicelist_item_fires_signal: function() { |
59 | 223 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); | 220 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
60 | 224 | var that = this; | ||
61 | 225 | var fired = false; | 221 | var fired = false; |
62 | 226 | this.choice_edit._choice_list.on("valueChosen", function() { | 222 | this.choice_edit._choice_list.on("valueChosen", function() { |
63 | 227 | fired = true; | 223 | fired = true; |
64 | @@ -236,7 +232,6 @@ | |||
65 | 236 | 232 | ||
66 | 237 | test_clicking_choicelist_item_does_green_flash: function() { | 233 | test_clicking_choicelist_item_does_green_flash: function() { |
67 | 238 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); | 234 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
68 | 239 | var that = this; | ||
69 | 240 | var green_flash = Y.lp.anim.green_flash; | 235 | var green_flash = Y.lp.anim.green_flash; |
70 | 241 | var flashed = false; | 236 | var flashed = false; |
71 | 242 | Y.lp.anim.green_flash = function() { | 237 | Y.lp.anim.green_flash = function() { |
72 | @@ -381,7 +376,6 @@ | |||
73 | 381 | 376 | ||
74 | 382 | test_choicelist_html_has_current: function() { | 377 | test_choicelist_html_has_current: function() { |
75 | 383 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); | 378 | simulate(this.choice_edit.get('boundingBox'), '.value', 'click'); |
76 | 384 | var configcount = this.config.items.length; | ||
77 | 385 | var choicelist_lis = Y.one(document) | 379 | var choicelist_lis = Y.one(document) |
78 | 386 | .all(".yui3-ichoicelist li"); | 380 | .all(".yui3-ichoicelist li"); |
79 | 387 | 381 | ||
80 | @@ -481,8 +475,6 @@ | |||
81 | 481 | }, | 475 | }, |
82 | 482 | 476 | ||
83 | 483 | test_action_icon: function() { | 477 | test_action_icon: function() { |
84 | 484 | var that = this; | ||
85 | 485 | |||
86 | 486 | Assert.areEqual( | 478 | Assert.areEqual( |
87 | 487 | this.null_choice_edit.get('actionicon'), | 479 | this.null_choice_edit.get('actionicon'), |
88 | 488 | this.null_choice_edit.get('addicon'), | 480 | this.null_choice_edit.get('addicon'), |
89 | 489 | 481 | ||
90 | === modified file 'lib/lp/app/javascript/client.js' | |||
91 | --- lib/lp/app/javascript/client.js 2017-07-20 13:29:41 +0000 | |||
92 | +++ lib/lp/app/javascript/client.js 2017-07-21 16:50:14 +0000 | |||
93 | @@ -610,7 +610,6 @@ | |||
94 | 610 | this.lp_client = client; | 610 | this.lp_client = client; |
95 | 611 | this.uri = uri; | 611 | this.uri = uri; |
96 | 612 | this.dirty_attributes = []; | 612 | this.dirty_attributes = []; |
97 | 613 | var entry = this; | ||
98 | 614 | 613 | ||
99 | 615 | // Copy the representation keys into our own set of attributes, and add | 614 | // Copy the representation keys into our own set of attributes, and add |
100 | 616 | // an attribute-change event listener for caching purposes. | 615 | // an attribute-change event listener for caching purposes. |
101 | @@ -1106,7 +1105,6 @@ | |||
102 | 1106 | // widget in a clean state. | 1105 | // widget in a clean state. |
103 | 1107 | this.doBefore("_saveData", this.doPATCH); | 1106 | this.doBefore("_saveData", this.doPATCH); |
104 | 1108 | 1107 | ||
105 | 1109 | var self = this; | ||
106 | 1110 | this.error_handler = new Y.lp.client.ErrorHandler(); | 1108 | this.error_handler = new Y.lp.client.ErrorHandler(); |
107 | 1111 | this.error_handler.clearProgressUI = function () { | 1109 | this.error_handler.clearProgressUI = function () { |
108 | 1112 | config.host._uiClearWaiting(); | 1110 | config.host._uiClearWaiting(); |
109 | 1113 | 1111 | ||
110 | === modified file 'lib/lp/app/javascript/expander.js' | |||
111 | --- lib/lp/app/javascript/expander.js 2017-07-20 13:29:41 +0000 | |||
112 | +++ lib/lp/app/javascript/expander.js 2017-07-21 16:50:14 +0000 | |||
113 | @@ -255,7 +255,6 @@ | |||
114 | 255 | */ | 255 | */ |
115 | 256 | foldContentNode: function(expand, no_animation) { | 256 | foldContentNode: function(expand, no_animation) { |
116 | 257 | var expander = this; | 257 | var expander = this; |
117 | 258 | var has_paused = false; | ||
118 | 259 | if (no_animation === true || Y.Lang.isUndefined(this._animation)) { | 258 | if (no_animation === true || Y.Lang.isUndefined(this._animation)) { |
119 | 260 | // Make the animation have the proper direction set from | 259 | // Make the animation have the proper direction set from |
120 | 261 | // the start. | 260 | // the start. |
121 | 262 | 261 | ||
122 | === modified file 'lib/lp/app/javascript/formoverlay/formoverlay.js' | |||
123 | --- lib/lp/app/javascript/formoverlay/formoverlay.js 2014-01-30 15:04:06 +0000 | |||
124 | +++ lib/lp/app/javascript/formoverlay/formoverlay.js 2017-07-21 16:50:14 +0000 | |||
125 | @@ -18,7 +18,6 @@ | |||
126 | 18 | var ns = Y.namespace("lp.ui"); | 18 | var ns = Y.namespace("lp.ui"); |
127 | 19 | var getCN = Y.ClassNameManager.getClassName, | 19 | var getCN = Y.ClassNameManager.getClassName, |
128 | 20 | NAME = 'lazr-formoverlay', | 20 | NAME = 'lazr-formoverlay', |
129 | 21 | CONTENT_BOX = 'contentBox', | ||
130 | 22 | RENDERUI = "renderUI", | 21 | RENDERUI = "renderUI", |
131 | 23 | BINDUI = "bindUI"; | 22 | BINDUI = "bindUI"; |
132 | 24 | 23 | ||
133 | @@ -470,7 +469,6 @@ | |||
134 | 470 | var select_idx; | 469 | var select_idx; |
135 | 471 | var num_options; | 470 | var num_options; |
136 | 472 | var option; | 471 | var option; |
137 | 473 | var option_value; | ||
138 | 474 | 472 | ||
139 | 475 | // Iterate over the form elements collection to construct the | 473 | // Iterate over the form elements collection to construct the |
140 | 476 | // label-value pairs. | 474 | // label-value pairs. |
141 | 477 | 475 | ||
142 | === modified file 'lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js' | |||
143 | --- lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2013-03-20 03:41:40 +0000 | |||
144 | +++ lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2017-07-21 16:50:14 +0000 | |||
145 | @@ -109,7 +109,6 @@ | |||
146 | 109 | this.form_overlay.hide(); | 109 | this.form_overlay.hide(); |
147 | 110 | first_input.blur(); | 110 | first_input.blur(); |
148 | 111 | 111 | ||
149 | 112 | var test = this; | ||
150 | 113 | var focused = false; | 112 | var focused = false; |
151 | 114 | 113 | ||
152 | 115 | var onFocus = function(e) { | 114 | var onFocus = function(e) { |
153 | @@ -366,7 +365,6 @@ | |||
154 | 366 | }); | 365 | }); |
155 | 367 | 366 | ||
156 | 368 | var event_was_propagated = false; | 367 | var event_was_propagated = false; |
157 | 369 | var test = this; | ||
158 | 370 | var onSubmit = function(e) { | 368 | var onSubmit = function(e) { |
159 | 371 | event_was_propagated = true; | 369 | event_was_propagated = true; |
160 | 372 | e.preventDefault(); | 370 | e.preventDefault(); |
161 | @@ -389,7 +387,6 @@ | |||
162 | 389 | }); | 387 | }); |
163 | 390 | 388 | ||
164 | 391 | var event_was_propagated = false; | 389 | var event_was_propagated = false; |
165 | 392 | var test = this; | ||
166 | 393 | var onSubmit = function(e) { | 390 | var onSubmit = function(e) { |
167 | 394 | event_was_propagated = true; | 391 | event_was_propagated = true; |
168 | 395 | e.preventDefault(); | 392 | e.preventDefault(); |
169 | 396 | 393 | ||
170 | === modified file 'lib/lp/app/javascript/indicator/tests/test_indicator.js' | |||
171 | --- lib/lp/app/javascript/indicator/tests/test_indicator.js 2017-01-13 13:32:06 +0000 | |||
172 | +++ lib/lp/app/javascript/indicator/tests/test_indicator.js 2017-07-21 16:50:14 +0000 | |||
173 | @@ -66,7 +66,6 @@ | |||
174 | 66 | }); | 66 | }); |
175 | 67 | this.indicator.render(); | 67 | this.indicator.render(); |
176 | 68 | var content = this.indicator.get('boundingBox'); | 68 | var content = this.indicator.get('boundingBox'); |
177 | 69 | var test = content.getContent(); | ||
178 | 70 | var img = content.one('img'); | 69 | var img = content.one('img'); |
179 | 71 | Assert.areEqual('file:///@@/spinner-big', img.get('src')); | 70 | Assert.areEqual('file:///@@/spinner-big', img.get('src')); |
180 | 72 | }, | 71 | }, |
181 | 73 | 72 | ||
182 | === modified file 'lib/lp/app/javascript/inlineedit/editor.js' | |||
183 | --- lib/lp/app/javascript/inlineedit/editor.js 2013-12-12 04:47:30 +0000 | |||
184 | +++ lib/lp/app/javascript/inlineedit/editor.js 2017-07-21 16:50:14 +0000 | |||
185 | @@ -63,11 +63,7 @@ | |||
186 | 63 | C_ERROR_HIDDEN = getCN(EDITOR, 'errors', HIDDEN), | 63 | C_ERROR_HIDDEN = getCN(EDITOR, 'errors', HIDDEN), |
187 | 64 | 64 | ||
188 | 65 | SAVE = 'save', | 65 | SAVE = 'save', |
194 | 66 | CANCEL = 'cancel', | 66 | CANCEL = 'cancel'; |
190 | 67 | SHRINK = 'shrink'; | ||
191 | 68 | |||
192 | 69 | // To strip the 'px' unit suffix off widget sizes. | ||
193 | 70 | var strip_px = /px$/; | ||
195 | 71 | 67 | ||
196 | 72 | var InlineEditor = function() { | 68 | var InlineEditor = function() { |
197 | 73 | InlineEditor.superclass.constructor.apply(this, arguments); | 69 | InlineEditor.superclass.constructor.apply(this, arguments); |
198 | @@ -723,7 +719,6 @@ | |||
199 | 723 | 719 | ||
200 | 724 | // hook up the resizing textarea to handle those changes | 720 | // hook up the resizing textarea to handle those changes |
201 | 725 | var cfg = this.cfg; | 721 | var cfg = this.cfg; |
202 | 726 | var input = this.get(INPUT_EL); | ||
203 | 727 | var that = this; | 722 | var that = this; |
204 | 728 | 723 | ||
205 | 729 | if (!this.get(MULTILINE)) { | 724 | if (!this.get(MULTILINE)) { |
206 | 730 | 725 | ||
207 | === modified file 'lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js' | |||
208 | --- lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2013-03-20 03:41:40 +0000 | |||
209 | +++ lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2017-07-21 16:50:14 +0000 | |||
210 | @@ -26,19 +26,6 @@ | |||
211 | 26 | ].join(''); | 26 | ].join(''); |
212 | 27 | 27 | ||
213 | 28 | 28 | ||
214 | 29 | /* Helper to stamp a Node with an ID attribute. Needed for YUI 2.X | ||
215 | 30 | * testing, which is heavily ID-based. | ||
216 | 31 | * | ||
217 | 32 | * Returns the node's 'id' attribute. | ||
218 | 33 | */ | ||
219 | 34 | function id_for(node) { | ||
220 | 35 | if (!node.getAttribute('id')) { | ||
221 | 36 | var id = Y.stamp(node); | ||
222 | 37 | node.setAttribute('id', id); | ||
223 | 38 | } | ||
224 | 39 | return node.getAttribute('id'); | ||
225 | 40 | } | ||
226 | 41 | |||
227 | 42 | /* | 29 | /* |
228 | 43 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts | 30 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
229 | 44 | * CSS selectors and Node instances instead of raw nodes. | 31 | * CSS selectors and Node instances instead of raw nodes. |
230 | @@ -290,7 +277,6 @@ | |||
231 | 290 | this.editor.render(); | 277 | this.editor.render(); |
232 | 291 | 278 | ||
233 | 292 | var input = this.editor.get('input_field'), | 279 | var input = this.editor.get('input_field'), |
234 | 293 | test = this, | ||
235 | 294 | focused = false; | 280 | focused = false; |
236 | 295 | 281 | ||
237 | 296 | Y.on('focus', function() { | 282 | Y.on('focus', function() { |
238 | @@ -323,7 +309,6 @@ | |||
239 | 323 | // empty string. | 309 | // empty string. |
240 | 324 | input.set('value', ''); | 310 | input.set('value', ''); |
241 | 325 | 311 | ||
242 | 326 | var test = this; | ||
243 | 327 | // Add our focus event listener. | 312 | // Add our focus event listener. |
244 | 328 | Y.on('focus', function() { | 313 | Y.on('focus', function() { |
245 | 329 | got_focus = true; | 314 | got_focus = true; |
246 | 330 | 315 | ||
247 | === modified file 'lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js' | |||
248 | --- lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js 2013-03-20 03:41:40 +0000 | |||
249 | +++ lib/lp/app/javascript/inlinehelp/tests/test_inlinehelp.js 2017-07-21 16:50:14 +0000 | |||
250 | @@ -5,7 +5,6 @@ | |||
251 | 5 | 5 | ||
252 | 6 | var tests = Y.namespace('lp.app.inlinehelp.test'); | 6 | var tests = Y.namespace('lp.app.inlinehelp.test'); |
253 | 7 | tests.suite = new Y.Test.Suite('InlineHelp Tests'); | 7 | tests.suite = new Y.Test.Suite('InlineHelp Tests'); |
254 | 8 | var Assert = Y.Assert; | ||
255 | 9 | tests.suite.add(new Y.Test.Case({ | 8 | tests.suite.add(new Y.Test.Case({ |
256 | 10 | name: 'inlinehelp.init_help', | 9 | name: 'inlinehelp.init_help', |
257 | 11 | 10 | ||
258 | 12 | 11 | ||
259 | === modified file 'lib/lp/app/javascript/listing_navigator.js' | |||
260 | --- lib/lp/app/javascript/listing_navigator.js 2012-09-12 01:45:17 +0000 | |||
261 | +++ lib/lp/app/javascript/listing_navigator.js 2017-07-21 16:50:14 +0000 | |||
262 | @@ -181,8 +181,6 @@ | |||
263 | 181 | */ | 181 | */ |
264 | 182 | default_history_changed: function(e) { | 182 | default_history_changed: function(e) { |
265 | 183 | if (e.newVal.hasOwnProperty('batch_key')) { | 183 | if (e.newVal.hasOwnProperty('batch_key')) { |
266 | 184 | var batch_key = e.newVal.batch_key; | ||
267 | 185 | var batch = this.get('batches')[batch_key]; | ||
268 | 186 | this.pre_fetch_batches(); | 184 | this.pre_fetch_batches(); |
269 | 187 | this.render(); | 185 | this.render(); |
270 | 188 | this._bindUI(); | 186 | this._bindUI(); |
271 | 189 | 187 | ||
272 | === modified file 'lib/lp/app/javascript/overlay/overlay.js' | |||
273 | --- lib/lp/app/javascript/overlay/overlay.js 2013-03-20 03:41:40 +0000 | |||
274 | +++ lib/lp/app/javascript/overlay/overlay.js 2017-07-21 16:50:14 +0000 | |||
275 | @@ -11,8 +11,7 @@ | |||
276 | 11 | 11 | ||
277 | 12 | var ns = Y.namespace('lp.ui'); | 12 | var ns = Y.namespace('lp.ui'); |
278 | 13 | 13 | ||
281 | 14 | var ESCAPE = 27, | 14 | var TAB = 9, |
280 | 15 | TAB = 9, | ||
282 | 16 | CANCEL = 'cancel', | 15 | CANCEL = 'cancel', |
283 | 17 | BOUNDING_BOX = 'boundingBox', | 16 | BOUNDING_BOX = 'boundingBox', |
284 | 18 | CONTENT_BOX = 'contentBox', | 17 | CONTENT_BOX = 'contentBox', |
285 | 19 | 18 | ||
286 | === modified file 'lib/lp/app/javascript/overlay/tests/test_overlay.js' | |||
287 | --- lib/lp/app/javascript/overlay/tests/test_overlay.js 2013-03-20 03:41:40 +0000 | |||
288 | +++ lib/lp/app/javascript/overlay/tests/test_overlay.js 2017-07-21 16:50:14 +0000 | |||
289 | @@ -9,9 +9,8 @@ | |||
290 | 9 | // KeyCode for escape | 9 | // KeyCode for escape |
291 | 10 | var ESCAPE = 27; | 10 | var ESCAPE = 27; |
292 | 11 | 11 | ||
296 | 12 | // Local aliases | 12 | // Local alias. |
297 | 13 | var Assert = Y.Assert, | 13 | var Assert = Y.Assert; |
295 | 14 | ArrayAssert = Y.ArrayAssert; | ||
298 | 15 | 14 | ||
299 | 16 | /* | 15 | /* |
300 | 17 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts | 16 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
301 | 18 | 17 | ||
302 | === modified file 'lib/lp/app/javascript/picker/tests/test_picker.js' | |||
303 | --- lib/lp/app/javascript/picker/tests/test_picker.js 2014-05-19 11:33:05 +0000 | |||
304 | +++ lib/lp/app/javascript/picker/tests/test_picker.js 2017-07-21 16:50:14 +0000 | |||
305 | @@ -456,7 +456,6 @@ | |||
306 | 456 | 456 | ||
307 | 457 | test_results_updates_display_with_missing_data: function () { | 457 | test_results_updates_display_with_missing_data: function () { |
308 | 458 | this.picker.render(); | 458 | this.picker.render(); |
309 | 459 | var image_url = '../../ui/assets/skins/sam/search.png'; | ||
310 | 460 | this.picker.set('results', [ | 459 | this.picker.set('results', [ |
311 | 461 | { value: 'jschmo', title: 'Joe Schmo' } | 460 | { value: 'jschmo', title: 'Joe Schmo' } |
312 | 462 | ]); | 461 | ]); |
313 | @@ -942,7 +941,6 @@ | |||
314 | 942 | ]); | 941 | ]); |
315 | 943 | this.picker.render(); | 942 | this.picker.render(); |
316 | 944 | 943 | ||
317 | 945 | var bb = this.picker.get('boundingBox'); | ||
318 | 946 | var event_has_fired = false; | 944 | var event_has_fired = false; |
319 | 947 | this.picker.subscribe('search', function(e) { | 945 | this.picker.subscribe('search', function(e) { |
320 | 948 | event_has_fired = true; | 946 | event_has_fired = true; |
321 | @@ -965,7 +963,6 @@ | |||
322 | 965 | ]); | 963 | ]); |
323 | 966 | this.picker.render(); | 964 | this.picker.render(); |
324 | 967 | 965 | ||
325 | 968 | var bb = this.picker.get('boundingBox'); | ||
326 | 969 | Assert.areEqual( | 966 | Assert.areEqual( |
327 | 970 | 0, this.picker.get('selected_batch'), | 967 | 0, this.picker.get('selected_batch'), |
328 | 971 | "First batch should be selected."); | 968 | "First batch should be selected."); |
329 | @@ -1065,7 +1062,6 @@ | |||
330 | 1065 | this.picker.set('selected_batch', 1); | 1062 | this.picker.set('selected_batch', 1); |
331 | 1066 | this.picker.render(); | 1063 | this.picker.render(); |
332 | 1067 | 1064 | ||
333 | 1068 | var bb = this.picker.get('boundingBox'); | ||
334 | 1069 | simulate( | 1065 | simulate( |
335 | 1070 | this.picker.get('boundingBox'), '.lazr-next.lazr-btn', 'click'); | 1066 | this.picker.get('boundingBox'), '.lazr-next.lazr-btn', 'click'); |
336 | 1071 | Assert.areEqual( | 1067 | Assert.areEqual( |
337 | @@ -1104,7 +1100,6 @@ | |||
338 | 1104 | this.picker.set('selected_batch', 1); | 1100 | this.picker.set('selected_batch', 1); |
339 | 1105 | this.picker.render(); | 1101 | this.picker.render(); |
340 | 1106 | 1102 | ||
341 | 1107 | var bb = this.picker.get('boundingBox'); | ||
342 | 1108 | simulate( | 1103 | simulate( |
343 | 1109 | this.picker.get('boundingBox'), '.lazr-prev.lazr-btn', 'click'); | 1104 | this.picker.get('boundingBox'), '.lazr-prev.lazr-btn', 'click'); |
344 | 1110 | Assert.areEqual( | 1105 | Assert.areEqual( |
345 | 1111 | 1106 | ||
346 | === modified file 'lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js' | |||
347 | --- lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2013-03-20 03:41:40 +0000 | |||
348 | +++ lib/lp/app/javascript/subscribers/tests/test_subscribers_list.js 2017-07-21 16:50:14 +0000 | |||
349 | @@ -1799,11 +1799,6 @@ | |||
350 | 1799 | test_loadSubscribers_failure: function() { | 1799 | test_loadSubscribers_failure: function() { |
351 | 1800 | // On failure to load, activity indication is set to an error | 1800 | // On failure to load, activity indication is set to an error |
352 | 1801 | // message received from the server. | 1801 | // message received from the server. |
353 | 1802 | var details = [ | ||
354 | 1803 | { subscriber: { name: "subscriber" }, | ||
355 | 1804 | subscription_level: 'Level3' } | ||
356 | 1805 | ]; | ||
357 | 1806 | |||
358 | 1807 | var loader = setUpLoader(this.root); | 1802 | var loader = setUpLoader(this.root); |
359 | 1808 | 1803 | ||
360 | 1809 | // Mock lp_client for testing erroring out with 'BOOM'. | 1804 | // Mock lp_client for testing erroring out with 'BOOM'. |
361 | 1810 | 1805 | ||
362 | === modified file 'lib/lp/app/javascript/testing/tests/test_mockio.js' | |||
363 | --- lib/lp/app/javascript/testing/tests/test_mockio.js 2013-03-20 03:41:40 +0000 | |||
364 | +++ lib/lp/app/javascript/testing/tests/test_mockio.js 2017-07-21 16:50:14 +0000 | |||
365 | @@ -121,8 +121,7 @@ | |||
366 | 121 | var mockio = this._make_mockio(); | 121 | var mockio = this._make_mockio(); |
367 | 122 | var response = new Y.lp.testing.mockio.MockHttpResponse(); | 122 | var response = new Y.lp.testing.mockio.MockHttpResponse(); |
368 | 123 | var expected_header_key = "X-My-Header", | 123 | var expected_header_key = "X-My-Header", |
371 | 124 | expected_header_val = "MyHeaderValue", | 124 | expected_header_val = "MyHeaderValue"; |
370 | 125 | response_headers = {}; | ||
372 | 126 | response.setResponseHeader( | 125 | response.setResponseHeader( |
373 | 127 | expected_header_key, | 126 | expected_header_key, |
374 | 128 | expected_header_val); | 127 | expected_header_val); |
375 | 129 | 128 | ||
376 | === modified file 'lib/lp/app/javascript/tests/test_comment.js' | |||
377 | --- lib/lp/app/javascript/tests/test_comment.js 2013-03-20 03:41:40 +0000 | |||
378 | +++ lib/lp/app/javascript/tests/test_comment.js 2017-07-21 16:50:14 +0000 | |||
379 | @@ -52,17 +52,13 @@ | |||
380 | 52 | var comment = this._get_mocked_comment(); | 52 | var comment = this._get_mocked_comment(); |
381 | 53 | var progress_ui_called = false; | 53 | var progress_ui_called = false; |
382 | 54 | var post_comment_called = false; | 54 | var post_comment_called = false; |
383 | 55 | var extra_call_called = false; | ||
384 | 56 | comment.activateProgressUI = function () { | 55 | comment.activateProgressUI = function () { |
385 | 57 | progress_ui_called = true; | 56 | progress_ui_called = true; |
386 | 58 | }; | 57 | }; |
387 | 59 | comment.post_comment = function () { | 58 | comment.post_comment = function () { |
388 | 60 | post_comment_called = true; | 59 | post_comment_called = true; |
389 | 61 | }; | 60 | }; |
394 | 62 | comment._add_comment_success = function () { | 61 | comment.validate = function () { return true; }; |
391 | 63 | extra_call_called = true; | ||
392 | 64 | }; | ||
393 | 65 | comment.validate = function () { return true }; | ||
395 | 66 | var mock_event = { halt: function () {} }; | 62 | var mock_event = { halt: function () {} }; |
396 | 67 | 63 | ||
397 | 68 | comment.add_comment(mock_event); | 64 | comment.add_comment(mock_event); |
398 | 69 | 65 | ||
399 | === modified file 'lib/lp/app/javascript/tests/test_information_type.js' | |||
400 | --- lib/lp/app/javascript/tests/test_information_type.js 2013-03-20 03:41:40 +0000 | |||
401 | +++ lib/lp/app/javascript/tests/test_information_type.js 2017-07-21 16:50:14 +0000 | |||
402 | @@ -130,10 +130,6 @@ | |||
403 | 130 | // A successful save updates the subscribers portlet. | 130 | // A successful save updates the subscribers portlet. |
404 | 131 | test_save_success_with_subscribers_data: function() { | 131 | test_save_success_with_subscribers_data: function() { |
405 | 132 | this.makeWidget(); | 132 | this.makeWidget(); |
406 | 133 | var flag = false; | ||
407 | 134 | Y.on('test:banner:hide', function() { | ||
408 | 135 | flag = true; | ||
409 | 136 | }); | ||
410 | 137 | var summary = Y.one('#information-type-summary'); | 133 | var summary = Y.one('#information-type-summary'); |
411 | 138 | summary.replaceClass('public', 'private'); | 134 | summary.replaceClass('public', 'private'); |
412 | 139 | 135 | ||
413 | 140 | 136 | ||
414 | === modified file 'lib/lp/app/javascript/tests/test_listing_navigator.js' | |||
415 | --- lib/lp/app/javascript/tests/test_listing_navigator.js 2013-03-20 03:41:40 +0000 | |||
416 | +++ lib/lp/app/javascript/tests/test_listing_navigator.js 2017-07-21 16:50:14 +0000 | |||
417 | @@ -723,7 +723,6 @@ | |||
418 | 723 | * batch if Navigator.get('pre_fetch') is false. | 723 | * batch if Navigator.get('pre_fetch') is false. |
419 | 724 | */ | 724 | */ |
420 | 725 | test_pre_fetch_disabled: function() { | 725 | test_pre_fetch_disabled: function() { |
421 | 726 | var last_url; | ||
422 | 727 | var navigator = this.get_pre_fetch_navigator({target: this.target}); | 726 | var navigator = this.get_pre_fetch_navigator({target: this.target}); |
423 | 728 | navigator.pre_fetch_batches(); | 727 | navigator.pre_fetch_batches(); |
424 | 729 | Y.Assert.areSame(null, navigator.get('io_provider').last_request); | 728 | Y.Assert.areSame(null, navigator.get('io_provider').last_request); |
425 | 730 | 729 | ||
426 | === modified file 'lib/lp/app/javascript/tests/test_longpoll.js' | |||
427 | --- lib/lp/app/javascript/tests/test_longpoll.js 2013-03-20 03:41:40 +0000 | |||
428 | +++ lib/lp/app/javascript/tests/test_longpoll.js 2017-07-21 16:50:14 +0000 | |||
429 | @@ -3,7 +3,6 @@ | |||
430 | 3 | YUI.add('lp.longpoll.test', function (Y) { | 3 | YUI.add('lp.longpoll.test', function (Y) { |
431 | 4 | var longpoll = Y.lp.app.longpoll; | 4 | var longpoll = Y.lp.app.longpoll; |
432 | 5 | 5 | ||
433 | 6 | var suite = new Y.Test.Suite("longpoll Tests"); | ||
434 | 7 | var tests = Y.namespace('lp.longpoll.test'); | 6 | var tests = Y.namespace('lp.longpoll.test'); |
435 | 8 | tests.suite = new Y.Test.Suite('longpoll Tests'); | 7 | tests.suite = new Y.Test.Suite('longpoll Tests'); |
436 | 9 | 8 | ||
437 | 10 | 9 | ||
438 | === modified file 'lib/lp/blueprints/javascript/tests/test_workitems.js' | |||
439 | --- lib/lp/blueprints/javascript/tests/test_workitems.js 2012-10-26 10:00:20 +0000 | |||
440 | +++ lib/lp/blueprints/javascript/tests/test_workitems.js 2017-07-21 16:50:14 +0000 | |||
441 | @@ -29,7 +29,6 @@ | |||
442 | 29 | _all_expanders_are_closed: function(){ | 29 | _all_expanders_are_closed: function(){ |
443 | 30 | var found_open = false; | 30 | var found_open = false; |
444 | 31 | Y.all('.collapsible-body').each(function(e) { | 31 | Y.all('.collapsible-body').each(function(e) { |
445 | 32 | found_collapsible_body = true; | ||
446 | 33 | if (!e.hasClass('hidden')) | 32 | if (!e.hasClass('hidden')) |
447 | 34 | { | 33 | { |
448 | 35 | found_open = true; | 34 | found_open = true; |
449 | @@ -42,7 +41,6 @@ | |||
450 | 42 | _all_expanders_are_open: function(){ | 41 | _all_expanders_are_open: function(){ |
451 | 43 | var found_closed = false; | 42 | var found_closed = false; |
452 | 44 | Y.all('.collapsible-body').each(function(e) { | 43 | Y.all('.collapsible-body').each(function(e) { |
453 | 45 | found_collapsible_body = true; | ||
454 | 46 | if (e.hasClass('hidden')) | 44 | if (e.hasClass('hidden')) |
455 | 47 | { | 45 | { |
456 | 48 | found_closed = true; | 46 | found_closed = true; |
457 | 49 | 47 | ||
458 | === modified file 'lib/lp/bugs/javascript/bugtask_index.js' | |||
459 | --- lib/lp/bugs/javascript/bugtask_index.js 2012-11-12 13:45:58 +0000 | |||
460 | +++ lib/lp/bugs/javascript/bugtask_index.js 2017-07-21 16:50:14 +0000 | |||
461 | @@ -1004,9 +1004,6 @@ | |||
462 | 1004 | namespace.load_more_comments = function(batched_comments_url, | 1004 | namespace.load_more_comments = function(batched_comments_url, |
463 | 1005 | comments_container, | 1005 | comments_container, |
464 | 1006 | io_provider) { | 1006 | io_provider) { |
465 | 1007 | var spinner = Y.Node.create( | ||
466 | 1008 | '<img src="/@@/spinner" style="text_align: center; ' + | ||
467 | 1009 | 'display: none" />'); | ||
468 | 1010 | var spinner_span = Y.one('#more-comments-spinner'); | 1007 | var spinner_span = Y.one('#more-comments-spinner'); |
469 | 1011 | spinner_span.setStyle('display', 'inline'); | 1008 | spinner_span.setStyle('display', 'inline'); |
470 | 1012 | var handlers = { | 1009 | var handlers = { |
471 | 1013 | 1010 | ||
472 | === modified file 'lib/lp/bugs/javascript/bugtracker_overlay.js' | |||
473 | --- lib/lp/bugs/javascript/bugtracker_overlay.js 2012-09-10 18:44:11 +0000 | |||
474 | +++ lib/lp/bugs/javascript/bugtracker_overlay.js 2017-07-21 16:50:14 +0000 | |||
475 | @@ -38,7 +38,6 @@ | |||
476 | 38 | on: { | 38 | on: { |
477 | 39 | success: finish_new_bugtracker, | 39 | success: finish_new_bugtracker, |
478 | 40 | failure: function (ignore, response, args) { | 40 | failure: function (ignore, response, args) { |
479 | 41 | var error_box = Y.one('#bugtracker-error'); | ||
480 | 42 | var error_message = response.statusText + '\n\n' + | 41 | var error_message = response.statusText + '\n\n' + |
481 | 43 | response.responseText; | 42 | response.responseText; |
482 | 44 | bugtracker_form.showError(error_message); | 43 | bugtracker_form.showError(error_message); |
483 | 45 | 44 | ||
484 | === modified file 'lib/lp/bugs/javascript/duplicates.js' | |||
485 | --- lib/lp/bugs/javascript/duplicates.js 2013-04-09 05:05:39 +0000 | |||
486 | +++ lib/lp/bugs/javascript/duplicates.js 2017-07-21 16:50:14 +0000 | |||
487 | @@ -322,7 +322,6 @@ | |||
488 | 322 | * @private | 322 | * @private |
489 | 323 | */ | 323 | */ |
490 | 324 | _submit_bug: function(new_dup_id, new_dupe_title, widget) { | 324 | _submit_bug: function(new_dup_id, new_dupe_title, widget) { |
491 | 325 | var dupe_span = this.get('dupe_span'); | ||
492 | 326 | var new_dup_url = null; | 325 | var new_dup_url = null; |
493 | 327 | 326 | ||
494 | 328 | var qs; | 327 | var qs; |
495 | 329 | 328 | ||
496 | === modified file 'lib/lp/bugs/javascript/filebug_dupefinder.js' | |||
497 | --- lib/lp/bugs/javascript/filebug_dupefinder.js 2012-09-10 20:52:27 +0000 | |||
498 | +++ lib/lp/bugs/javascript/filebug_dupefinder.js 2017-07-21 16:50:14 +0000 | |||
499 | @@ -10,11 +10,8 @@ | |||
500 | 10 | 10 | ||
501 | 11 | var BLOCK = 'block', | 11 | var BLOCK = 'block', |
502 | 12 | DISPLAY = 'display', | 12 | DISPLAY = 'display', |
503 | 13 | EXPANDER_COLLAPSED = '/@@/treeCollapsed', | ||
504 | 14 | EXPANDER_EXPANDED = '/@@/treeExpanded', | ||
505 | 15 | INNER_HTML = 'innerHTML', | 13 | INNER_HTML = 'innerHTML', |
506 | 16 | NONE = 'none', | 14 | NONE = 'none', |
507 | 17 | SRC = 'src', | ||
508 | 18 | HIDDEN = 'hidden'; | 15 | HIDDEN = 'hidden'; |
509 | 19 | 16 | ||
510 | 20 | var namespace = Y.namespace('lp.bugs.filebug_dupefinder'); | 17 | var namespace = Y.namespace('lp.bugs.filebug_dupefinder'); |
511 | @@ -56,25 +53,6 @@ | |||
512 | 56 | '<button type="button" name="field.actions.cancel">Choose Again</button>'; | 53 | '<button type="button" name="field.actions.cancel">Choose Again</button>'; |
513 | 57 | 54 | ||
514 | 58 | /** | 55 | /** |
515 | 59 | * Return the relevant duplicate-details div for a bug-already-reported | ||
516 | 60 | * expander. | ||
517 | 61 | * @param expander The expander for which to return the relevant div. | ||
518 | 62 | */ | ||
519 | 63 | function get_details_div(expander) { | ||
520 | 64 | var details_div = expander.get( | ||
521 | 65 | 'parentNode').get('parentNode').one('.duplicate-details'); | ||
522 | 66 | |||
523 | 67 | // Check that the details_div actually exists and raise an error if | ||
524 | 68 | // we can't find it. | ||
525 | 69 | if (!Y.Lang.isValue(details_div)) { | ||
526 | 70 | Y.fail( | ||
527 | 71 | "Unable to find details div for expander " + expander.get('id')); | ||
528 | 72 | } else { | ||
529 | 73 | return details_div; | ||
530 | 74 | } | ||
531 | 75 | } | ||
532 | 76 | |||
533 | 77 | /** | ||
534 | 78 | * Show the bug reporting form and collapse all bug details forms. | 56 | * Show the bug reporting form and collapse all bug details forms. |
535 | 79 | */ | 57 | */ |
536 | 80 | function show_bug_reporting_form() { | 58 | function show_bug_reporting_form() { |
537 | 81 | 59 | ||
538 | === modified file 'lib/lp/bugs/javascript/tests/test_async_comment_loading.js' | |||
539 | --- lib/lp/bugs/javascript/tests/test_async_comment_loading.js 2013-03-20 03:41:40 +0000 | |||
540 | +++ lib/lp/bugs/javascript/tests/test_async_comment_loading.js 2017-07-21 16:50:14 +0000 | |||
541 | @@ -4,10 +4,8 @@ | |||
542 | 4 | YUI.add('lp.bugs.async_comments.test', function (Y) { | 4 | YUI.add('lp.bugs.async_comments.test', function (Y) { |
543 | 5 | 5 | ||
544 | 6 | // Local aliases. | 6 | // Local aliases. |
547 | 7 | var Assert = Y.Assert, | 7 | var Assert = Y.Assert; |
546 | 8 | ArrayAssert = Y.ArrayAssert; | ||
548 | 9 | var module = Y.lp.bugs.bugtask_index; | 8 | var module = Y.lp.bugs.bugtask_index; |
549 | 10 | var suite = new Y.Test.Suite("Async comment loading tests"); | ||
550 | 11 | 9 | ||
551 | 12 | var comments_markup = | 10 | var comments_markup = |
552 | 13 | "<div>This is a comment</div>" + | 11 | "<div>This is a comment</div>" + |
553 | 14 | 12 | ||
554 | === modified file 'lib/lp/bugs/javascript/tests/test_duplicates.js' | |||
555 | --- lib/lp/bugs/javascript/tests/test_duplicates.js 2013-03-20 03:41:40 +0000 | |||
556 | +++ lib/lp/bugs/javascript/tests/test_duplicates.js 2017-07-21 16:50:14 +0000 | |||
557 | @@ -187,7 +187,6 @@ | |||
558 | 187 | test_picker_form_submission_failure: function() { | 187 | test_picker_form_submission_failure: function() { |
559 | 188 | this.widget = this._createWidget(false); | 188 | this.widget = this._createWidget(false); |
560 | 189 | this._assert_dupe_submission(3); | 189 | this._assert_dupe_submission(3); |
561 | 190 | var failure_called = false; | ||
562 | 191 | this.mockio.respond({ | 190 | this.mockio.respond({ |
563 | 192 | status: 400, | 191 | status: 400, |
564 | 193 | responseText: | 192 | responseText: |
565 | 194 | 193 | ||
566 | === modified file 'lib/lp/bugs/javascript/tests/test_me_too.js' | |||
567 | --- lib/lp/bugs/javascript/tests/test_me_too.js 2013-03-20 03:41:40 +0000 | |||
568 | +++ lib/lp/bugs/javascript/tests/test_me_too.js 2017-07-21 16:50:14 +0000 | |||
569 | @@ -2,9 +2,8 @@ | |||
570 | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). */ | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). */ |
571 | 3 | 3 | ||
572 | 4 | YUI.add('lp.bugs.bugtask_index.test_me_too', function (Y) { | 4 | YUI.add('lp.bugs.bugtask_index.test_me_too', function (Y) { |
576 | 5 | // Local aliases | 5 | // Local alias. |
577 | 6 | var Assert = Y.Assert, | 6 | var Assert = Y.Assert; |
575 | 7 | ArrayAssert = Y.ArrayAssert; | ||
578 | 8 | 7 | ||
579 | 9 | /* | 8 | /* |
580 | 10 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts | 9 | * A wrapper for the Y.Event.simulate() function. The wrapper accepts |
581 | 11 | 10 | ||
582 | === modified file 'lib/lp/bugs/javascript/tests/test_official_bug_tags.js' | |||
583 | --- lib/lp/bugs/javascript/tests/test_official_bug_tags.js 2013-03-20 03:41:40 +0000 | |||
584 | +++ lib/lp/bugs/javascript/tests/test_official_bug_tags.js 2017-07-21 16:50:14 +0000 | |||
585 | @@ -42,7 +42,6 @@ | |||
586 | 42 | new_tag_button.simulate('click'); | 42 | new_tag_button.simulate('click'); |
587 | 43 | var message_overlay = Y.one('.official-tag-error-message'); | 43 | var message_overlay = Y.one('.official-tag-error-message'); |
588 | 44 | Y.Assert.isNotNull(message_overlay); | 44 | Y.Assert.isNotNull(message_overlay); |
589 | 45 | var tag = message_overlay.one(".official-tag-error-message-value"); | ||
590 | 46 | Y.Assert.isTrue(message_overlay.get('text').indexOf('me!') !== -1); | 45 | Y.Assert.isTrue(message_overlay.get('text').indexOf('me!') !== -1); |
591 | 47 | } | 46 | } |
592 | 48 | })); | 47 | })); |
593 | 49 | 48 | ||
594 | === modified file 'lib/lp/bugs/javascript/tests/test_subscription.js' | |||
595 | --- lib/lp/bugs/javascript/tests/test_subscription.js 2013-03-20 03:41:40 +0000 | |||
596 | +++ lib/lp/bugs/javascript/tests/test_subscription.js 2017-07-21 16:50:14 +0000 | |||
597 | @@ -2680,14 +2680,6 @@ | |||
598 | 2680 | }; | 2680 | }; |
599 | 2681 | module.show_subscription_description(this.config); | 2681 | module.show_subscription_description(this.config); |
600 | 2682 | // Simulated return values from the named_post call. | 2682 | // Simulated return values from the named_post call. |
601 | 2683 | var sub = { | ||
602 | 2684 | bug: { | ||
603 | 2685 | 'private': false, | ||
604 | 2686 | security_related: false | ||
605 | 2687 | }, | ||
606 | 2688 | principal_is_reporter: false, | ||
607 | 2689 | subscription: {bug_notification_level: 'Details'} | ||
608 | 2690 | }; | ||
609 | 2691 | module._lp_client.named_post.args = []; | 2683 | module._lp_client.named_post.args = []; |
610 | 2692 | // Before clicking on the link the direct | 2684 | // Before clicking on the link the direct |
611 | 2693 | // subscription count is 3. | 2685 | // subscription count is 3. |
612 | @@ -2713,14 +2705,6 @@ | |||
613 | 2713 | }; | 2705 | }; |
614 | 2714 | module.show_subscription_description(this.config); | 2706 | module.show_subscription_description(this.config); |
615 | 2715 | // Simulated return values from the named_post call. | 2707 | // Simulated return values from the named_post call. |
616 | 2716 | var sub = { | ||
617 | 2717 | bug: { | ||
618 | 2718 | 'private': false, | ||
619 | 2719 | security_related: false | ||
620 | 2720 | }, | ||
621 | 2721 | principal_is_reporter: false, | ||
622 | 2722 | subscription: {bug_notification_level: 'Details'} | ||
623 | 2723 | }; | ||
624 | 2724 | module._lp_client.named_post.args = []; | 2708 | module._lp_client.named_post.args = []; |
625 | 2725 | // Before clicking on the link the direct subscription count | 2709 | // Before clicking on the link the direct subscription count |
626 | 2726 | // is 3. | 2710 | // is 3. |
627 | 2727 | 2711 | ||
628 | === modified file 'lib/lp/code/javascript/branch.information_type_choice.js' | |||
629 | --- lib/lp/code/javascript/branch.information_type_choice.js 2015-06-04 17:13:54 +0000 | |||
630 | +++ lib/lp/code/javascript/branch.information_type_choice.js 2017-07-21 16:50:14 +0000 | |||
631 | @@ -8,7 +8,6 @@ | |||
632 | 8 | 8 | ||
633 | 9 | var namespace = Y.namespace('lp.code.branch.information_type_choice'); | 9 | var namespace = Y.namespace('lp.code.branch.information_type_choice'); |
634 | 10 | var information_type = Y.namespace('lp.app.information_type'); | 10 | var information_type = Y.namespace('lp.app.information_type'); |
635 | 11 | var superclass = Y.Widget; | ||
636 | 12 | 11 | ||
637 | 13 | namespace.BranchInformationTypeWidget = Y.Base.create( | 12 | namespace.BranchInformationTypeWidget = Y.Base.create( |
638 | 14 | "branchInformationTypeWidget", Y.Widget, [], { | 13 | "branchInformationTypeWidget", Y.Widget, [], { |
639 | 15 | 14 | ||
640 | === modified file 'lib/lp/code/javascript/productseries-setbranch.js' | |||
641 | --- lib/lp/code/javascript/productseries-setbranch.js 2016-11-11 14:22:40 +0000 | |||
642 | +++ lib/lp/code/javascript/productseries-setbranch.js 2017-07-21 16:50:14 +0000 | |||
643 | @@ -79,7 +79,6 @@ | |||
644 | 79 | module.onclick_rcs_type = function(e) { | 79 | module.onclick_rcs_type = function(e) { |
645 | 80 | /* Which rcs type radio button has been selected? */ | 80 | /* Which rcs type radio button has been selected? */ |
646 | 81 | // CVS | 81 | // CVS |
647 | 82 | var rcs_types = module._rcs_types(); | ||
648 | 83 | var selectedRCS = module._get_selected_rcs(); | 82 | var selectedRCS = module._get_selected_rcs(); |
649 | 84 | module.set_enabled('field.cvs_module', selectedRCS === 'CVS'); | 83 | module.set_enabled('field.cvs_module', selectedRCS === 'CVS'); |
650 | 85 | }; | 84 | }; |
651 | 86 | 85 | ||
652 | === modified file 'lib/lp/code/javascript/tests/test_bugspeclinks.js' | |||
653 | --- lib/lp/code/javascript/tests/test_bugspeclinks.js 2017-04-24 14:23:36 +0000 | |||
654 | +++ lib/lp/code/javascript/tests/test_bugspeclinks.js 2017-07-21 16:50:14 +0000 | |||
655 | @@ -224,10 +224,6 @@ | |||
656 | 224 | // The link bug success function works as expected. | 224 | // The link bug success function works as expected. |
657 | 225 | test_link_bug_success: function() { | 225 | test_link_bug_success: function() { |
658 | 226 | this.widget = this._createWidget(); | 226 | this.widget = this._createWidget(); |
659 | 227 | var data = { | ||
660 | 228 | self_link: 'api/devel/bugs/1'}; | ||
661 | 229 | var new_bug_entry = new Y.lp.client.Entry( | ||
662 | 230 | this.lp_client, data, data.self_link); | ||
663 | 231 | var link_html = '<div id="buglink-3"></div>'; | 227 | var link_html = '<div id="buglink-3"></div>'; |
664 | 232 | this.widget._link_bug_success(3, link_html); | 228 | this.widget._link_bug_success(3, link_html); |
665 | 233 | Y.Assert.areEqual( | 229 | Y.Assert.areEqual( |
666 | 234 | 230 | ||
667 | === modified file 'lib/lp/registry/javascript/distroseries/differences.js' | |||
668 | --- lib/lp/registry/javascript/distroseries/differences.js 2012-09-10 18:44:11 +0000 | |||
669 | +++ lib/lp/registry/javascript/distroseries/differences.js 2017-07-21 16:50:14 +0000 | |||
670 | @@ -14,7 +14,6 @@ | |||
671 | 14 | 14 | ||
672 | 15 | var namespace = Y.namespace('lp.registry.distroseries.differences'), | 15 | var namespace = Y.namespace('lp.registry.distroseries.differences'), |
673 | 16 | testspace = Y.namespace('lp.registry.distroseries.differences.test'), | 16 | testspace = Y.namespace('lp.registry.distroseries.differences.test'), |
674 | 17 | formwidgets = Y.lp.app.formwidgets, | ||
675 | 18 | widgets = Y.lp.registry.distroseries.widgets; | 17 | widgets = Y.lp.registry.distroseries.widgets; |
676 | 19 | 18 | ||
677 | 20 | var PACKAGESET_FIELD = "field.packageset", | 19 | var PACKAGESET_FIELD = "field.packageset", |
678 | @@ -287,6 +286,6 @@ | |||
679 | 287 | 286 | ||
680 | 288 | 287 | ||
681 | 289 | }, "0.1", {"requires": [ | 288 | }, "0.1", {"requires": [ |
683 | 290 | "lp.ui.formoverlay", "lp.app.formwidgets", | 289 | "lp.ui.formoverlay", |
684 | 291 | "lp.app.picker", "lp.registry.distroseries.widgets", | 290 | "lp.app.picker", "lp.registry.distroseries.widgets", |
685 | 292 | "node", "querystring-parse"]}); | 291 | "node", "querystring-parse"]}); |
686 | 293 | 292 | ||
687 | === modified file 'lib/lp/registry/javascript/distroseries/tests/test_initseries.js' | |||
688 | --- lib/lp/registry/javascript/distroseries/tests/test_initseries.js 2014-07-21 22:45:01 +0000 | |||
689 | +++ lib/lp/registry/javascript/distroseries/tests/test_initseries.js 2017-07-21 16:50:14 +0000 | |||
690 | @@ -18,7 +18,6 @@ | |||
691 | 18 | 18 | ||
692 | 19 | var suite = new Y.Test.Suite("distroseries.initseries Tests"); | 19 | var suite = new Y.Test.Suite("distroseries.initseries Tests"); |
693 | 20 | var initseries = Y.lp.registry.distroseries.initseries; | 20 | var initseries = Y.lp.registry.distroseries.initseries; |
694 | 21 | var widgets = Y.lp.registry.distroseries.widgets; | ||
695 | 22 | 21 | ||
696 | 23 | var testDeriveDistroSeriesActionsWidget = { | 22 | var testDeriveDistroSeriesActionsWidget = { |
697 | 24 | name: 'TestDeriveDistroSeriesActionsWidget', | 23 | name: 'TestDeriveDistroSeriesActionsWidget', |
698 | 25 | 24 | ||
699 | === modified file 'lib/lp/registry/javascript/product_views.js' | |||
700 | --- lib/lp/registry/javascript/product_views.js 2015-10-01 17:32:41 +0000 | |||
701 | +++ lib/lp/registry/javascript/product_views.js 2017-07-21 16:50:14 +0000 | |||
702 | @@ -168,7 +168,6 @@ | |||
703 | 168 | // Additional spice for the insanity stew is given by the | 168 | // Additional spice for the insanity stew is given by the |
704 | 169 | // rhino book, page 428. This code is basically a rip and | 169 | // rhino book, page 428. This code is basically a rip and |
705 | 170 | // remix of those two texts. | 170 | // remix of those two texts. |
706 | 171 | var event = e || window.event; | ||
707 | 172 | var code = e.charCode || e.keyCode; | 171 | var code = e.charCode || e.keyCode; |
708 | 173 | 172 | ||
709 | 174 | if (/* Check for special characters. */ | 173 | if (/* Check for special characters. */ |
710 | 175 | 174 | ||
711 | === modified file 'lib/lp/registry/javascript/sharing/granteetable.js' | |||
712 | --- lib/lp/registry/javascript/sharing/granteetable.js 2013-04-19 02:35:16 +0000 | |||
713 | +++ lib/lp/registry/javascript/sharing/granteetable.js 2017-07-21 16:50:14 +0000 | |||
714 | @@ -408,7 +408,6 @@ | |||
715 | 408 | return false; | 408 | return false; |
716 | 409 | } | 409 | } |
717 | 410 | Y.some(right, function(sharing_value, info_type) { | 410 | Y.some(right, function(sharing_value, info_type) { |
718 | 411 | var _value = left[info_type]; | ||
719 | 412 | if (!Y.Lang.isValue(left[info_type])) { | 411 | if (!Y.Lang.isValue(left[info_type])) { |
720 | 413 | result = false; | 412 | result = false; |
721 | 414 | return true; | 413 | return true; |
722 | 415 | 414 | ||
723 | === modified file 'lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js' | |||
724 | --- lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js 2015-10-22 00:13:43 +0000 | |||
725 | +++ lib/lp/registry/javascript/sharing/tests/test_pillarsharingview.js 2017-07-21 16:50:14 +0000 | |||
726 | @@ -252,7 +252,6 @@ | |||
727 | 252 | this.view = this._create_Widget(); | 252 | this.view = this._create_Widget(); |
728 | 253 | this.view.render(); | 253 | this.view.render(); |
729 | 254 | var remove_grantee_success_called = false; | 254 | var remove_grantee_success_called = false; |
730 | 255 | var self = this; | ||
731 | 256 | this.view.remove_grantee_success = function(person_uri) { | 255 | this.view.remove_grantee_success = function(person_uri) { |
732 | 257 | Y.Assert.areEqual('~fred', person_uri); | 256 | Y.Assert.areEqual('~fred', person_uri); |
733 | 258 | remove_grantee_success_called = true; | 257 | remove_grantee_success_called = true; |
734 | 259 | 258 | ||
735 | === modified file 'lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js' | |||
736 | --- lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js 2015-10-22 00:13:43 +0000 | |||
737 | +++ lib/lp/registry/javascript/sharing/tests/test_sharingdetailsview.js 2017-07-21 16:50:14 +0000 | |||
738 | @@ -239,7 +239,6 @@ | |||
739 | 239 | }); | 239 | }); |
740 | 240 | this.view.render(); | 240 | this.view.render(); |
741 | 241 | var remove_grant_success_called = false; | 241 | var remove_grant_success_called = false; |
742 | 242 | var self = this; | ||
743 | 243 | this.view.remove_grant_success = function(artifact_uri) { | 242 | this.view.remove_grant_success = function(artifact_uri) { |
744 | 244 | Y.Assert.areEqual('api/devel/bugs/2', artifact_uri); | 243 | Y.Assert.areEqual('api/devel/bugs/2', artifact_uri); |
745 | 245 | remove_grant_success_called = true; | 244 | remove_grant_success_called = true; |
746 | @@ -277,7 +276,6 @@ | |||
747 | 277 | }); | 276 | }); |
748 | 278 | this.view.render(); | 277 | this.view.render(); |
749 | 279 | var remove_grant_success_called = false; | 278 | var remove_grant_success_called = false; |
750 | 280 | var self = this; | ||
751 | 281 | this.view.remove_grant_success = function(artifact_uri) { | 279 | this.view.remove_grant_success = function(artifact_uri) { |
752 | 282 | Y.Assert.areEqual( | 280 | Y.Assert.areEqual( |
753 | 283 | 'api/devel/~someone/+junk/somebranch', artifact_uri); | 281 | 'api/devel/~someone/+junk/somebranch', artifact_uri); |
754 | @@ -316,7 +314,6 @@ | |||
755 | 316 | }); | 314 | }); |
756 | 317 | this.view.render(); | 315 | this.view.render(); |
757 | 318 | var remove_grant_success_called = false; | 316 | var remove_grant_success_called = false; |
758 | 319 | var self = this; | ||
759 | 320 | this.view.remove_grant_success = function(artifact_uri) { | 317 | this.view.remove_grant_success = function(artifact_uri) { |
760 | 321 | Y.Assert.areEqual( | 318 | Y.Assert.areEqual( |
761 | 322 | 'api/devel/~someone/+git/somerepo', artifact_uri); | 319 | 'api/devel/~someone/+git/somerepo', artifact_uri); |
762 | 323 | 320 | ||
763 | === modified file 'lib/lp/registry/javascript/structural-subscription.js' | |||
764 | --- lib/lp/registry/javascript/structural-subscription.js 2012-12-13 17:16:39 +0000 | |||
765 | +++ lib/lp/registry/javascript/structural-subscription.js 2017-07-21 16:50:14 +0000 | |||
766 | @@ -311,7 +311,6 @@ | |||
767 | 311 | function edit_subscription_handler(context, form_data) { | 311 | function edit_subscription_handler(context, form_data) { |
768 | 312 | var has_errors = check_for_errors_in_overlay( | 312 | var has_errors = check_for_errors_in_overlay( |
769 | 313 | namespace._add_subscription_overlay); | 313 | namespace._add_subscription_overlay); |
770 | 314 | var filter_id = '#filter-description-'+context.filter_id.toString(); | ||
771 | 315 | var filter_node = Y.one( | 314 | var filter_node = Y.one( |
772 | 316 | '#subscription-filter-'+context.filter_id.toString()); | 315 | '#subscription-filter-'+context.filter_id.toString()); |
773 | 317 | var submit_button = namespace._add_subscription_overlay.bodyNode.one( | 316 | var submit_button = namespace._add_subscription_overlay.bodyNode.one( |
774 | @@ -321,7 +320,6 @@ | |||
775 | 321 | } | 320 | } |
776 | 322 | var on = {success: function (new_data) { | 321 | var on = {success: function (new_data) { |
777 | 323 | submit_button.replaceClass('spinner', 'lazr-pos'); | 322 | submit_button.replaceClass('spinner', 'lazr-pos'); |
778 | 324 | var description_node = Y.one(filter_id); | ||
779 | 325 | var filter = new_data.getAttrs(); | 323 | var filter = new_data.getAttrs(); |
780 | 326 | fill_filter_description( | 324 | fill_filter_description( |
781 | 327 | filter_node, context.filter_info, filter); | 325 | filter_node, context.filter_info, filter); |
782 | @@ -1336,7 +1334,6 @@ | |||
783 | 1336 | * Attach activation (click) handlers to all of the edit links on the page. | 1334 | * Attach activation (click) handlers to all of the edit links on the page. |
784 | 1337 | */ | 1335 | */ |
785 | 1338 | function wire_up_edit_links(config) { | 1336 | function wire_up_edit_links(config) { |
786 | 1339 | var listing = Y.one(config.content_box); | ||
787 | 1340 | var subscription_info = LP.cache.subscription_info; | 1337 | var subscription_info = LP.cache.subscription_info; |
788 | 1341 | var filter_id = 0; | 1338 | var filter_id = 0; |
789 | 1342 | var i; | 1339 | var i; |
790 | 1343 | 1340 | ||
791 | === modified file 'lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js' | |||
792 | --- lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2013-04-09 05:05:39 +0000 | |||
793 | +++ lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2017-07-21 16:50:14 +0000 | |||
794 | @@ -657,7 +657,6 @@ | |||
795 | 657 | }, | 657 | }, |
796 | 658 | 658 | ||
797 | 659 | test_clean: function() { | 659 | test_clean: function() { |
798 | 660 | var that = this; | ||
799 | 661 | var comment_text = 'Content'; | 660 | var comment_text = 'Content'; |
800 | 662 | this.widget.get('srcNode').one('textarea').set('value', comment_text); | 661 | this.widget.get('srcNode').one('textarea').set('value', comment_text); |
801 | 663 | var comment_entry = new Comment(); | 662 | var comment_entry = new Comment(); |
802 | @@ -779,10 +778,8 @@ | |||
803 | 779 | 778 | ||
804 | 780 | test_add_comment_handler_empty: function() { | 779 | test_add_comment_handler_empty: function() { |
805 | 781 | // An empty comment is treated as a mistake. | 780 | // An empty comment is treated as a mistake. |
806 | 782 | var that = this; | ||
807 | 783 | var comment_text = ''; | 781 | var comment_text = ''; |
808 | 784 | this.widget.get('srcNode').one('textarea').set('value', comment_text); | 782 | this.widget.get('srcNode').one('textarea').set('value', comment_text); |
809 | 785 | var comment_entry = new Comment(); | ||
810 | 786 | var post_called = false; | 783 | var post_called = false; |
811 | 787 | module.lp_client.named_post = function(url, method, config) { | 784 | module.lp_client.named_post = function(url, method, config) { |
812 | 788 | post_called = true; | 785 | post_called = true; |
813 | @@ -840,9 +837,7 @@ | |||
814 | 840 | .addClass('FAILED'); | 837 | .addClass('FAILED'); |
815 | 841 | module.setup_packages_diff_states( | 838 | module.setup_packages_diff_states( |
816 | 842 | placeholder.one('.diff-extra-container'), dsd_uri); | 839 | placeholder.one('.diff-extra-container'), dsd_uri); |
817 | 843 | var func_req; | ||
818 | 844 | module.lp_client.named_post = function(url, func, config) { | 840 | module.lp_client.named_post = function(url, func, config) { |
819 | 845 | func_req = func; | ||
820 | 846 | config.on.success(); | 841 | config.on.success(); |
821 | 847 | }; | 842 | }; |
822 | 848 | var wrong_button = placeholder.one('.package-diff-placeholder'); | 843 | var wrong_button = placeholder.one('.package-diff-placeholder'); |
823 | 849 | 844 | ||
824 | === modified file 'lib/lp/registry/javascript/tests/test_milestone_creation.js' | |||
825 | --- lib/lp/registry/javascript/tests/test_milestone_creation.js 2013-04-08 08:06:09 +0000 | |||
826 | +++ lib/lp/registry/javascript/tests/test_milestone_creation.js 2017-07-21 16:50:14 +0000 | |||
827 | @@ -44,7 +44,6 @@ | |||
828 | 44 | test_configure: function() { | 44 | test_configure: function() { |
829 | 45 | // Ensure configuring the module works as it will be needed in | 45 | // Ensure configuring the module works as it will be needed in |
830 | 46 | // subsequent tests. | 46 | // subsequent tests. |
831 | 47 | var client = new Y.lp.client.Launchpad({sync: true}); | ||
832 | 48 | var config = { | 47 | var config = { |
833 | 49 | milestone_form_uri: 'a', | 48 | milestone_form_uri: 'a', |
834 | 50 | series_uri: 'b', | 49 | series_uri: 'b', |
835 | @@ -68,7 +67,6 @@ | |||
836 | 68 | var data = serverfixture.setup(this, 'setup'); | 67 | var data = serverfixture.setup(this, 'setup'); |
837 | 69 | 68 | ||
838 | 70 | // Initialize the milestoneoverlay module. | 69 | // Initialize the milestoneoverlay module. |
839 | 71 | var milestone_table = Y.lp.registry.milestonetable; | ||
840 | 72 | var client = new Y.lp.client.Launchpad({sync: true}); | 70 | var client = new Y.lp.client.Launchpad({sync: true}); |
841 | 73 | var config = { | 71 | var config = { |
842 | 74 | milestone_form_uri: data.milestone_form_uri, | 72 | milestone_form_uri: data.milestone_form_uri, |
843 | @@ -119,7 +117,6 @@ | |||
844 | 119 | var data = serverfixture.setup(this, 'setup'); | 117 | var data = serverfixture.setup(this, 'setup'); |
845 | 120 | 118 | ||
846 | 121 | // Initialize the milestoneoverlay module. | 119 | // Initialize the milestoneoverlay module. |
847 | 122 | var milestone_table = Y.lp.registry.milestonetable; | ||
848 | 123 | var client = new Y.lp.client.Launchpad({sync: true}); | 120 | var client = new Y.lp.client.Launchpad({sync: true}); |
849 | 124 | var config = { | 121 | var config = { |
850 | 125 | milestone_form_uri: data.milestone_form_uri, | 122 | milestone_form_uri: data.milestone_form_uri, |
851 | @@ -170,6 +167,6 @@ | |||
852 | 170 | }, '0.1', { | 167 | }, '0.1', { |
853 | 171 | requires: [ | 168 | requires: [ |
854 | 172 | 'test', 'lp.client', 'lp.testing.serverfixture', | 169 | 'test', 'lp.client', 'lp.testing.serverfixture', |
856 | 173 | 'lp.registry.milestonetable', 'lp.registry.milestoneoverlay'] | 170 | 'lp.registry.milestoneoverlay'] |
857 | 174 | }); | 171 | }); |
858 | 175 | 172 | ||
859 | 176 | 173 | ||
860 | === modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.js' | |||
861 | --- lib/lp/registry/javascript/tests/test_structural_subscription.js 2013-03-20 03:41:40 +0000 | |||
862 | +++ lib/lp/registry/javascript/tests/test_structural_subscription.js 2017-07-21 16:50:14 +0000 | |||
863 | @@ -17,23 +17,6 @@ | |||
864 | 17 | var content_box_name = 'ss-content-box'; | 17 | var content_box_name = 'ss-content-box'; |
865 | 18 | var content_box_id = '#' + content_box_name; | 18 | var content_box_id = '#' + content_box_name; |
866 | 19 | 19 | ||
867 | 20 | var target_link_class = '.menu-link-subscribe_to_bug_mail'; | ||
868 | 21 | |||
869 | 22 | function array_compare(a,b) { | ||
870 | 23 | if (a.length !== b.length) { | ||
871 | 24 | return false; | ||
872 | 25 | } | ||
873 | 26 | a.sort(); | ||
874 | 27 | b.sort(); | ||
875 | 28 | var i; | ||
876 | 29 | for (i=0; i<a.length; i++) { | ||
877 | 30 | if (a[i] !== b[i]) { | ||
878 | 31 | return false; | ||
879 | 32 | } | ||
880 | 33 | } | ||
881 | 34 | return true; | ||
882 | 35 | } | ||
883 | 36 | |||
884 | 37 | function create_test_node() { | 20 | function create_test_node() { |
885 | 38 | var test_node = Y.Node.create('<div id="test-content">') | 21 | var test_node = Y.Node.create('<div id="test-content">') |
886 | 39 | .append(Y.Node.create('<div></div>') | 22 | .append(Y.Node.create('<div></div>') |
887 | @@ -386,7 +369,6 @@ | |||
888 | 386 | // Long titles are cut down. | 369 | // Long titles are cut down. |
889 | 387 | module.setup(this.configuration); | 370 | module.setup(this.configuration); |
890 | 388 | module._show_add_overlay(this.configuration); | 371 | module._show_add_overlay(this.configuration); |
891 | 389 | overlay = Y.one('#accordion-overlay'); | ||
892 | 390 | // This is the title we would expect if there were no shortening. | 372 | // This is the title we would expect if there were no shortening. |
893 | 391 | var header = Y.one(content_box_id).one('h2').get('text'); | 373 | var header = Y.one(content_box_id).one('h2').get('text'); |
894 | 392 | // The actual title is a prefix of the unabridged title. | 374 | // The actual title is a prefix of the unabridged title. |
895 | 393 | 375 | ||
896 | === modified file 'lib/lp/registry/javascript/tests/test_team_mailinglists.js' | |||
897 | --- lib/lp/registry/javascript/tests/test_team_mailinglists.js 2013-03-20 03:41:40 +0000 | |||
898 | +++ lib/lp/registry/javascript/tests/test_team_mailinglists.js 2017-07-21 16:50:14 +0000 | |||
899 | @@ -2,10 +2,8 @@ | |||
900 | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). */ | 2 | * GNU Affero General Public License version 3 (see the file LICENSE). */ |
901 | 3 | 3 | ||
902 | 4 | YUI.add('lp.registry.team.mailinglists.test', function (Y) { | 4 | YUI.add('lp.registry.team.mailinglists.test', function (Y) { |
907 | 5 | // Local aliases. | 5 | // Local alias. |
908 | 6 | var Assert = Y.Assert, | 6 | var Assert = Y.Assert; |
905 | 7 | ArrayAssert = Y.ArrayAssert; | ||
906 | 8 | var team_mailinglists = Y.lp.registry.team.mailinglists; | ||
909 | 9 | 7 | ||
910 | 10 | var tests = Y.namespace('lp.registry.team.mailinglists.test'); | 8 | var tests = Y.namespace('lp.registry.team.mailinglists.test'); |
911 | 11 | tests.suite = new Y.Test.Suite('lp.registry.team.mailinglists Tests'); | 9 | tests.suite = new Y.Test.Suite('lp.registry.team.mailinglists Tests'); |
912 | 12 | 10 | ||
913 | === modified file 'lib/lp/registry/javascript/timeline.js' | |||
914 | --- lib/lp/registry/javascript/timeline.js 2012-05-12 02:36:41 +0000 | |||
915 | +++ lib/lp/registry/javascript/timeline.js 2017-07-21 16:50:14 +0000 | |||
916 | @@ -576,7 +576,6 @@ | |||
917 | 576 | var series_line = this.project_line.series_lines[0]; | 576 | var series_line = this.project_line.series_lines[0]; |
918 | 577 | var landmark = series_line.series.landmarks[0]; | 577 | var landmark = series_line.series.landmarks[0]; |
919 | 578 | if (landmark) { | 578 | if (landmark) { |
920 | 579 | var landmark_label = series_line.labels[landmark.name]; | ||
921 | 580 | var date_label_width = 0; | 579 | var date_label_width = 0; |
922 | 581 | if (series_line.series_date_label !== null) { | 580 | if (series_line.series_date_label !== null) { |
923 | 582 | date_label_width = | 581 | date_label_width = |
924 | @@ -648,7 +647,6 @@ | |||
925 | 648 | // Resizing the canvas requires destroying the old canvas and | 647 | // Resizing the canvas requires destroying the old canvas and |
926 | 649 | // creating a new one due to rendering issues in WebKit. | 648 | // creating a new one due to rendering issues in WebKit. |
927 | 650 | this.calculate_landmark_spacing(); | 649 | this.calculate_landmark_spacing(); |
928 | 651 | var contentBox = this.get('contentBox'); | ||
929 | 652 | this.recreate_canvas(); | 650 | this.recreate_canvas(); |
930 | 653 | var dom_canvas = Y.Node.getDOMNode(this.canvas); | 651 | var dom_canvas = Y.Node.getDOMNode(this.canvas); |
931 | 654 | this.canvas_context = dom_canvas.getContext('2d'); | 652 | this.canvas_context = dom_canvas.getContext('2d'); |
932 | 655 | 653 | ||
933 | === modified file 'lib/lp/soyuz/javascript/tests/test_archive-packages.html' | |||
934 | --- lib/lp/soyuz/javascript/tests/test_archive-packages.html 2012-10-26 09:54:28 +0000 | |||
935 | +++ lib/lp/soyuz/javascript/tests/test_archive-packages.html 2017-07-21 16:50:14 +0000 | |||
936 | @@ -59,7 +59,7 @@ | |||
937 | 59 | <a class="remove-notification">Remove notification</a> | 59 | <a class="remove-notification">Remove notification</a> |
938 | 60 | </div> | 60 | </div> |
939 | 61 | </script> | 61 | </script> |
941 | 62 | <script type="text/x-template" id="pending-job-template-no-link"> | 62 | <script type="text/x-template"> |
942 | 63 | <div class="pending-job" job_id="3"> | 63 | <div class="pending-job" job_id="3"> |
943 | 64 | </div> | 64 | </div> |
944 | 65 | </script> | 65 | </script> |
945 | 66 | 66 | ||
946 | === modified file 'lib/lp/soyuz/javascript/tests/test_archive-packages.js' | |||
947 | --- lib/lp/soyuz/javascript/tests/test_archive-packages.js 2012-01-06 10:15:37 +0000 | |||
948 | +++ lib/lp/soyuz/javascript/tests/test_archive-packages.js 2017-07-21 16:50:14 +0000 | |||
949 | @@ -16,8 +16,6 @@ | |||
950 | 16 | var module = Y.lp.soyuz.archive_packages; | 16 | var module = Y.lp.soyuz.archive_packages; |
951 | 17 | 17 | ||
952 | 18 | var pending_job = Y.one('#pending-job-template').getContent(); | 18 | var pending_job = Y.one('#pending-job-template').getContent(); |
953 | 19 | var pending_job_no_link = Y.one( | ||
954 | 20 | '#pending-job-template-no-link').getContent(); | ||
955 | 21 | 19 | ||
956 | 22 | var TestPendingCopyJobWidgetNoLink = { | 20 | var TestPendingCopyJobWidgetNoLink = { |
957 | 23 | name: "TestPendingCopyJobWidgetNoLink", | 21 | name: "TestPendingCopyJobWidgetNoLink", |
958 | @@ -28,8 +26,8 @@ | |||
959 | 28 | .append(Y.Node.create(pending_job)); | 26 | .append(Y.Node.create(pending_job)); |
960 | 29 | }, | 27 | }, |
961 | 30 | 28 | ||
964 | 31 | test_instanciation: function() { | 29 | test_instantiation: function() { |
965 | 32 | // The widget is instanciated even without a link to delete the | 30 | // The widget is instantiated even without a link to delete the |
966 | 33 | // widget's html. | 31 | // widget's html. |
967 | 34 | var area = Y.one('.pending-job-no-link'); | 32 | var area = Y.one('.pending-job-no-link'); |
968 | 35 | this.widget = new module.PendingCopyJobWidget( | 33 | this.widget = new module.PendingCopyJobWidget( |
969 | 36 | 34 | ||
970 | === modified file 'lib/lp/translations/javascript/sourcepackage_sharing_details.js' | |||
971 | --- lib/lp/translations/javascript/sourcepackage_sharing_details.js 2012-09-10 18:44:11 +0000 | |||
972 | +++ lib/lp/translations/javascript/sourcepackage_sharing_details.js 2017-07-21 16:50:14 +0000 | |||
973 | @@ -217,7 +217,6 @@ | |||
974 | 217 | 217 | ||
975 | 218 | 218 | ||
976 | 219 | function IOHandler(controller, check, error_handler) { | 219 | function IOHandler(controller, check, error_handler) { |
977 | 220 | that = this; | ||
978 | 221 | this.check = check; | 220 | this.check = check; |
979 | 222 | this.controller = controller; | 221 | this.controller = controller; |
980 | 223 | if (!Y.Lang.isValue(error_handler)){ | 222 | if (!Y.Lang.isValue(error_handler)){ |
981 | @@ -420,7 +419,6 @@ | |||
982 | 420 | select_productseries: function(productseries_summary) { | 419 | select_productseries: function(productseries_summary) { |
983 | 421 | var that = this; | 420 | var that = this; |
984 | 422 | var productseries_check = that.get('tsconfig').get('product_series'); | 421 | var productseries_check = that.get('tsconfig').get('product_series'); |
985 | 423 | var lp_client = new Y.lp.client.Launchpad(); | ||
986 | 424 | function save_productseries(config) { | 422 | function save_productseries(config) { |
987 | 425 | productseries_check.set('pending', true); | 423 | productseries_check.set('pending', true); |
988 | 426 | that.update_check(productseries_check); | 424 | that.update_check(productseries_check); |
989 | @@ -435,7 +433,6 @@ | |||
990 | 435 | remove_productseries: function(productseries_summary) { | 433 | remove_productseries: function(productseries_summary) { |
991 | 436 | var that = this; | 434 | var that = this; |
992 | 437 | var productseries_check = that.get('tsconfig').get('product_series'); | 435 | var productseries_check = that.get('tsconfig').get('product_series'); |
993 | 438 | var lp_client = new Y.lp.client.Launchpad(); | ||
994 | 439 | function delete_packaging(config) { | 436 | function delete_packaging(config) { |
995 | 440 | productseries_check.set('pending', true); | 437 | productseries_check.set('pending', true); |
996 | 441 | var source_package = that.get('source_package'); | 438 | var source_package = that.get('source_package'); |
997 | @@ -452,7 +449,6 @@ | |||
998 | 452 | }, | 449 | }, |
999 | 453 | select_branch: function(branch_summary) { | 450 | select_branch: function(branch_summary) { |
1000 | 454 | var that = this; | 451 | var that = this; |
1001 | 455 | var lp_client = new Y.lp.client.Launchpad(); | ||
1002 | 456 | var branch_check = that.get('tsconfig').get('branch'); | 452 | var branch_check = that.get('tsconfig').get('branch'); |
1003 | 457 | var productseries = that.get('productseries'); | 453 | var productseries = that.get('productseries'); |
1004 | 458 | 454 |