Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
get(:show, {id: test_uuid})
login_link = css_select(css_selector).first
assert_not_nil(login_link, "failed to select login link")
- login_href = URI.unescape(login_link.attributes["href"])
+ login_href = URI.unescape(login_link.attributes["href"].value)
# The parameter needs to include the full URL to work.
assert_includes(login_href, "://")
assert_match(/[\?&]return_to=[^&]*\/projects\/#{test_uuid}(&|$)/,
assert_equal true, files.length>0, "Expected one or more files in collection"
disabled = css_select('[disabled="disabled"]').collect do |el|
- el.attributes['title'].split[-1]
+ el.attributes['title'].value.split[-1]
end
assert_equal files.sort, disabled.sort, "Expected to see all collection files in disabled list of files"
id: readonly_project_uuid
}, session_for(which_user)
buttons = css_select('[data-method=post]').select do |el|
- el.attributes['data-remote-href'].match /project.*owner_uuid.*#{readonly_project_uuid}/
+ el.attributes['data-remote-href'].value.match /project.*owner_uuid.*#{readonly_project_uuid}/
end
if should_show
assert_not_empty(buttons, "did not offer to create a subproject")
assert_response :success
panes = css_select('[data-toggle=tab]').each do |pane|
- pane_name = pane.attributes['href']
+ pane_name = pane.attributes['href'].value
assert_includes expected_panes, pane_name
end
end
commit: sha1,
}, session_for(user)
assert_response :success
- assert_select 'pre', h(commit)
+ assert_select 'pre', commit
end
test "show blob to #{user}" do
path: 'COPYING',
}, session_for(user)
assert_response :success
- assert_select 'pre', h(filedata)
+ assert_select 'pre', filedata
end
end
if username == 'admin'
assert_match /<a href="\/projects\/#{admin_user['uuid']}">Home<\/a>/, @response.body
assert_match /<a href="\/projects\/#{active_user['uuid']}">Home<\/a>/, @response.body
- assert_match /href="\/users\/#{admin_user['uuid']}" title="show user"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
- assert_match /href="\/users\/#{active_user['uuid']}" title="show user"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
+ assert_match /href="\/users\/#{admin_user['uuid']}"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
+ assert_match /href="\/users\/#{active_user['uuid']}"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
assert_includes @response.body, admin_user['email']
assert_includes @response.body, active_user['email']
else
refute_match /Home<\/a>/, @response.body
- refute_match /href="\/users\/#{admin_user['uuid']}" title="show user"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
- assert_match /href="\/users\/#{active_user['uuid']}" title="show user"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
+ refute_match /href="\/users\/#{admin_user['uuid']}"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
+ assert_match /href="\/users\/#{active_user['uuid']}"><i class="fa fa-fw fa-user"><\/i> Show<\/a/, @response.body
assert_includes @response.body, active_user['email']
end
end