first('button', text: 'x').click
end
- assert_text 'Active pipelines' # seeing dashboard now
+ assert_text 'Recent pipelines and processes' # seeing dashboard now
end
end
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 'pipeline_with_job'
+
+ within('.row-zzzzz-xvhdp-cr4runningcntnr') do
+ assert_text 'requester_for_running_cr'
+ 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? '1f4b0bc7583c2a7f9102c395f4ffc5e3+45'
+ 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