Merge branch 'master' into 2761-diagnostic-suite
[arvados.git] / apps / workbench / test / integration / jobs_test.rb
1 require 'integration_helper'
2
3 class JobsTest < ActionDispatch::IntegrationTest
4   test "add job description" do
5     Capybara.current_driver = Capybara.javascript_driver
6     visit page_with_token("active", "/jobs")
7
8     # go to job running the script "doesnotexist"
9     within first('tr', text: 'doesnotexist') do
10       find("a").click
11     end
12
13     # edit job description
14     within('.arv-description-as-subtitle') do
15       find('.fa-pencil').click
16       find('.editable-input textarea').set('*Textile description for job* - "Go to dashboard":/')
17       find('.editable-submit').click
18     end
19     wait_for_ajax
20
21     # Verify edited description
22     assert page.has_no_text? '*Textile description for job*'
23     assert page.has_text? 'Textile description for job'
24     assert page.has_link? 'Go to dashboard'
25     click_link 'Go to dashboard'
26     assert page.has_text? 'My projects'
27     assert page.has_text? 'Projects shared with me'
28   end
29 end