|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
assert_response :success |
|
|
assert_response :success |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', '/issues/bulk_edit?ids%5B%5D=1&ids%5B%5D=2', :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', '/issues/bulk_edit?ids%5B%5D=1&ids%5B%5D=2', :text => 'Bulk edit' |
|
|
assert_select 'a.icon-copy[href=?]', '/issues/bulk_edit?copy=1&ids%5B%5D=1&ids%5B%5D=2', :text => 'Copy' |
|
|
assert_select 'a.icon-copy[href=?]', '/issues/bulk_edit?copy=1&ids%5B%5D=1&ids%5B%5D=2', :text => 'Copy' |
|
|
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1&ids%5B%5D=2', :text => 'Delete' |
|
|
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1&ids%5B%5D=2', :text => 'Delete' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ids = [1, 2].map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
ids = [1, 2].map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Bulk edit' |
|
|
# issue_id: '1,2', set_filter: 1, status_id: '*' |
|
|
# issue_id: '1,2', set_filter: 1, status_id: '*' |
|
|
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/projects/ecookbook/issues?issue_id=1%2C2&set_filter=1&status_id=%2A", :text => 'Copy link' |
|
|
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/projects/ecookbook/issues?issue_id=1%2C2&set_filter=1&status_id=%2A", :text => 'Copy link' |
|
|
assert_select 'a.icon-copy[href=?]', "/issues/bulk_edit?copy=1&#{ids}", :text => 'Copy' |
|
|
assert_select 'a.icon-copy[href=?]', "/issues/bulk_edit?copy=1&#{ids}", :text => 'Copy' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ids = [1, 2, 6].map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
ids = [1, 2, 6].map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Bulk edit' |
|
|
# issue_id: '1,2,6', set_filter: 1, status_id: '*' |
|
|
# issue_id: '1,2,6', set_filter: 1, status_id: '*' |
|
|
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/issues?issue_id=1%2C2%2C6&set_filter=1&status_id=%2A", :text => 'Copy link' |
|
|
assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/issues?issue_id=1%2C2%2C6&set_filter=1&status_id=%2A", :text => 'Copy link' |
|
|
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete' |
|
|
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete' |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
assert_response :success |
|
|
assert_response :success |
|
|
|
|
|
|
|
|
assert_select 'a:not(.disabled)', :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a:not(.disabled)', :text => 'Bulk edit' |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def test_context_menu_for_one_time_entry |
|
|
def test_context_menu_for_one_time_entry |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
assert_response :success |
|
|
assert_response :success |
|
|
|
|
|
|
|
|
assert_select 'a:not(.disabled)', :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a:not(.disabled)', :text => 'Bulk edit' |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def test_time_entries_context_menu_without_edit_permission |
|
|
def test_time_entries_context_menu_without_edit_permission |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
assert_response :success |
|
|
assert_response :success |
|
|
|
|
|
|
|
|
assert_select 'a.disabled', :text => 'Edit' |
|
|
|
|
|
|
|
|
assert_select 'a.disabled', :text => 'Bulk edit' |
|
|
end |
|
|
end |
|
|
end |
|
|
end |