Merge lp:~rharding/launchpad/yui35_test_fix2 into lp:launchpad
- yui35_test_fix2
- Merge into devel
Proposed by
Richard Harding
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 15808 | ||||
Proposed branch: | lp:~rharding/launchpad/yui35_test_fix2 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
375 lines (+63/-64) 10 files modified
lib/lp/app/javascript/choiceedit/choiceedit.js (+2/-2) lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js (+3/-6) lib/lp/app/javascript/testing/assert.js (+2/-1) lib/lp/app/javascript/testing/helpers.js (+3/-3) lib/lp/bugs/javascript/bug_picker.js (+5/-6) lib/lp/bugs/javascript/tests/test_bug_picker.js (+6/-5) lib/lp/bugs/javascript/tests/test_duplicates.js (+20/-19) lib/lp/registry/javascript/sharing/granteepicker.js (+3/-3) lib/lp/registry/javascript/sharing/granteetable.js (+3/-3) lib/lp/registry/javascript/sharing/tests/test_granteetable.js (+16/-16) |
||||
To merge this branch: | bzr merge lp:~rharding/launchpad/yui35_test_fix2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Deryck Hodge (community) | Approve | ||
Curtis Hovey (community) | code | Approve | |
Review via email: mp+119603@code.launchpad.net |
Commit message
Update JS and tests to pass under YUI 3.5.1.
Description of the change
This branch corrects tests and js code so that they all pas under YUI 3.5.1. This brings things back into alignment with the work previously done to update the JS code to prepare for testing YUI 3.5.1 behind the feature flag.
Since tests currently only run under 3.3.0, it's easy for them to get out of sync with the changes required for 3.5.1.
To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote : | # |
Just make sure to drop the asset.js head link and this is good to go. Thanks for dropping the StartsWith asserts from the earlier version of this! Looks good otherwise.
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/choiceedit/choiceedit.js' | |||
2 | --- lib/lp/app/javascript/choiceedit/choiceedit.js 2012-08-08 16:42:21 +0000 | |||
3 | +++ lib/lp/app/javascript/choiceedit/choiceedit.js 2012-08-14 18:46:45 +0000 | |||
4 | @@ -174,7 +174,7 @@ | |||
5 | 174 | if (!this.get('clickable_content')) { | 174 | if (!this.get('clickable_content')) { |
6 | 175 | var content = this.get('contentBox'); | 175 | var content = this.get('contentBox'); |
7 | 176 | content.addClass('no-click'); | 176 | content.addClass('no-click'); |
9 | 177 | }; | 177 | } |
10 | 178 | }, | 178 | }, |
11 | 179 | 179 | ||
12 | 180 | /** | 180 | /** |
13 | @@ -652,7 +652,7 @@ | |||
14 | 652 | } | 652 | } |
15 | 653 | }, | 653 | }, |
16 | 654 | /** | 654 | /** |
18 | 655 | * The specialised version of the items attirbute is cloned and the name | 655 | * The specialised version of the items attribute is cloned and the name |
19 | 656 | * of the null value is modified to add a remove icon next to it. If the | 656 | * of the null value is modified to add a remove icon next to it. If the |
20 | 657 | * currently selected value is null, the null item is not displayed. | 657 | * currently selected value is null, the null item is not displayed. |
21 | 658 | * | 658 | * |
22 | 659 | 659 | ||
23 | === modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js' | |||
24 | --- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2012-08-08 16:55:17 +0000 | |||
25 | +++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2012-08-14 18:46:45 +0000 | |||
26 | @@ -486,10 +486,9 @@ | |||
27 | 486 | this.null_choice_edit.get('actionicon'), | 486 | this.null_choice_edit.get('actionicon'), |
28 | 487 | this.null_choice_edit.get('addicon'), | 487 | this.null_choice_edit.get('addicon'), |
29 | 488 | 'Action icon is not the add icon like expected.'); | 488 | 'Action icon is not the add icon like expected.'); |
30 | 489 | |||
31 | 490 | Assert.areEqual( | 489 | Assert.areEqual( |
32 | 490 | 'inline', | ||
33 | 491 | this.null_choice_edit.get('addicon').getStyle('display'), | 491 | this.null_choice_edit.get('addicon').getStyle('display'), |
34 | 492 | 'inline', | ||
35 | 493 | 'Add icon is not visible when it should be'); | 492 | 'Add icon is not visible when it should be'); |
36 | 494 | Assert.areEqual( | 493 | Assert.areEqual( |
37 | 495 | this.null_choice_edit.get('editicon').getStyle('display'), | 494 | this.null_choice_edit.get('editicon').getStyle('display'), |
38 | @@ -499,7 +498,7 @@ | |||
39 | 499 | simulate(this.null_choice_edit.get('boundingBox'), | 498 | simulate(this.null_choice_edit.get('boundingBox'), |
40 | 500 | '.value', 'click'); | 499 | '.value', 'click'); |
41 | 501 | simulate(this.null_choice_edit._choice_list.get('boundingBox'), | 500 | simulate(this.null_choice_edit._choice_list.get('boundingBox'), |
43 | 502 | 'li a[href$=groucho]', 'click'); | 501 | 'li a[href$="groucho"]', 'click'); |
44 | 503 | this.null_choice_edit._uiClearWaiting(); | 502 | this.null_choice_edit._uiClearWaiting(); |
45 | 504 | 503 | ||
46 | 505 | Assert.areEqual( | 504 | Assert.areEqual( |
47 | @@ -511,8 +510,8 @@ | |||
48 | 511 | 'none', | 510 | 'none', |
49 | 512 | "Add icon is visible when it shouldn't be"); | 511 | "Add icon is visible when it shouldn't be"); |
50 | 513 | Assert.areEqual( | 512 | Assert.areEqual( |
51 | 513 | 'inline', | ||
52 | 514 | this.null_choice_edit.get('editicon').getStyle('display'), | 514 | this.null_choice_edit.get('editicon').getStyle('display'), |
53 | 515 | 'inline', | ||
54 | 516 | "Edit icon is not visible when it shouldn be"); | 515 | "Edit icon is not visible when it shouldn be"); |
55 | 517 | }, | 516 | }, |
56 | 518 | 517 | ||
57 | @@ -553,8 +552,6 @@ | |||
58 | 553 | } | 552 | } |
59 | 554 | })); | 553 | })); |
60 | 555 | 554 | ||
61 | 556 | |||
62 | 557 | |||
63 | 558 | }, '0.1', { | 555 | }, '0.1', { |
64 | 559 | 'requires': ['test', 'console', 'lp.choiceedit', 'node', 'event', | 556 | 'requires': ['test', 'console', 'lp.choiceedit', 'node', 'event', |
65 | 560 | 'event-simulate', 'widget-stack', 'lp.app.choice'] | 557 | 'event-simulate', 'widget-stack', 'lp.app.choice'] |
66 | 561 | 558 | ||
67 | === modified file 'lib/lp/app/javascript/testing/assert.js' | |||
68 | --- lib/lp/app/javascript/testing/assert.js 2011-10-18 15:36:34 +0000 | |||
69 | +++ lib/lp/app/javascript/testing/assert.js 2012-08-14 18:46:45 +0000 | |||
70 | @@ -14,4 +14,5 @@ | |||
71 | 14 | namespace.assert_equal_structure = function(expected, actual){ | 14 | namespace.assert_equal_structure = function(expected, actual){ |
72 | 15 | Y.Assert.areEqual(JSON.stringify(expected), JSON.stringify(actual)); | 15 | Y.Assert.areEqual(JSON.stringify(expected), JSON.stringify(actual)); |
73 | 16 | }; | 16 | }; |
75 | 17 | }, '0.1', {'requires': []}); | 17 | |
76 | 18 | }, '0.1', {'requires': ['testing']}); | ||
77 | 18 | 19 | ||
78 | === modified file 'lib/lp/app/javascript/testing/helpers.js' | |||
79 | --- lib/lp/app/javascript/testing/helpers.js 2012-08-01 14:09:19 +0000 | |||
80 | +++ lib/lp/app/javascript/testing/helpers.js 2012-08-14 18:46:45 +0000 | |||
81 | @@ -32,7 +32,7 @@ | |||
82 | 32 | * | 32 | * |
83 | 33 | * EXAMPLE: | 33 | * EXAMPLE: |
84 | 34 | * var client = new ns.LPCLient(); | 34 | * var client = new ns.LPCLient(); |
86 | 35 | * | 35 | * |
87 | 36 | * client.get.args = []; | 36 | * client.get.args = []; |
88 | 37 | * client.get(function_arg1, function_arg2); | 37 | * client.get(function_arg1, function_arg2); |
89 | 38 | */ | 38 | */ |
90 | @@ -57,10 +57,10 @@ | |||
91 | 57 | } | 57 | } |
92 | 58 | /** | 58 | /** |
93 | 59 | * Captures call data and simulates callbacks. | 59 | * Captures call data and simulates callbacks. |
95 | 60 | * | 60 | * |
96 | 61 | * The function called and the arguments it's called with are added to the | 61 | * The function called and the arguments it's called with are added to the |
97 | 62 | * LPCLient's `received` attribute. | 62 | * LPCLient's `received` attribute. |
99 | 63 | * | 63 | * |
100 | 64 | * Callback behavior are governed by the args set on the callee. | 64 | * Callback behavior are governed by the args set on the callee. |
101 | 65 | * @method | 65 | * @method |
102 | 66 | */ | 66 | */ |
103 | 67 | 67 | ||
104 | === modified file 'lib/lp/bugs/javascript/bug_picker.js' | |||
105 | --- lib/lp/bugs/javascript/bug_picker.js 2012-08-10 04:48:36 +0000 | |||
106 | +++ lib/lp/bugs/javascript/bug_picker.js 2012-08-14 18:46:45 +0000 | |||
107 | @@ -203,15 +203,14 @@ | |||
108 | 203 | }, | 203 | }, |
109 | 204 | 204 | ||
110 | 205 | _private_warning_template: function(message) { | 205 | _private_warning_template: function(message) { |
112 | 206 | var template = [ | 206 | return [ |
113 | 207 | '{{#private_warning}}', | 207 | '{{#private_warning}}', |
114 | 208 | '<tr><td><p id="privacy-warning" ', | 208 | '<tr><td><p id="privacy-warning" ', |
115 | 209 | 'class="block-sprite large-warning">', | 209 | 'class="block-sprite large-warning">', |
117 | 210 | '{message}', | 210 | message, |
118 | 211 | '</p></td></tr>', | 211 | '</p></td></tr>', |
119 | 212 | '{{/private_warning}}' | 212 | '{{/private_warning}}' |
120 | 213 | ].join(' '); | 213 | ].join(' '); |
121 | 214 | return Y.Lang.substitute(template, {message: message}); | ||
122 | 215 | }, | 214 | }, |
123 | 216 | 215 | ||
124 | 217 | // Template for the bug confirmation form. | 216 | // Template for the bug confirmation form. |
125 | @@ -237,12 +236,12 @@ | |||
126 | 237 | var private_warning_message | 236 | var private_warning_message |
127 | 238 | = this.get('private_warning_message'); | 237 | = this.get('private_warning_message'); |
128 | 239 | var html = Y.lp.mustache.to_html( | 238 | var html = Y.lp.mustache.to_html( |
131 | 240 | this._bug_confirmation_form_template(), bug_data, | 239 | this._bug_confirmation_form_template(), |
132 | 241 | { | 240 | bug_data, { |
133 | 242 | bug_details: this._bug_details_template(), | 241 | bug_details: this._bug_details_template(), |
134 | 243 | private_warning: | 242 | private_warning: |
135 | 244 | this._private_warning_template(private_warning_message) | 243 | this._private_warning_template(private_warning_message) |
137 | 245 | }); | 244 | }); |
138 | 246 | var bug_details_node = Y.Node.create(html); | 245 | var bug_details_node = Y.Node.create(html); |
139 | 247 | var bug_link = bug_details_node.one('.bugtitle'); | 246 | var bug_link = bug_details_node.one('.bugtitle'); |
140 | 248 | bug_link.on('click', function(e) { | 247 | bug_link.on('click', function(e) { |
141 | 249 | 248 | ||
142 | === modified file 'lib/lp/bugs/javascript/tests/test_bug_picker.js' | |||
143 | --- lib/lp/bugs/javascript/tests/test_bug_picker.js 2012-08-08 11:59:48 +0000 | |||
144 | +++ lib/lp/bugs/javascript/tests/test_bug_picker.js 2012-08-14 18:46:45 +0000 | |||
145 | @@ -32,6 +32,12 @@ | |||
146 | 32 | } | 32 | } |
147 | 33 | }, | 33 | }, |
148 | 34 | 34 | ||
149 | 35 | // The specified error message is displayed. | ||
150 | 36 | _assert_error_display: function(message) { | ||
151 | 37 | var error_msg = Y.one('.yui3-picker-error'); | ||
152 | 38 | Y.Assert.areEqual(message, error_msg.get('text').trim()); | ||
153 | 39 | }, | ||
154 | 40 | |||
155 | 35 | // The bug entry form is visible visible or not. | 41 | // The bug entry form is visible visible or not. |
156 | 36 | _assert_form_state: function(bug_details_visible) { | 42 | _assert_form_state: function(bug_details_visible) { |
157 | 37 | var bug_info = Y.one('.yui3-picker-results ' + | 43 | var bug_info = Y.one('.yui3-picker-results ' + |
158 | @@ -140,11 +146,6 @@ | |||
159 | 140 | Y.Assert.isTrue(save_bug_called); | 146 | Y.Assert.isTrue(save_bug_called); |
160 | 141 | }, | 147 | }, |
161 | 142 | 148 | ||
162 | 143 | // The specified error message is displayed. | ||
163 | 144 | _assert_error_display: function(message) { | ||
164 | 145 | var error_msg = Y.one('.yui3-picker-error'); | ||
165 | 146 | Y.Assert.areEqual(message, error_msg.get('text').trim()); | ||
166 | 147 | }, | ||
167 | 148 | 149 | ||
168 | 149 | // The error is displayed as expected when the initial bug search | 150 | // The error is displayed as expected when the initial bug search |
169 | 150 | // fails with a generic error. | 151 | // fails with a generic error. |
170 | 151 | 152 | ||
171 | === modified file 'lib/lp/bugs/javascript/tests/test_duplicates.js' | |||
172 | --- lib/lp/bugs/javascript/tests/test_duplicates.js 2012-08-09 04:56:41 +0000 | |||
173 | +++ lib/lp/bugs/javascript/tests/test_duplicates.js 2012-08-14 18:46:45 +0000 | |||
174 | @@ -37,6 +37,7 @@ | |||
175 | 37 | } | 37 | } |
176 | 38 | delete this.mockio; | 38 | delete this.mockio; |
177 | 39 | delete window.LP; | 39 | delete window.LP; |
178 | 40 | delete this.lp_client; | ||
179 | 40 | }, | 41 | }, |
180 | 41 | 42 | ||
181 | 42 | test_library_exists: function () { | 43 | test_library_exists: function () { |
182 | @@ -65,6 +66,25 @@ | |||
183 | 65 | return widget; | 66 | return widget; |
184 | 66 | }, | 67 | }, |
185 | 67 | 68 | ||
186 | 69 | // The expected data is submitted after searching for and selecting a | ||
187 | 70 | // bug. | ||
188 | 71 | _assert_dupe_submission: function(bug_id) { | ||
189 | 72 | this._assert_search_form_submission(bug_id); | ||
190 | 73 | this._assert_search_form_success(bug_id); | ||
191 | 74 | Y.one( | ||
192 | 75 | '.yui3-picker-footer-slot [name="field.actions.save"]') | ||
193 | 76 | .simulate('click'); | ||
194 | 77 | this._assert_form_state(true); | ||
195 | 78 | Y.Assert.areEqual( | ||
196 | 79 | '/foobar/bug/1/+duplicate', | ||
197 | 80 | this.mockio.last_request.url); | ||
198 | 81 | var expected_link = | ||
199 | 82 | 'field.actions.change=Set%20Duplicate' + | ||
200 | 83 | '&field.duplicateof=3'; | ||
201 | 84 | Y.Assert.areEqual( | ||
202 | 85 | expected_link, this.mockio.last_request.config.data); | ||
203 | 86 | }, | ||
204 | 87 | |||
205 | 68 | // The widget is created when there are no bug duplicates. | 88 | // The widget is created when there are no bug duplicates. |
206 | 69 | test_widget_creation_no_duplicate_exists: function() { | 89 | test_widget_creation_no_duplicate_exists: function() { |
207 | 70 | this.widget = this._createWidget(false); | 90 | this.widget = this._createWidget(false); |
208 | @@ -140,25 +160,6 @@ | |||
209 | 140 | privacy_message.get('text').trim()); | 160 | privacy_message.get('text').trim()); |
210 | 141 | }, | 161 | }, |
211 | 142 | 162 | ||
212 | 143 | // The expected data is submitted after searching for and selecting a | ||
213 | 144 | // bug. | ||
214 | 145 | _assert_dupe_submission: function(bug_id) { | ||
215 | 146 | this._assert_search_form_submission(bug_id); | ||
216 | 147 | this._assert_search_form_success(bug_id); | ||
217 | 148 | Y.one( | ||
218 | 149 | '.yui3-picker-footer-slot [name="field.actions.save"]') | ||
219 | 150 | .simulate('click'); | ||
220 | 151 | this._assert_form_state(true); | ||
221 | 152 | Y.Assert.areEqual( | ||
222 | 153 | '/foobar/bug/1/+duplicate', | ||
223 | 154 | this.mockio.last_request.url); | ||
224 | 155 | var expected_link = | ||
225 | 156 | 'field.actions.change=Set%20Duplicate' + | ||
226 | 157 | '&field.duplicateof=3'; | ||
227 | 158 | Y.Assert.areEqual( | ||
228 | 159 | expected_link, this.mockio.last_request.config.data); | ||
229 | 160 | }, | ||
230 | 161 | |||
231 | 162 | // Submitting a bug dupe works as expected. | 163 | // Submitting a bug dupe works as expected. |
232 | 163 | test_picker_form_submission_success: function() { | 164 | test_picker_form_submission_success: function() { |
233 | 164 | this.widget = this._createWidget(false); | 165 | this.widget = this._createWidget(false); |
234 | 165 | 166 | ||
235 | === modified file 'lib/lp/registry/javascript/sharing/granteepicker.js' | |||
236 | --- lib/lp/registry/javascript/sharing/granteepicker.js 2012-07-20 03:15:04 +0000 | |||
237 | +++ lib/lp/registry/javascript/sharing/granteepicker.js 2012-08-14 18:46:45 +0000 | |||
238 | @@ -171,7 +171,7 @@ | |||
239 | 171 | if (Y.Lang.isObject(data.grantee_permissions)) { | 171 | if (Y.Lang.isObject(data.grantee_permissions)) { |
240 | 172 | Y.each(data.grantee_permissions, function(perm, type) { | 172 | Y.each(data.grantee_permissions, function(perm, type) { |
241 | 173 | var cb = step_two_content.one( | 173 | var cb = step_two_content.one( |
243 | 174 | 'input[name=field.permission.'+type+']' + | 174 | 'input[name="field.permission.'+type+'"]' + |
244 | 175 | '[value="' + perm + '"]'); | 175 | '[value="' + perm + '"]'); |
245 | 176 | if (Y.Lang.isValue(cb)) { | 176 | if (Y.Lang.isValue(cb)) { |
246 | 177 | cb.set('checked', true); | 177 | cb.set('checked', true); |
247 | @@ -221,7 +221,7 @@ | |||
248 | 221 | var contentBox = this.get('contentBox'); | 221 | var contentBox = this.get('contentBox'); |
249 | 222 | var selected_permissions = {}; | 222 | var selected_permissions = {}; |
250 | 223 | Y.Array.each(this.get('information_types'), function(info_type) { | 223 | Y.Array.each(this.get('information_types'), function(info_type) { |
252 | 224 | contentBox.all('input[name=field.permission.'+info_type.value+']') | 224 | contentBox.all('input[name="field.permission.'+info_type.value+'"]') |
253 | 225 | .each(function(node) { | 225 | .each(function(node) { |
254 | 226 | if (node.get('checked')) { | 226 | if (node.get('checked')) { |
255 | 227 | selected_permissions[info_type.value] = node.get('value'); | 227 | selected_permissions[info_type.value] = node.get('value'); |
256 | @@ -295,7 +295,7 @@ | |||
257 | 295 | // Disable the radio buttons 'Some' for selected info types. | 295 | // Disable the radio buttons 'Some' for selected info types. |
258 | 296 | var disable_some_button = function(info_type) { | 296 | var disable_some_button = function(info_type) { |
259 | 297 | var selector = | 297 | var selector = |
261 | 298 | 'input[name=field.permission.' + info_type + '][value=SOME]'; | 298 | 'input[name="field.permission.' + info_type + '"][value="SOME"]'; |
262 | 299 | policies.all(selector).each(function(permission_node) { | 299 | policies.all(selector).each(function(permission_node) { |
263 | 300 | permission_node.set('disabled', true); | 300 | permission_node.set('disabled', true); |
264 | 301 | permission_node.set( | 301 | permission_node.set( |
265 | 302 | 302 | ||
266 | === modified file 'lib/lp/registry/javascript/sharing/granteetable.js' | |||
267 | --- lib/lp/registry/javascript/sharing/granteetable.js 2012-07-26 20:29:27 +0000 | |||
268 | +++ lib/lp/registry/javascript/sharing/granteetable.js 2012-08-14 18:46:45 +0000 | |||
269 | @@ -234,10 +234,10 @@ | |||
270 | 234 | }); | 234 | }); |
271 | 235 | 235 | ||
272 | 236 | var id = 'permission-'+grantee.name; | 236 | var id = 'permission-'+grantee.name; |
275 | 237 | var grantee_row = this.get('grantee_table').one('[id=' + id + ']'); | 237 | var grantee_row = this.get('grantee_table').one('[id="' + id + '"]'); |
276 | 238 | var permission_node = grantee_row.one('[id=td-' + id + ']'); | 238 | var permission_node = grantee_row.one('[id="td-' + id + '"]'); |
277 | 239 | var contentBox = permission_node.one( | 239 | var contentBox = permission_node.one( |
279 | 240 | '[id=' + policy + '-' + id + ']'); | 240 | '[id="' + policy + '-' + id + '"]'); |
280 | 241 | var value_location = contentBox.one('.value'); | 241 | var value_location = contentBox.one('.value'); |
281 | 242 | var editicon = permission_node.one('a.editicon'); | 242 | var editicon = permission_node.one('a.editicon'); |
282 | 243 | 243 | ||
283 | 244 | 244 | ||
284 | === modified file 'lib/lp/registry/javascript/sharing/tests/test_granteetable.js' | |||
285 | --- lib/lp/registry/javascript/sharing/tests/test_granteetable.js 2012-07-21 03:04:06 +0000 | |||
286 | +++ lib/lp/registry/javascript/sharing/tests/test_granteetable.js 2012-08-14 18:46:45 +0000 | |||
287 | @@ -127,8 +127,8 @@ | |||
288 | 127 | // The given grantee is correctly rendered. | 127 | // The given grantee is correctly rendered. |
289 | 128 | _test_grantee_rendered: function(grantee) { | 128 | _test_grantee_rendered: function(grantee) { |
290 | 129 | // The grantee row | 129 | // The grantee row |
293 | 130 | var grantee_row = Y.one('#grantee-table tr[id=permission-' | 130 | var grantee_row = Y.one('#grantee-table tr[id="permission-' |
294 | 131 | + grantee.name + ']'); | 131 | + grantee.name + '"]'); |
295 | 132 | Y.Assert.isNotNull(grantee_row); | 132 | Y.Assert.isNotNull(grantee_row); |
296 | 133 | // The sprite or branding icon. | 133 | // The sprite or branding icon. |
297 | 134 | if (Y.Lang.isValue(grantee.icon_url)) { | 134 | if (Y.Lang.isValue(grantee.icon_url)) { |
298 | @@ -139,20 +139,20 @@ | |||
299 | 139 | } | 139 | } |
300 | 140 | // The update link | 140 | // The update link |
301 | 141 | Y.Assert.isNotNull( | 141 | Y.Assert.isNotNull( |
304 | 142 | Y.one('#grantee-table span[id=update-' | 142 | Y.one('#grantee-table span[id="update-' |
305 | 143 | + grantee.name + '] a')); | 143 | + grantee.name + '"] a')); |
306 | 144 | // The delete link | 144 | // The delete link |
307 | 145 | Y.Assert.isNotNull( | 145 | Y.Assert.isNotNull( |
310 | 146 | Y.one('#grantee-table span[id=remove-' | 146 | Y.one('#grantee-table span[id="remove-' |
311 | 147 | + grantee.name + '] a')); | 147 | + grantee.name + '"] a')); |
312 | 148 | // The sharing permissions | 148 | // The sharing permissions |
313 | 149 | var self = this; | 149 | var self = this; |
314 | 150 | Y.each(grantee.permissions, function(permission, info_type) { | 150 | Y.each(grantee.permissions, function(permission, info_type) { |
315 | 151 | var permission_node = | 151 | var permission_node = |
320 | 152 | Y.one('#grantee-table td[id=td-permission-' | 152 | Y.one('#grantee-table td[id="td-permission-' |
321 | 153 | + grantee.name + '] ul li ' | 153 | + grantee.name + '"] ul li ' |
322 | 154 | + 'span[id=' + info_type + '-permission-' | 154 | + 'span[id="' + info_type + '-permission-' |
323 | 155 | + grantee.name + '] span.value'); | 155 | + grantee.name + '"] span.value'); |
324 | 156 | Y.Assert.isNotNull(permission_node); | 156 | Y.Assert.isNotNull(permission_node); |
325 | 157 | var expected_content = | 157 | var expected_content = |
326 | 158 | self.information_types[info_type] + ': ' + | 158 | self.information_types[info_type] + ': ' + |
327 | @@ -165,7 +165,7 @@ | |||
328 | 165 | if (grantee.shared_items_exist) { | 165 | if (grantee.shared_items_exist) { |
329 | 166 | Y.Assert.isNotNull( | 166 | Y.Assert.isNotNull( |
330 | 167 | shared_items_cell.one( | 167 | shared_items_cell.one( |
332 | 168 | 'a[href=+sharing/' + grantee.name + ']')); | 168 | 'a[href="+sharing/' + grantee.name + '"]')); |
333 | 169 | } else { | 169 | } else { |
334 | 170 | Y.Assert.areEqual( | 170 | Y.Assert.areEqual( |
335 | 171 | 'No items shared through subscriptions.', | 171 | 'No items shared through subscriptions.', |
336 | @@ -201,7 +201,7 @@ | |||
337 | 201 | } | 201 | } |
338 | 202 | ); | 202 | ); |
339 | 203 | var update_link_to_click = | 203 | var update_link_to_click = |
341 | 204 | Y.one('#grantee-table span[id=update-fred] a'); | 204 | Y.one('#grantee-table span[id="update-fred"] a'); |
342 | 205 | update_link_to_click.simulate('click'); | 205 | update_link_to_click.simulate('click'); |
343 | 206 | Y.Assert.isTrue(event_fired); | 206 | Y.Assert.isTrue(event_fired); |
344 | 207 | }, | 207 | }, |
345 | @@ -252,7 +252,7 @@ | |||
346 | 252 | } | 252 | } |
347 | 253 | ); | 253 | ); |
348 | 254 | var delete_link_to_click = | 254 | var delete_link_to_click = |
350 | 255 | Y.one('#grantee-table span[id=remove-fred] a'); | 255 | Y.one('#grantee-table span[id="remove-fred"] a'); |
351 | 256 | delete_link_to_click.simulate('click'); | 256 | delete_link_to_click.simulate('click'); |
352 | 257 | Y.Assert.isTrue(event_fired); | 257 | Y.Assert.isTrue(event_fired); |
353 | 258 | }, | 258 | }, |
354 | @@ -286,10 +286,10 @@ | |||
355 | 286 | } | 286 | } |
356 | 287 | ); | 287 | ); |
357 | 288 | var permission_popup = | 288 | var permission_popup = |
359 | 289 | Y.one('#grantee-table span[id=P1-permission-fred] a'); | 289 | Y.one('#grantee-table span[id="P1-permission-fred"] a'); |
360 | 290 | permission_popup.simulate('click'); | 290 | permission_popup.simulate('click'); |
361 | 291 | var permission_choice = Y.one( | 291 | var permission_choice = Y.one( |
363 | 292 | '.yui3-ichoicelist-content a[href=#s2]'); | 292 | '.yui3-ichoicelist-content a[href="#s2"]'); |
364 | 293 | permission_choice.simulate('click'); | 293 | permission_choice.simulate('click'); |
365 | 294 | Y.Assert.isTrue(event_fired); | 294 | Y.Assert.isTrue(event_fired); |
366 | 295 | }, | 295 | }, |
367 | @@ -378,7 +378,7 @@ | |||
368 | 378 | // A named grantee operation error is displayed correctly. | 378 | // A named grantee operation error is displayed correctly. |
369 | 379 | this.grantee_table = this._create_Widget(); | 379 | this.grantee_table = this._create_Widget(); |
370 | 380 | this.grantee_table.render(); | 380 | this.grantee_table.render(); |
372 | 381 | var row_fred = Y.one('#grantee-table tr[id=permission-fred]'); | 381 | var row_fred = Y.one('#grantee-table tr[id="permission-fred"]'); |
373 | 382 | var success = false; | 382 | var success = false; |
374 | 383 | Y.lp.app.errors.display_error = function(flash_node, msg) { | 383 | Y.lp.app.errors.display_error = function(flash_node, msg) { |
375 | 384 | Y.Assert.areEqual(row_fred, flash_node); | 384 | Y.Assert.areEqual(row_fred, flash_node); |
Thank you for these fixes.