Commit 4b739c2f639b97d1bdc8ec0cedd91630f0c72191
Exists in
master
and in
23 other branches
Merge branch 'stable'
Conflicts: config/environments/cucumber.rb features/step_definitions/noosfero_steps.rb features/step_definitions/webrat_steps.rb features/support/paths.rb
Showing
4 changed files
with
22 additions
and
8 deletions
Show diff stats
features/step_definitions/noosfero_steps.rb
| @@ -78,7 +78,7 @@ Given /^I am logged in as admin$/ do | @@ -78,7 +78,7 @@ Given /^I am logged in as admin$/ do | ||
| 78 | click_button("Log in") | 78 | click_button("Log in") |
| 79 | end | 79 | end |
| 80 | 80 | ||
| 81 | -Given /^I am not logged in$/ do |username| | 81 | +Given /^I am not logged in$/ do |
| 82 | visit('/account/logout') | 82 | visit('/account/logout') |
| 83 | end | 83 | end |
| 84 | 84 | ||
| @@ -93,3 +93,7 @@ Given /^feature "(.+)" is disabled on environment$/ do |feature| | @@ -93,3 +93,7 @@ Given /^feature "(.+)" is disabled on environment$/ do |feature| | ||
| 93 | e.disable(feature) | 93 | e.disable(feature) |
| 94 | e.save | 94 | e.save |
| 95 | end | 95 | end |
| 96 | + | ||
| 97 | +Given /^"(.+)" should be a member of "(.+)"$/ do |person,profile| | ||
| 98 | + Profile.find_by_name(profile).members.should include(Person.find_by_name(person)) | ||
| 99 | +end |
features/step_definitions/webrat_steps.rb
| @@ -188,10 +188,3 @@ Then /^show me the page$/ do | @@ -188,10 +188,3 @@ Then /^show me the page$/ do | ||
| 188 | save_and_open_page | 188 | save_and_open_page |
| 189 | end | 189 | end |
| 190 | 190 | ||
| 191 | -When /^I should see "([^\"]+)" link$/ do |link| | ||
| 192 | - response.should have_selector("a", :content => link) | ||
| 193 | -end | ||
| 194 | - | ||
| 195 | -When /^I should not see "([^\"]+)" link$/ do |link| | ||
| 196 | - response.should_not have_selector("a", :content => link) | ||
| 197 | -end |
features/support/paths.rb
| @@ -23,6 +23,15 @@ module NavigationHelpers | @@ -23,6 +23,15 @@ module NavigationHelpers | ||
| 23 | block = BlogArchivesBlock.find(:all).select{|i| i.owner == owner}.first | 23 | block = BlogArchivesBlock.find(:all).select{|i| i.owner == owner}.first |
| 24 | "/myprofile/#{$1}/profile_design/edit/#{block.id}" | 24 | "/myprofile/#{$1}/profile_design/edit/#{block.id}" |
| 25 | 25 | ||
| 26 | + when /^(.*)'s homepage$/ | ||
| 27 | + '/%s' % Profile.find_by_name($1).identifier | ||
| 28 | + | ||
| 29 | + when /^login page$/ | ||
| 30 | + '/account/login' | ||
| 31 | + | ||
| 32 | + when /^(.*)'s control panel$/ | ||
| 33 | + '/myprofile/%s' % Profile.find_by_name($1).identifier | ||
| 34 | + | ||
| 26 | # Add more mappings here. | 35 | # Add more mappings here. |
| 27 | # Here is a more fancy example: | 36 | # Here is a more fancy example: |
| 28 | # | 37 | # |