Commit 40da8f5a8d5c624495c7eb1e4a693c5a04e41901

Authored by Rodrigo Souto
1 parent 0f9a0985

Fixing test: features/invitation.feature

features/invitation.feature
@@ -32,11 +32,13 @@ Feature: invitation @@ -32,11 +32,13 @@ Feature: invitation
32 When I am on /profile/josesilva/invite/friends 32 When I am on /profile/josesilva/invite/friends
33 Then I should see "Invite your friends" 33 Then I should see "Invite your friends"
34 34
  35 + @selenium
35 Scenario: back to friends after invite friends 36 Scenario: back to friends after invite friends
36 Given I am on /myprofile/josesilva/friends 37 Given I am on /myprofile/josesilva/friends
37 And I follow "Invite people from my e-mail contacts" 38 And I follow "Invite people from my e-mail contacts"
38 And I press "Next" 39 And I press "Next"
39 And I fill in "manual_import_addresses" with "misfits@devil.doll" 40 And I fill in "manual_import_addresses" with "misfits@devil.doll"
  41 + And I follow "Personalize invitation mail"
40 And I fill in "mail_template" with "Follow this link <url>" 42 And I fill in "mail_template" with "Follow this link <url>"
41 When I press "Invite my friends!" 43 When I press "Invite my friends!"
42 Then I should be on /profile/josesilva/friends 44 Then I should be on /profile/josesilva/friends
@@ -72,20 +74,24 @@ Feature: invitation @@ -72,20 +74,24 @@ Feature: invitation
72 Given I am on Beatles For Sale's members management 74 Given I am on Beatles For Sale's members management
73 Then I should not see "Invite your friends to join Beatles For Sale" link 75 Then I should not see "Invite your friends to join Beatles For Sale" link
74 76
  77 + @selenium
75 Scenario: back to members after invite friends to join a community 78 Scenario: back to members after invite friends to join a community
76 Given I am on 26 Bsslines's members management 79 Given I am on 26 Bsslines's members management
77 And I follow "Invite your friends to join 26 Bsslines" 80 And I follow "Invite your friends to join 26 Bsslines"
78 And I press "Next" 81 And I press "Next"
79 And I fill in "manual_import_addresses" with "misfits@devil.doll" 82 And I fill in "manual_import_addresses" with "misfits@devil.doll"
  83 + And I follow "Personalize invitation mail"
80 And I fill in "mail_template" with "Follow this link <url>" 84 And I fill in "mail_template" with "Follow this link <url>"
81 When I press "Invite my friends!" 85 When I press "Invite my friends!"
82 Then I should be on /profile/26-bsslines/members 86 Then I should be on /profile/26-bsslines/members
83 87
  88 + @selenium
84 Scenario: noosfero user receives a task when a user invites to join a community 89 Scenario: noosfero user receives a task when a user invites to join a community
85 Given I am on 26 Bsslines's members management 90 Given I am on 26 Bsslines's members management
86 And I follow "Invite your friends to join 26 Bsslines" 91 And I follow "Invite your friends to join 26 Bsslines"
87 And I press "Next" 92 And I press "Next"
88 And I fill in "manual_import_addresses" with "santos@invalid.br" 93 And I fill in "manual_import_addresses" with "santos@invalid.br"
  94 + And I follow "Personalize invitation mail"
89 And I fill in "mail_template" with "Follow this link <url>" 95 And I fill in "mail_template" with "Follow this link <url>"
90 And I press "Invite my friends!" 96 And I press "Invite my friends!"
91 Given there are no pending jobs 97 Given there are no pending jobs
@@ -93,6 +99,7 @@ Feature: invitation @@ -93,6 +99,7 @@ Feature: invitation
93 And I go to josesantos's control panel 99 And I go to josesantos's control panel
94 And I should see "josesilva invited you to join 26 Bsslines." 100 And I should see "josesilva invited you to join 26 Bsslines."
95 101
  102 + @selenium
96 Scenario: noosfero user accepts to join community 103 Scenario: noosfero user accepts to join community
97 Given I invite email "santos@invalid.br" to join community "26 Bsslines" 104 Given I invite email "santos@invalid.br" to join community "26 Bsslines"
98 And there are no pending jobs 105 And there are no pending jobs
@@ -107,6 +114,7 @@ Feature: invitation @@ -107,6 +114,7 @@ Feature: invitation
107 And I follow "Manage my groups" 114 And I follow "Manage my groups"
108 Then I should see "26 Bsslines" 115 Then I should see "26 Bsslines"
109 116
  117 + @selenium
