8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / test / integration / pipeline_templates_test.rb
1 require 'integration_helper'
2
3 class PipelineTemplatesTest < ActionDispatch::IntegrationTest
4   test "JSON popup available for strange components" do
5     need_javascript
6     uuid = api_fixture("pipeline_templates")["components_is_jobspec"]["uuid"]
7     visit page_with_token("active", "/pipeline_templates/#{uuid}")
8     click_on "Components"
9     assert(page.has_no_text?("script_parameters"),
10            "components JSON visible without popup")
11     click_on "Show components JSON"
12     assert(page.has_text?("script_parameters"),
13            "components JSON not found")
14   end
15
16   test "pipeline template description" do
17     need_javascript
18     visit page_with_token("active", "/pipeline_templates")
19
20     # go to Two Part pipeline template
21     within first('tr', text: 'Two Part Pipeline Template') do
22       find(".fa-gears").click
23     end
24
25     # edit template description
26     within('.arv-description-as-subtitle') do
27       find('.fa-pencil').click
28       find('.editable-input textarea').set('*Textile description for pipeline template* - "Go to dashboard":/')
29       find('.editable-submit').click
30     end
31     wait_for_ajax
32
33     # Verfiy edited description
34     assert page.has_no_text? '*Textile description for pipeline template*'
35     assert page.has_text? 'Textile description for pipeline template'
36     assert page.has_link? 'Go to dashboard'
37     click_link 'Go to dashboard'
38     assert page.has_text? 'Recent pipelines and processes'
39
40     # again visit recent templates page and verify edited description
41     visit page_with_token("active", "/pipeline_templates")
42     assert page.has_no_text? '*Textile description for pipeline template*'
43     assert page.has_text? 'Textile description for pipeline template'
44   end
45 end