Commit 49fcbdbd1e0c7405c819cecedf54029b4541fcc2
1 parent
6c0fd9f2
Exists in
master
and in
4 other branches
Test user page with spinach
Showing
3 changed files
with
18 additions
and
1 deletions
Show diff stats
app/views/layouts/_head_panel.html.haml
... | ... | @@ -36,6 +36,6 @@ |
36 | 36 | = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do |
37 | 37 | %i.icon-signout |
38 | 38 | %li |
39 | - = link_to current_user, class: "profile-pic" do | |
39 | + = link_to current_user, class: "profile-pic", id: 'profile-pic' do | |
40 | 40 | = image_tag gravatar_icon(current_user.email, 26) |
41 | 41 | ... | ... |
features/profile/profile.feature
... | ... | @@ -38,6 +38,11 @@ Feature: Profile |
38 | 38 | When I visit profile history page |
39 | 39 | Then I should see my activity |
40 | 40 | |
41 | + Scenario: I visit my user page | |
42 | + When I visit profile page | |
43 | + And I click on my profile picture | |
44 | + Then I should see my user page | |
45 | + | |
41 | 46 | @javascript |
42 | 47 | Scenario: I change my application theme |
43 | 48 | Given I visit profile design page | ... | ... |
features/steps/profile/profile.rb
... | ... | @@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps |
104 | 104 | step 'I redirected to sign in page' do |
105 | 105 | current_path.should == new_user_session_path |
106 | 106 | end |
107 | + | |
108 | + step 'I click on my profile picture' do | |
109 | + click_link 'profile-pic' | |
110 | + end | |
111 | + | |
112 | + step 'I should see my user page' do | |
113 | + page.should have_content "User Activity" | |
114 | + | |
115 | + within '.navbar-gitlab' do | |
116 | + page.should have_content current_user.name | |
117 | + end | |
118 | + end | |
107 | 119 | end | ... | ... |