Defect #38797 ยป fix-wrong-usages-of-assert_select.patch
test/functional/issues_controller_test.rb | ||
---|---|---|
2797 | 2797 |
assert_response :success |
2798 | 2798 | |
2799 | 2799 |
# long text custom field should not be render in the attributes div |
2800 |
assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0, :text => 'Long text' |
|
2801 |
assert_select( |
|
2802 |
"div.attributes div.attribute.cf_#{field.id} div.value", |
|
2803 |
0, |
|
2804 |
:text => 'This is a long text' |
|
2805 |
) |
|
2800 |
assert_select "div.attributes div.attribute.cf_#{field.id} p strong", 0 |
|
2801 |
assert_select "div.attributes div.attribute.cf_#{field.id} div.value", 0 |
|
2806 | 2802 |
# long text custom field should be render under description field |
2807 | 2803 |
assert_select "div.description ~ div.attribute.cf_#{field.id} p strong", :text => 'Long text' |
2808 | 2804 |
assert_select( |
... | ... | |
3857 | 3853 |
end |
3858 | 3854 | |
3859 | 3855 |
assert_select 'div#trackers_description' do |
3860 |
assert_select 'h3', 1, :text => 'Trackers description'
|
|
3856 |
assert_select 'h3', :text => 'Trackers description', :count => 1
|
|
3861 | 3857 |
# only Bug and Feature have descriptions |
3862 |
assert_select 'dt', 2, :text => 'Bug' |
|
3863 |
assert_select 'dd', 2, :text => 'Description for Bug tracker' |
|
3858 |
assert_select 'dt', 2 |
|
3859 |
assert_select 'dt', :text => 'Bug', :count => 1 |
|
3860 |
assert_select 'dd', :text => 'Description for Bug tracker', :count => 1 |
|
3864 | 3861 |
end |
3865 | 3862 |
end |
3866 | 3863 |
test/functional/my_controller_test.rb | ||
---|---|---|
272 | 272 |
assert_match 'v[updated_by][]=me', report_url |
273 | 273 | |
274 | 274 |
assert_select 'table.issues tbody tr', 2 |
275 |
assert_select 'table.issues tbody tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes' |
|
275 |
assert_select 'table.issues tbody tr[id=?]', 'issue-1' do |
|
276 |
assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1 |
|
277 |
end |
|
276 | 278 |
assert_select 'table.issues tbody tr[id=?]', 'issue-14', 0 |
277 | 279 |
end |
278 | 280 |
end |
... | ... | |
311 | 313 |
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url |
312 | 314 | |
313 | 315 |
assert_select 'tr', 1 |
314 |
assert_select 'tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes' |
|
316 |
assert_select 'tr[id=?]', 'issue-1' do |
|
317 |
assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1 |
|
318 |
end |
|
315 | 319 |
assert_select 'tr[id=?]', 'issue-4', 0 |
316 | 320 |
end |
317 | 321 |
end |
... | ... | |
339 | 343 |
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url |
340 | 344 | |
341 | 345 |
assert_select 'table.issues tbody tr', 10 |
342 |
assert_select 'table.issues tbody tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes' |
|
346 |
assert_select 'table.issues tbody tr[id=?]', 'issue-1' do |
|
347 |
assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1 |
|
348 |
end |
|
343 | 349 |
assert_select 'table.issues tbody tr[id=?]', 'issue-4', 0 |
344 | 350 |
end |
345 | 351 |
end |
... | ... | |
371 | 377 |
assert_match 'v%5Bproject.status%5D%5B%5D=1', report_url |
372 | 378 | |
373 | 379 |
assert_select 'tr', 1 |
374 |
assert_select 'tr[id=?]', 'issue-1', 1, :title => 'Cannot print recipes' |
|
380 |
assert_select 'tr[id=?]', 'issue-1' do |
|
381 |
assert_select 'td.subject a', :text => 'Cannot print recipes', :count => 1 |
|
382 |
end |
|
375 | 383 |
assert_select 'tr[id=?]', 'issue-4', 0 |
376 | 384 |
end |
377 | 385 |
end |
test/functional/timelog_controller_test.rb | ||
---|---|---|
768 | 768 |
assert_response :success |
769 | 769 |
assert_select 'select[id=?]', 'time_entry_activity_id' do |
770 | 770 |
assert_select 'option', 3 |
771 |
assert_select 'option[value=?]', '11', 0, :text => 'QA'
|
|
771 |
assert_select 'option[value=?]', '11', 0 |
|
772 | 772 |
end |
773 | 773 |
end |
774 | 774 |
test/functional/timelog_report_test.rb | ||
---|---|---|
110 | 110 |
get :report, :params => {:project_id => 1, :columns => 'month', :criteria => ["user", "activity"]} |
111 | 111 |
assert_response :success |
112 | 112 | |
113 |
assert_select 'td.name a.user.active[href=?]', '/users/1', 1, :text => 'Redmine Admin'
|
|
114 |
assert_select 'td.name a.user.locked[href=?]', '/users/2', 1, :text => 'John Smith'
|
|
113 |
assert_select 'td.name a.user.active[href=?]', '/users/1', :text => 'Redmine Admin', :count => 1
|
|
114 |
assert_select 'td.name a.user.locked[href=?]', '/users/2', :text => 'John Smith', :count => 1
|
|
115 | 115 |
end |
116 | 116 | |
117 | 117 |
def test_report_custom_field_criteria_with_multiple_values_on_single_value_custom_field_should_not_fail |