Commit 70b6f54c731af0c844c40ff5d2258e629fa8f97a

Authored by Alessandro Palmeira
Committed by Paulo Meireles
2 parents dbae4eee caaa02b0

Merge branch 'acceptance' of gitorious.org:+mezuro/noosfero/mezuro into acceptance

Showing 1 changed file with 15 additions and 2 deletions   Show diff stats
features/step_definitions/mezuro_steps.rb
1 -When /^I create a Mezuro (project|configuration|reading group) with the following data$/ do |type, fields| 1 +When /^I create a Mezuro (project|reading group) with the following data$/ do |type, fields|
2 click_link ("Mezuro " + type) 2 click_link ("Mezuro " + type)
3 3
4 fields.rows_hash.each do |name, value| 4 fields.rows_hash.each do |name, value|
5 When %{I fill in "#{name}" with "#{value}"} 5 When %{I fill in "#{name}" with "#{value}"}
6 end 6 end
7 7
8 - click_button "Save" # Does not work without selenium? 8 + click_button "Save"
  9 + Article.find_by_name(fields.rows_hash[:Title])
  10 +end
  11 +
  12 +When /^I create a Mezuro configuration with the following data$/ do |fields|
  13 + click_link ("Mezuro configuration")
  14 +
  15 + fields.rows_hash.each do |name, value|
  16 + if name != "Clone"
  17 + When %{I fill in "#{name}" with "#{value}"}
  18 + end
  19 + end
  20 +
  21 + click_button "Save"
9 Article.find_by_name(fields.rows_hash[:Title]) 22 Article.find_by_name(fields.rows_hash[:Title])
10 end 23 end
11 24