Commit 973066e76dac1f6dae6c5356420abba7cb589462
1 parent
b8e81e55
Exists in
spb-stable
and in
3 other branches
Add tests for groups avatars check on user page
Showing
2 changed files
with
20 additions
and
0 deletions
Show diff stats
features/profile/profile.feature
@@ -6,6 +6,13 @@ Feature: Profile | @@ -6,6 +6,13 @@ Feature: Profile | ||
6 | Given I visit profile page | 6 | Given I visit profile page |
7 | Then I should see my profile info | 7 | Then I should see my profile info |
8 | 8 | ||
9 | + Scenario: I can see groups I belong to | ||
10 | + Given I have group with projects | ||
11 | + When I visit profile page | ||
12 | + And I click on my profile picture | ||
13 | + Then I should see my user page | ||
14 | + And I should see groups I belong to | ||
15 | + | ||
9 | Scenario: I edit profile | 16 | Scenario: I edit profile |
10 | Given I visit profile page | 17 | Given I visit profile page |
11 | Then I change my profile info | 18 | Then I change my profile info |
features/steps/profile/profile.rb
@@ -173,4 +173,17 @@ class Profile < Spinach::FeatureSteps | @@ -173,4 +173,17 @@ class Profile < Spinach::FeatureSteps | ||
173 | page.should have_content current_user.name | 173 | page.should have_content current_user.name |
174 | end | 174 | end |
175 | end | 175 | end |
176 | + | ||
177 | + step 'I have group with projects' do | ||
178 | + @group = create(:group) | ||
179 | + @group.add_owner(current_user) | ||
180 | + @project = create(:project, namespace: @group) | ||
181 | + @event = create(:closed_issue_event, project: @project) | ||
182 | + | ||
183 | + @project.team << [current_user, :master] | ||
184 | + end | ||
185 | + | ||
186 | + step 'I should see groups I belong to' do | ||
187 | + page.should have_css('.profile-groups-avatars', visible: true) | ||
188 | + end | ||
176 | end | 189 | end |