1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require 'integration_helper'
7 class PipelineTemplatesTest < ActionDispatch::IntegrationTest
8 test "JSON popup available for strange components" do
10 uuid = api_fixture("pipeline_templates")["components_is_jobspec"]["uuid"]
11 visit page_with_token("active", "/pipeline_templates/#{uuid}")
13 assert(page.has_no_text?("script_parameters"),
14 "components JSON visible without popup")
15 click_on "Show components JSON"
16 assert(page.has_text?("script_parameters"),
17 "components JSON not found")
20 test "pipeline template description" do
22 visit page_with_token("active", "/pipeline_templates")
24 # go to Two Part pipeline template
25 within first('tr', text: 'Two Part Pipeline Template') do
26 find(".fa-gears").click
29 # edit template description
30 within('.arv-description-as-subtitle') do
31 find('.fa-pencil').click
32 find('.editable-input textarea').set('*Textile description for pipeline template* - "Go to dashboard":/')
33 find('.editable-submit').click
37 # Verfiy edited description
38 assert page.has_no_text? '*Textile description for pipeline template*'
39 assert page.has_text? 'Textile description for pipeline template'
40 assert page.has_link? 'Go to dashboard'
41 click_link 'Go to dashboard'
42 assert page.has_text? 'Recent pipelines and processes'
44 # again visit recent templates page and verify edited description
45 visit page_with_token("active", "/pipeline_templates")
46 assert page.has_no_text? '*Textile description for pipeline template*'
47 assert page.has_text? 'Textile description for pipeline template'