Commit 2a6672812fc90af95c407b17a12ba18d6767f69b
1 parent
31742a3b
Exists in
master
and in
29 other branches
accept_member.feature
Showing
4 changed files
with
22 additions
and
17 deletions
Show diff stats
features/accept_member.feature
@@ -17,7 +17,7 @@ Feature: accept member | @@ -17,7 +17,7 @@ Feature: accept member | ||
17 | Scenario: approve a task to accept a member as admin in a closed community | 17 | Scenario: approve a task to accept a member as admin in a closed community |
18 | Given "Marie Curie" asked to join "My Community" | 18 | Given "Marie Curie" asked to join "My Community" |
19 | And I am logged in as "mario" | 19 | And I am logged in as "mario" |
20 | - And I go to My Community's control panel | 20 | + And I go to mycommunity's control panel |
21 | And I follow "Process requests" | 21 | And I follow "Process requests" |
22 | And I should see "Marie Curie wants to be a member" | 22 | And I should see "Marie Curie wants to be a member" |
23 | When I choose "Accept" | 23 | When I choose "Accept" |
@@ -28,7 +28,7 @@ Feature: accept member | @@ -28,7 +28,7 @@ Feature: accept member | ||
28 | Scenario: approve a task to accept a member as member in a closed community | 28 | Scenario: approve a task to accept a member as member in a closed community |
29 | Given "Marie Curie" asked to join "My Community" | 29 | Given "Marie Curie" asked to join "My Community" |
30 | And I am logged in as "mario" | 30 | And I am logged in as "mario" |
31 | - And I go to My Community's control panel | 31 | + And I go to mycommunity's control panel |
32 | And I follow "Process requests" | 32 | And I follow "Process requests" |
33 | And I should see "Marie Curie wants to be a member" | 33 | And I should see "Marie Curie wants to be a member" |
34 | When I choose "Accept" | 34 | When I choose "Accept" |
@@ -39,7 +39,7 @@ Feature: accept member | @@ -39,7 +39,7 @@ Feature: accept member | ||
39 | Scenario: approve a task to accept a member as moderator in a closed community | 39 | Scenario: approve a task to accept a member as moderator in a closed community |
40 | Given "Marie Curie" asked to join "My Community" | 40 | Given "Marie Curie" asked to join "My Community" |
41 | And I am logged in as "mario" | 41 | And I am logged in as "mario" |
42 | - And I go to My Community's control panel | 42 | + And I go to mycommunity's control panel |
43 | And I follow "Process requests" | 43 | And I follow "Process requests" |
44 | And I should see "Marie Curie wants to be a member" | 44 | And I should see "Marie Curie wants to be a member" |
45 | When I choose "Accept" | 45 | When I choose "Accept" |
features/step_definitions/noosfero_steps.rb
@@ -289,17 +289,18 @@ Given /^the following price details?$/ do |table| | @@ -289,17 +289,18 @@ Given /^the following price details?$/ do |table| | ||
289 | end | 289 | end |
290 | 290 | ||
291 | Given /^I am logged in as "(.+)"$/ do |username| | 291 | Given /^I am logged in as "(.+)"$/ do |username| |
292 | - visit('/account/logout') | ||
293 | - visit('/account/login') | ||
294 | - fill_in("Username", :with => username) | ||
295 | - fill_in("Password", :with => '123456') | ||
296 | - click_button("Log in") | ||
297 | - # FIXME selenium do not wait page load sometimes | ||
298 | - if selenium_driver? | ||
299 | - selenium.wait_for_page | ||
300 | - end | ||
301 | - Then "I should be logged in as \"#{username}\"" | ||
302 | - @current_user = username | 292 | + Given %{I go to logout page} |
293 | + And %{I go to login page} | ||
294 | + And %{I fill in "Username" with "#{username}"} | ||
295 | + And %{I fill in "Password" with "123456"} | ||
296 | + When %{I press "Log in"} | ||
297 | + # FIXME: | ||
298 | + # deveria apenas verificar que esta no myprofile do usuario | ||
299 | + # nao conseguir fazer funcionar sem essa reduntancia no capybara | ||
300 | + # acho que e algum problema com o http_referer | ||
301 | + # olhar account_controller#store_location | ||
302 | + And %{I go to #{username}'s control panel} | ||
303 | + Then %{I should be on #{username}'s control panel} | ||
303 | end | 304 | end |
304 | 305 | ||
305 | Given /^I am logged in as admin$/ do | 306 | Given /^I am logged in as admin$/ do |
features/support/paths.rb
@@ -66,11 +66,14 @@ module NavigationHelpers | @@ -66,11 +66,14 @@ module NavigationHelpers | ||
66 | when /^login page$/ | 66 | when /^login page$/ |
67 | '/account/login' | 67 | '/account/login' |
68 | 68 | ||
69 | + when /^logout page$/ | ||
70 | + '/account/logout' | ||
71 | + | ||
69 | when /^signup page$/ | 72 | when /^signup page$/ |
70 | '/account/signup' | 73 | '/account/signup' |
71 | 74 | ||
72 | when /^(.*)'s control panel$/ | 75 | when /^(.*)'s control panel$/ |
73 | - '/myprofile/%s' % Profile.find_by_name($1).identifier | 76 | + '/myprofile/' + $1 |
74 | 77 | ||
75 | when /^the Control panel$/ | 78 | when /^the Control panel$/ |
76 | '/myprofile/%s' % User.find_by_id(session[:user]).login | 79 | '/myprofile/%s' % User.find_by_id(session[:user]).login |
lib/noosfero.rb
1 | +# -*- coding: utf-8 -*- | ||
1 | require 'fast_gettext' | 2 | require 'fast_gettext' |
2 | 3 | ||
3 | module Noosfero | 4 | module Noosfero |
@@ -80,8 +81,8 @@ module Noosfero | @@ -80,8 +81,8 @@ module Noosfero | ||
80 | def self.url_options | 81 | def self.url_options |
81 | if ENV['RAILS_ENV'] == 'development' | 82 | if ENV['RAILS_ENV'] == 'development' |
82 | development_url_options | 83 | development_url_options |
83 | - elsif ENV['RAILS_ENV'] == 'cucumber' | ||
84 | - Webrat.configuration.mode == :rails ? { :host => '' } : { :port => Webrat.configuration.application_port } | 84 | + # elsif ENV['RAILS_ENV'] == 'cucumber' |
85 | + # Webrat.configuration.mode == :rails ? { :host => '' } : { :port => Webrat.configuration.application_port } | ||
85 | else | 86 | else |
86 | {} | 87 | {} |
87 | end | 88 | end |