From 40da8f5a8d5c624495c7eb1e4a693c5a04e41901 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 27 Mar 2013 17:00:50 +0000 Subject: [PATCH] Fixing test: features/invitation.feature --- features/invitation.feature | 12 ++++++++++++ features/step_definitions/invitation_steps.rb | 2 ++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/features/invitation.feature b/features/invitation.feature index 830c95c..a1d3dc2 100644 --- a/features/invitation.feature +++ b/features/invitation.feature @@ -32,11 +32,13 @@ Feature: invitation When I am on /profile/josesilva/invite/friends Then I should see "Invite your friends" + @selenium Scenario: back to friends after invite friends Given I am on /myprofile/josesilva/friends And I follow "Invite people from my e-mail contacts" And I press "Next" And I fill in "manual_import_addresses" with "misfits@devil.doll" + And I follow "Personalize invitation mail" And I fill in "mail_template" with "Follow this link " When I press "Invite my friends!" Then I should be on /profile/josesilva/friends @@ -72,20 +74,24 @@ Feature: invitation Given I am on Beatles For Sale's members management Then I should not see "Invite your friends to join Beatles For Sale" link + @selenium Scenario: back to members after invite friends to join a community Given I am on 26 Bsslines's members management And I follow "Invite your friends to join 26 Bsslines" And I press "Next" And I fill in "manual_import_addresses" with "misfits@devil.doll" + And I follow "Personalize invitation mail" And I fill in "mail_template" with "Follow this link " When I press "Invite my friends!" Then I should be on /profile/26-bsslines/members + @selenium Scenario: noosfero user receives a task when a user invites to join a community Given I am on 26 Bsslines's members management And I follow "Invite your friends to join 26 Bsslines" And I press "Next" And I fill in "manual_import_addresses" with "santos@invalid.br" + And I follow "Personalize invitation mail" And I fill in "mail_template" with "Follow this link " And I press "Invite my friends!" Given there are no pending jobs @@ -93,6 +99,7 @@ Feature: invitation And I go to josesantos's control panel And I should see "josesilva invited you to join 26 Bsslines." + @selenium Scenario: noosfero user accepts to join community Given I invite email "santos@invalid.br" to join community "26 Bsslines" And there are no pending jobs @@ -107,6 +114,7 @@ Feature: invitation And I follow "Manage my groups" Then I should see "26 Bsslines" + @selenium Scenario: noosfero user rejects to join community Given I invite email "santos@invalid.br" to join community "26 Bsslines" And there are no pending jobs @@ -121,12 +129,14 @@ Feature: invitation And I follow "Manage my groups" Then I should not see "26 Bsslines" + @selenium Scenario: noosfero user receives a task when a user invites to be friend Given I am on josesilva's control panel And I follow "Manage friends" And I follow "Invite people from my e-mail contacts" And I press "Next" And I fill in "manual_import_addresses" with "santos@invalid.br" + And I follow "Personalize invitation mail" And I fill in "mail_template" with "Follow this link " And I press "Invite my friends!" Given there are no pending jobs @@ -135,6 +145,7 @@ Feature: invitation And I follow "Process requests" Then I should see "josesilva wants to be your friend." + @selenium Scenario: noosfero user accepts to be friend Given I am logged in as "josesilva" And I go to josesilva's control panel @@ -151,6 +162,7 @@ Feature: invitation And I follow "Manage friends" Then I should see "josesilva" + @selenium Scenario: noosfero user rejects to be friend Given I am logged in as "josesilva" And I go to josesilva's control panel diff --git a/features/step_definitions/invitation_steps.rb b/features/step_definitions/invitation_steps.rb index e67397f..0468328 100644 --- a/features/step_definitions/invitation_steps.rb +++ b/features/step_definitions/invitation_steps.rb @@ -4,6 +4,7 @@ Given /^I invite email "(.+)" to join community "(.+)"$/ do |email, community| click_link('Invite your friends to join 26 Bsslines') click_button('Next') fill_in('manual_import_addresses', :with => "#{email}") + click_link('Personalize invitation mail') fill_in('mail_template', :with => 'Follow this link ') click_button("Invite my friends!") end @@ -13,6 +14,7 @@ Given /^I invite email "(.+)" to be my friend$/ do |email| click_link('Invite people from my e-mail contacts') click_button('Next') fill_in('manual_import_addresses', :with => "#{email}") + click_link('Personalize invitation mail') fill_in('mail_template', :with => 'Follow this link ') click_button("Invite my friends!") end -- libgit2 0.21.2