Commit 49fcbdbd1e0c7405c819cecedf54029b4541fcc2

Authored by Dmitriy Zaporozhets
1 parent 6c0fd9f2

Test user page with spinach

app/views/layouts/_head_panel.html.haml
@@ -36,6 +36,6 @@ @@ -36,6 +36,6 @@
36 = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do 36 = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
37 %i.icon-signout 37 %i.icon-signout
38 %li 38 %li
39 - = link_to current_user, class: "profile-pic" do 39 + = link_to current_user, class: "profile-pic", id: 'profile-pic' do
40 = image_tag gravatar_icon(current_user.email, 26) 40 = image_tag gravatar_icon(current_user.email, 26)
41 41
features/profile/profile.feature
@@ -38,6 +38,11 @@ Feature: Profile @@ -38,6 +38,11 @@ Feature: Profile
38 When I visit profile history page 38 When I visit profile history page
39 Then I should see my activity 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 @javascript 46 @javascript
42 Scenario: I change my application theme 47 Scenario: I change my application theme
43 Given I visit profile design page 48 Given I visit profile design page
features/steps/profile/profile.rb
@@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps @@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps
104 step 'I redirected to sign in page' do 104 step 'I redirected to sign in page' do
105 current_path.should == new_user_session_path 105 current_path.should == new_user_session_path
106 end 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 end 119 end