159 |
159 |
assert_select 'a[href="#"]', :text => 'List'
|
160 |
160 |
assert_select 'ul' do
|
161 |
161 |
assert_select 'a', 3
|
162 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo", :text => 'Foo'
|
163 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
|
162 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo", :text => 'Foo'
|
|
163 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
|
164 |
end
|
|
165 |
end
|
|
166 |
end
|
|
167 |
|
|
168 |
def test_context_menu_multiple_issues_should_include_list_custom_fields
|
|
169 |
field = IssueCustomField.create!(:name => 'List', :field_format => 'list',
|
|
170 |
:possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3])
|
|
171 |
@request.session[:user_id] = 2
|
|
172 |
get(
|
|
173 |
:issues,
|
|
174 |
:params => {
|
|
175 |
:ids => [1, 2]
|
|
176 |
}
|
|
177 |
)
|
|
178 |
assert_select "li.cf_#{field.id}" do
|
|
179 |
assert_select 'a[href="#"]', :text => 'List'
|
|
180 |
assert_select 'ul' do
|
|
181 |
assert_select 'a', 3
|
|
182 |
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo", :text => 'Foo'
|
|
183 |
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
164 |
184 |
end
|
165 |
185 |
end
|
166 |
186 |
end
|
... | ... | |
220 |
240 |
assert_select 'a[href="#"]', :text => 'Bool'
|
221 |
241 |
assert_select 'ul' do
|
222 |
242 |
assert_select 'a', 3
|
223 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=0", :text => 'No'
|
224 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=1", :text => 'Yes'
|
225 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
|
243 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=0", :text => 'No'
|
|
244 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=1", :text => 'Yes'
|
|
245 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
226 |
246 |
end
|
227 |
247 |
end
|
228 |
248 |
end
|
... | ... | |
241 |
261 |
assert_select 'a[href="#"]', :text => 'User'
|
242 |
262 |
assert_select 'ul' do
|
243 |
263 |
assert_select 'a', Project.find(1).members.count + 2 # users + 'none' + 'me'
|
244 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=2", :text => 'John Smith'
|
245 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
|
264 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=2", :text => 'John Smith'
|
|
265 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
246 |
266 |
end
|
247 |
267 |
end
|
248 |
268 |
end
|
... | ... | |
260 |
280 |
assert_select 'a[href="#"]', :text => 'Version'
|
261 |
281 |
assert_select 'ul' do
|
262 |
282 |
assert_select 'a', Project.find(1).shared_versions.count + 1
|
263 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=3", :text => '2.0'
|
264 |
|
assert_select 'a[href=?]', "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
|
283 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=3", :text => '2.0'
|
|
284 |
assert_select 'a[href=?]', "/issues/1?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=__none__", :text => 'none'
|
265 |
285 |
end
|
266 |
286 |
end
|
267 |
287 |
end
|