1 require 'integration_helper'
3 class PipelineTemplatesTest < ActionDispatch::IntegrationTest
4 test "JSON popup available for strange components" do
6 uuid = api_fixture("pipeline_templates")["components_is_jobspec"]["uuid"]
7 visit page_with_token("active", "/pipeline_templates/#{uuid}")
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")
16 test "pipeline template description" do
18 visit page_with_token("active", "/pipeline_templates")
20 # go to Two Part pipeline template
21 within first('tr', text: 'Two Part Pipeline Template') do
22 find(".fa-gears").click
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
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'
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'