Commit 50918e28d630c1980e1eae3f6559fbff32bc04bf
1 parent
504ccb3d
Exists in
master
and in
29 other branches
invitation.feature
Showing
3 changed files
with
19 additions
and
26 deletions
Show diff stats
features/invitation.feature
... | ... | @@ -46,8 +46,7 @@ Feature: invitation |
46 | 46 | Then I should see "Invite your friends to join 26 Bsslines" link |
47 | 47 | |
48 | 48 | Scenario: not see link to invite members to community if has no rights |
49 | - Given I am not logged in | |
50 | - And I am logged in as "josesantos" | |
49 | + Given I am logged in as "josesantos" | |
51 | 50 | When I am on /profile/26-bsslines/members |
52 | 51 | Then I should not see "Invite your friends to join 26 Bsslines" link |
53 | 52 | |
... | ... | @@ -65,8 +64,7 @@ Feature: invitation |
65 | 64 | Then I should not see "Invite your friends to join Beatles For Sale" link |
66 | 65 | |
67 | 66 | Scenario: deny access if user has no right to invite members |
68 | - Given I am not logged in | |
69 | - And I am logged in as "josesantos" | |
67 | + Given I am logged in as "josesantos" | |
70 | 68 | When I am on /profile/26-bsslines/invite/friends |
71 | 69 | Then I should see "Access denied" |
72 | 70 | |
... | ... | @@ -92,20 +90,20 @@ Feature: invitation |
92 | 90 | And I press "Invite my friends!" |
93 | 91 | Given there are no pending jobs |
94 | 92 | When I am logged in as "josesantos" |
95 | - And I go to the Control panel | |
93 | + And I go to josesantos's control panel | |
96 | 94 | And I should see "josesilva invited you to join 26 Bsslines." |
97 | 95 | |
98 | 96 | Scenario: noosfero user accepts to join community |
99 | 97 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" |
100 | 98 | And there are no pending jobs |
101 | 99 | When I am logged in as "josesantos" |
102 | - And I go to the Control panel | |
100 | + And I go to josesantos's control panel | |
103 | 101 | And I follow "Process requests" |
104 | 102 | And I should see "josesilva invited you to join 26 Bsslines." |
105 | 103 | And I choose "Accept" |
106 | 104 | When I press "Apply!" |
107 | 105 | Then I should not see "josesilva invited you to join 26 Bsslines." |
108 | - When I go to the Control panel | |
106 | + When I go to josesantos's control panel | |
109 | 107 | And I follow "Manage my groups" |
110 | 108 | Then I should see "26 Bsslines" |
111 | 109 | |
... | ... | @@ -113,19 +111,19 @@ Feature: invitation |
113 | 111 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" |
114 | 112 | And there are no pending jobs |
115 | 113 | When I am logged in as "josesantos" |
116 | - And I go to the Control panel | |
114 | + And I go to josesantos's control panel | |
117 | 115 | And I follow "Process requests" |
118 | 116 | And I should see "josesilva invited you to join 26 Bsslines." |
119 | 117 | And I choose "Reject" |
120 | 118 | When I press "Apply!" |
121 | 119 | Then I should not see "josesilva invited you to join 26 Bsslines." |
122 | - When I go to the Control panel | |
120 | + And I go to josesantos's control panel | |
123 | 121 | And I follow "Manage my groups" |
124 | 122 | Then I should not see "26 Bsslines" |
125 | 123 | |
126 | 124 | Scenario: noosfero user receives a task when a user invites to be friend |
127 | 125 | Given I am on josesilva's control panel |
128 | - And I follow "Manage Friends" | |
126 | + And I follow "Manage friends" | |
129 | 127 | And I follow "Invite people from my e-mail contacts" |
130 | 128 | And I press "Next" |
131 | 129 | And I fill in "manual_import_addresses" with "santos@invalid.br" |
... | ... | @@ -133,34 +131,38 @@ Feature: invitation |
133 | 131 | And I press "Invite my friends!" |
134 | 132 | Given there are no pending jobs |
135 | 133 | When I am logged in as "josesantos" |
136 | - And I go to the Control panel | |
134 | + And I go to josesantos's control panel | |
137 | 135 | And I follow "Process requests" |
138 | 136 | Then I should see "josesilva wants to be your friend." |
139 | 137 | |
140 | 138 | Scenario: noosfero user accepts to be friend |
141 | - Given I invite email "santos@invalid.br" to be my friend | |
139 | + Given I am logged in as "josesilva" | |
140 | + And I go to josesilva's control panel | |
141 | + And I invite email "santos@invalid.br" to be my friend | |
142 | 142 | And there are no pending jobs |
143 | 143 | When I am logged in as "josesantos" |
144 | - And I go to the Control panel | |
144 | + And I go to josesantos's control panel | |
145 | 145 | And I follow "Process requests" |
146 | 146 | And I should see "josesilva wants to be your friend." |
147 | 147 | And I choose "Accept" |
148 | 148 | When I press "Apply!" |
149 | 149 | And I should not see "josesilva wants to be your friend." |
150 | - When I go to the Control panel | |
150 | + When I go to josesantos's control panel | |
151 | 151 | And I follow "Manage friends" |
152 | 152 | Then I should see "josesilva" |
153 | 153 | |
154 | 154 | Scenario: noosfero user rejects to be friend |
155 | - Given I invite email "santos@invalid.br" to be my friend | |
155 | + Given I am logged in as "josesilva" | |
156 | + And I go to josesilva's control panel | |
157 | + And I invite email "santos@invalid.br" to be my friend | |
156 | 158 | And there are no pending jobs |
157 | 159 | When I am logged in as "josesantos" |
158 | - And I go to the Control panel | |
160 | + And I go to josesantos's control panel | |
159 | 161 | And I follow "Process requests" |
160 | 162 | And I should see "josesilva wants to be your friend." |
161 | 163 | And I choose "Reject" |
162 | 164 | When I press "Apply!" |
163 | 165 | And I should not see "josesilva wants to be your friend." |
164 | - When I go to the Control panel | |
166 | + When I go to josesantos's control panel | |
165 | 167 | And I follow "Manage friends" |
166 | 168 | Then I should not see "josesilva" | ... | ... |
features/step_definitions/invitation_steps.rb
... | ... | @@ -9,7 +9,6 @@ Given /^I invite email "(.+)" to join community "(.+)"$/ do |email, community| |
9 | 9 | end |
10 | 10 | |
11 | 11 | Given /^I invite email "(.+)" to be my friend$/ do |email| |
12 | - Given "I go to the Control panel" | |
13 | 12 | click_link('Manage friends') |
14 | 13 | click_link('Invite people from my e-mail contacts') |
15 | 14 | click_button('Next') | ... | ... |
features/step_definitions/noosfero_steps.rb
... | ... | @@ -443,14 +443,6 @@ Given /^the following environment configuration$/ do |table| |
443 | 443 | env.save |
444 | 444 | end |
445 | 445 | |
446 | -Then /^I should be logged in as "(.+)"$/ do |login| | |
447 | - User.find(session[:user]).login.should == login | |
448 | -end | |
449 | - | |
450 | -Then /^I should not be logged in$/ do | |
451 | - session[:user].nil? | |
452 | -end | |
453 | - | |
454 | 446 | Given /^the profile "(.+)" has no blocks$/ do |profile| |
455 | 447 | profile = Profile[profile] |
456 | 448 | profile.boxes.map do |box| | ... | ... |