<%
recent_procs_panel_width = 6
- if !PipelineInstance.api_exists?(:index)
+ if !PipelineInstance.api_exists?(:create)
recent_procs_title = 'Recent processes'
run_proc_title = 'Choose a workflow to run:'
show_node_status = false
end
end
- [
- [:admin, true],
- [:active, false],
- ].each do |user, expect_all_nodes|
+ [:admin, :active].each do |user|
test "in dashboard other index page links as #{user}" do
get :index, params: {}, session: session_for(user)
assert_includes @response.body, "href=\"#{path}\""
assert_includes @response.body, "All #{target}"
end
-
- if expect_all_nodes
- assert_includes @response.body, "href=\"/nodes\""
- assert_includes @response.body, "All nodes"
- else
- assert_not_includes @response.body, "href=\"/nodes\""
- assert_not_includes @response.body, "All nodes"
- end
end
end
first('button', text: 'x').click
end
- assert_text 'Recent pipelines and processes' # seeing dashboard now
+ assert_text 'Recent processes' # seeing dashboard now
end
end
test "visit dashboard as #{token}" do
visit page_with_token(token)
- assert_text 'Recent pipelines and processes' # seeing dashboard now
+ assert_text 'Recent processes' # seeing dashboard now
within('.recent-processes-actions') do
assert page.has_link?('Run a process')
assert page.has_link?('All processes')
assert page.has_link? 'foo_file'
end
end
-
- within('.compute-node-actions') do
- if is_admin
- assert page.has_link?('All nodes')
- else
- assert page.has_no_link?('All nodes')
- end
- end
-
- within('.compute-node-summary-pane') do
- click_link 'Details'
- assert_text 'compute0'
- end
end
end
end
test "login with api_token works after redirect" do
visit page_with_token('active_trustedclient')
- assert page.has_text?('Recent pipelines and processes'), "Missing 'Recent pipelines and processes' from page"
+ assert page.has_text?('Recent processes'), "Missing 'Recent processes' from page"
assert_no_match(/\bapi_token=/, current_path)
end
assert_text('Save profile')
add_profile user
else
- assert_text('Recent pipelines and processes')
+ assert_text('Recent processes')
assert_no_text('Save profile')
end
elsif invited
end
# profile saved and in home page now
- assert_text('Recent pipelines and processes')
+ assert_text('Recent processes')
end
[
].each do |template_name, preview_txt, process_txt|
test "run a process using template #{template_name} from dashboard" do
visit page_with_token('admin')
- assert_text 'Recent pipelines and processes' # seeing dashboard now
+ assert_text 'Recent processes' # seeing dashboard now
within('.recent-processes-actions') do
assert page.has_link?('All processes')