1 require 'diagnostics_test_helper'
3 # This test assumes that the configured workflow_uuid corresponds to a cwl workflow.
4 # Ex: configure a workflow using the steps below and use the resulting workflow uuid:
5 # > cd arvados/doc/user/cwl/bwa-mem
6 # > arvados-cwl-runner --create-workflow bwa-mem.cwl bwa-mem-input.yml
8 class ContainerRequestTest < DiagnosticsTest
9 crs_to_test = Rails.configuration.container_requests_to_test.andand.keys
12 need_selenium 'to make websockets work'
15 crs_to_test.andand.each do |cr_to_test|
16 test "run container_request: #{cr_to_test}" do
17 cr_config = Rails.configuration.container_requests_to_test[cr_to_test]
19 visit_page_with_token 'active'
21 find('.btn', text: 'Run a process').click
23 within('.modal-dialog') do
24 page.find_field('Search').set cr_config['workflow_uuid']
26 find('.selectable', text: 'bwa-mem.cwl').click
27 find('.btn', text: 'Next: choose inputs').click
30 page.assert_selector('a.disabled,button.disabled', text: 'Run') if cr_config['input_paths'].any?
32 # Choose input for the workflow
33 cr_config['input_paths'].each do |look_for|
38 # All needed input are already filled in. Run this workflow now
39 page.assert_no_selector('a.disabled,button.disabled', text: 'Run')
40 find('a,button', text: 'Run').click
42 # container_request is running. Run button is no longer available.
43 page.assert_no_selector('a', text: 'Run')
45 # Wait for container_request run to complete
46 wait_until_page_has 'completed', cr_config['max_wait_seconds']