110 Scenario: noosfero user rejects to join community 118 Scenario: noosfero user rejects to join community
111 Given I invite email "santos@invalid.br" to join community "26 Bsslines" 119 Given I invite email "santos@invalid.br" to join community "26 Bsslines"
112 And there are no pending jobs 120 And there are no pending jobs
@@ -121,12 +129,14 @@ Feature: invitation @@ -121,12 +129,14 @@ Feature: invitation
121 And I follow "Manage my groups" 129 And I follow "Manage my groups"
122 Then I should not see "26 Bsslines" 130 Then I should not see "26 Bsslines"
123 131
  132 + @selenium
124 Scenario: noosfero user receives a task when a user invites to be friend 133 Scenario: noosfero user receives a task when a user invites to be friend
125 Given I am on josesilva's control panel 134 Given I am on josesilva's control panel
126 And I follow "Manage friends" 135 And I follow "Manage friends"
127 And I follow "Invite people from my e-mail contacts" 136 And I follow "Invite people from my e-mail contacts"
128 And I press "Next" 137 And I press "Next"
129 And I fill in "manual_import_addresses" with "santos@invalid.br" 138 And I fill in "manual_import_addresses" with "santos@invalid.br"
  139 + And I follow "Personalize invitation mail"
130 And I fill in "mail_template" with "Follow this link <url>" 140 And I fill in "mail_template" with "Follow this link <url>"
131 And I press "Invite my friends!" 141 And I press "Invite my friends!"
132 Given there are no pending jobs 142 Given there are no pending jobs
@@ -135,6 +145,7 @@ Feature: invitation @@ -135,6 +145,7 @@ Feature: invitation
135 And I follow "Process requests" 145 And I follow "Process requests"
136 Then I should see "josesilva wants to be your friend." 146 Then I should see "josesilva wants to be your friend."
137 147
  148 + @selenium
138 Scenario: noosfero user accepts to be friend 149 Scenario: noosfero user accepts to be friend
139 Given I am logged in as "josesilva" 150 Given I am logged in as "josesilva"
140 And I go to josesilva's control panel 151 And I go to josesilva's control panel
@@ -151,6 +162,7 @@ Feature: invitation @@ -151,6 +162,7 @@ Feature: invitation
151 And I follow "Manage friends" 162 And I follow "Manage friends"
152 Then I should see "josesilva" 163 Then I should see "josesilva"
153 164
  165 + @selenium
154 Scenario: noosfero user rejects to be friend 166 Scenario: noosfero user rejects to be friend
155 Given I am logged in as "josesilva" 167 Given I am logged in as "josesilva"
156 And I go to josesilva's control panel 168 And I go to josesilva's control panel
features/step_definitions/invitation_steps.rb
@@ -4,6 +4,7 @@ Given /^I invite email &quot;(.+)&quot; to join community &quot;(.+)&quot;$/ do |email, community| @@ -4,6 +4,7 @@ Given /^I invite email &quot;(.+)&quot; to join community &quot;(.+)&quot;$/ do |email, community|
4 click_link('Invite your friends to join 26 Bsslines') 4 click_link('Invite your friends to join 26 Bsslines')
5 click_button('Next') 5 click_button('Next')
6 fill_in('manual_import_addresses', :with => "#{email}") 6 fill_in('manual_import_addresses', :with => "#{email}")
  7 + click_link('Personalize invitation mail')
7 fill_in('mail_template', :with => 'Follow this link <url>') 8 fill_in('mail_template', :with => 'Follow this link <url>')
8 click_button("Invite my friends!") 9 click_button("Invite my friends!")
9 end 10 end
@@ -13,6 +14,7 @@ Given /^I invite email &quot;(.+)&quot; to be my friend$/ do |email| @@ -13,6 +14,7 @@ Given /^I invite email &quot;(.+)&quot; to be my friend$/ do |email|
13 click_link('Invite people from my e-mail contacts') 14 click_link('Invite people from my e-mail contacts')
14 click_button('Next') 15 click_button('Next')
15 fill_in('manual_import_addresses', :with => "#{email}") 16 fill_in('manual_import_addresses', :with => "#{email}")
  17 + click_link('Personalize invitation mail')
16 fill_in('mail_template', :with => 'Follow this link <url>') 18 fill_in('mail_template', :with => 'Follow this link <url>')
17 click_button("Invite my friends!") 19 click_button("Invite my friends!")
18 end 20 end