Skip to content

Commit

Permalink
Fix: Nextflow Metadata Fields (#943)
Browse files Browse the repository at this point in the history
* add fix to nextflow metadata fields, associated test

* add controller test to check fields

* add signin to setup

* remove test controller
  • Loading branch information
ChrisHuynh333 authored Feb 13, 2025
1 parent b3e7eeb commit b987b2f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def pipeline_selection
def create
@namespace = Namespace.find_by(id: @namespace_id)
fields_for_namespace_or_template(
namespace: @namespace
namespace: @namespace,
template: 'all'
)
render status: :ok
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,33 @@ module WorkflowExecutions
class SubmissionControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers

test 'should render pipeline selection on turbo stream request' do
setup do
sign_in users(:john_doe)
@group = groups(:group_one)
@project = projects(:project1)
end

test 'should render pipeline selection on turbo stream request' do
get pipeline_selection_workflow_executions_submissions_path(format: :turbo_stream)
assert_response :ok
end

test 'create submission' do
sample1 = samples(:sample1)
post workflow_executions_submissions_path(namespace_id: @project.namespace.id,
workflow_name: 'phac-nml/iridanextexample',
workflow_version: '1.0.3',
samples: [sample1.id], format: :turbo_stream)

assert_response :ok
end

test '@fields in create' do
post workflow_executions_submissions_path(format: :turbo_stream, workflow_name: 'phac-nml/iridanextexample',
workflow_version: '1.0.2', namespace_id: @group.id)
assert_response :ok
assert_equal ['metadatafield1', 'metadatafield2', 'unique.metadata.field'],
@controller.instance_eval('@fields', __FILE__, __LINE__)
end
end
end

0 comments on commit b987b2f

Please sign in to comment.