X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f4ca9ad94a6bb006d1f3c7ba207837f1736d1247..730eb182b2160040a902feb09276b75a3f9c137c:/apps/workbench/test/integration/application_layout_test.rb diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb index 4a6a553437..93827a9c74 100644 --- a/apps/workbench/test/integration/application_layout_test.rb +++ b/apps/workbench/test/integration/application_layout_test.rb @@ -179,7 +179,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest first('button', text: 'x').click end - assert_text 'Active pipelines' # seeing dashboard now + assert_text 'Recent pipelines and processes' # seeing dashboard now end end @@ -241,4 +241,49 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest assert_text look_for end end + + [ + ['active', false], + ['admin', true], + ].each do |token, is_admin| + test "visit dashboard as #{token}" do + visit page_with_token(token) + + assert_text 'Recent pipelines and processes' # seeing dashboard now + within('.recent-processes-actions') do + assert page.has_link?('Run a pipeline') + assert page.has_link?('All processes') + end + + within('.recent-processes') do + assert_text 'running_with_job' + within('.row-zzzzz-d1hrv-runningpipeline') do + assert_text 'foo' + end + + assert_text 'zzzzz-d1hrv-twodonepipeline' + within('.row-zzzzz-d1hrv-twodonepipeline')do + assert_text 'No output' + end + + assert_text 'completed container request' + within('.row-zzzzz-xvhdp-cr4completedctr')do + 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