diff --git a/features/step_definitions/navigation_steps.rb b/features/step_definitions/navigation_steps.rb index 15fe08503..b7e0199e5 100644 --- a/features/step_definitions/navigation_steps.rb +++ b/features/step_definitions/navigation_steps.rb @@ -1,21 +1,22 @@ # Tasks -def visit_task_page(task_name) # /modules/:id/ +Given("I'm on the Protocols page of a {string} task") do |task_name| m = MyModule.find_by(name: task_name) visit protocols_my_module_path(m) end -def visit_task_results_page(task_name) # /modules/:id/results +Given("I'm on the Protocols result page of a {string} task") do |task_name| m = MyModule.find_by(name: task_name) visit results_my_module_path(m) end -def visit_task_archived_results_page(task_name) # /modules/:id/archive +Given("I'm on the Protocols result archived page of a {string} task") do |task_name| m = MyModule.find_by(name: task_name) visit archive_my_module_path(m) end +# Change methods to steps # Settings def visit_profile_page visit edit_user_registration_path diff --git a/features/step_definitions/protocol_steps.rb b/features/step_definitions/protocol_steps.rb index fafcb8d66..df254ba62 100644 --- a/features/step_definitions/protocol_steps.rb +++ b/features/step_definitions/protocol_steps.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -Given("I'm on the Protocols page of a {string} task") do |task_name| - visit_task_page(task_name) -end - Then(/^I should see "([^"]*)" attachment on "([^"]*)" step$/) do |file, step_name| wait_for_ajax expect(find('.step', text: step_name)).to have_content(file)