From 3232e31afc1a39782596c6d5c370723ef5241fca Mon Sep 17 00:00:00 2001 From: Jeffrey Thiessen Date: Thu, 19 Dec 2024 11:31:20 -0600 Subject: [PATCH] fix rebase error duplicating tests --- .../graphql/workflow_executions_query_test.rb | 77 ------------------- 1 file changed, 77 deletions(-) diff --git a/test/graphql/workflow_executions_query_test.rb b/test/graphql/workflow_executions_query_test.rb index 12fd0f95b8..acc0175d83 100644 --- a/test/graphql/workflow_executions_query_test.rb +++ b/test/graphql/workflow_executions_query_test.rb @@ -175,81 +175,4 @@ def setup assert_equal group_id, data['group']['id'], 'group id should match' assert_nil data['project'] end - - test 'workflow executions nodes query for samples should work' do - prelim_query = IridaSchema.execute( - WORKFLOW_EXECUTIONS_QUERY, - context: { current_user: @user }, - variables: { first: 1 } - )['data'] - - workflow_execution_id = prelim_query['workflowExecutions']['nodes'][0]['id'] - sample_id = prelim_query['workflowExecutions']['nodes'][0]['samples']['edges'][0]['node']['id'] - - result = IridaSchema.execute(WORKFLOW_EXECUTIONS_NODE_QUERY, context: { current_user: @user }, - variables: { workflow_execution_id: }) - - data = result['data']['node'] - - assert_not_empty data['samplesWorkflowExecutions'], 'workflow execution samples resolver should work' - assert_equal sample_id, data['samplesWorkflowExecutions'][0]['sample']['id'], 'sample id should match' - end - - test 'workflow executions nodes query for metadata though resolver should work' do - prelim_query = IridaSchema.execute( - WORKFLOW_EXECUTIONS_QUERY, - context: { current_user: @user }, - variables: { first: 1 } - )['data'] - - workflow_execution_id = prelim_query['workflowExecutions']['nodes'][0]['id'] - - result = IridaSchema.execute(WORKFLOW_EXECUTIONS_NODE_QUERY, context: { current_user: @user }, - variables: { workflow_execution_id: }) - - data = result['data']['node'] - - exp_metadata = { 'workflow_name' => 'wn1', 'workflow_version' => 'wv1' } - assert_equal exp_metadata, data['metadata'] - end - - test 'workflow executions nodes query for state should translate from enum' do - prelim_query = IridaSchema.execute( - WORKFLOW_EXECUTIONS_QUERY, - context: { current_user: @user }, - variables: { first: 1 } - )['data'] - - workflow_execution_id = prelim_query['workflowExecutions']['nodes'][0]['id'] - - result = IridaSchema.execute(WORKFLOW_EXECUTIONS_NODE_QUERY, context: { current_user: @user }, - variables: { workflow_execution_id: }) - - data = result['data']['node'] - - # We should have a string translated from the enum, not an integer - assert_equal 'initial', data['state'] - end - - test 'workflow executions nodes query should on groups' do - user = users(:james_doe) - prelim_query = IridaSchema.execute( - WORKFLOW_EXECUTIONS_QUERY, - context: { current_user: user }, - variables: { first: 1 } - )['data'] - - workflow_execution_id = prelim_query['workflowExecutions']['nodes'][0]['id'] - - result = IridaSchema.execute(WORKFLOW_EXECUTIONS_NODE_QUERY, context: { current_user: user }, - variables: { workflow_execution_id: }) - - assert_nil result['errors'], 'should work and have no errors.' - - data = result['data']['node'] - assert_not_empty data, 'workflow execution type should work' - group_id = groups(:group_one).to_global_id.to_s - assert_equal group_id, data['group']['id'], 'group id should match' - assert_nil data['project'] - end end