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