From caaa02b0c1c58bbfec55f6ca77fc73807b0aa31b Mon Sep 17 00:00:00 2001 From: Diego Araújo + Guilherme Rojas Date: Tue, 26 Feb 2013 16:10:33 -0300 Subject: [PATCH] [Mezuro] Created step for configuration without clone. --- features/step_definitions/mezuro_steps.rb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/features/step_definitions/mezuro_steps.rb b/features/step_definitions/mezuro_steps.rb index f4e75ad..ea82480 100644 --- a/features/step_definitions/mezuro_steps.rb +++ b/features/step_definitions/mezuro_steps.rb @@ -1,11 +1,24 @@ -When /^I create a Mezuro (project|configuration|reading group) with the following data$/ do |type, fields| +When /^I create a Mezuro (project|reading group) with the following data$/ do |type, fields| click_link ("Mezuro " + type) fields.rows_hash.each do |name, value| When %{I fill in "#{name}" with "#{value}"} end - click_button "Save" # Does not work without selenium? + click_button "Save" + Article.find_by_name(fields.rows_hash[:Title]) +end + +When /^I create a Mezuro configuration with the following data$/ do |fields| + click_link ("Mezuro configuration") + + fields.rows_hash.each do |name, value| + if name != "Clone" + When %{I fill in "#{name}" with "#{value}"} + end + end + + click_button "Save" Article.find_by_name(fields.rows_hash[:Title]) end -- libgit2 0.21.2