Commit 49fcbdbd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Test user page with spinach

parent 6c0fd9f2
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
= link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
%i.icon-signout %i.icon-signout
%li %li
= link_to current_user, class: "profile-pic" do = link_to current_user, class: "profile-pic", id: 'profile-pic' do
= image_tag gravatar_icon(current_user.email, 26) = image_tag gravatar_icon(current_user.email, 26)
...@@ -38,6 +38,11 @@ Feature: Profile ...@@ -38,6 +38,11 @@ Feature: Profile
When I visit profile history page When I visit profile history page
Then I should see my activity Then I should see my activity
Scenario: I visit my user page
When I visit profile page
And I click on my profile picture
Then I should see my user page
@javascript @javascript
Scenario: I change my application theme Scenario: I change my application theme
Given I visit profile design page Given I visit profile design page
......
...@@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps ...@@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps
step 'I redirected to sign in page' do step 'I redirected to sign in page' do
current_path.should == new_user_session_path current_path.should == new_user_session_path
end end
step 'I click on my profile picture' do
click_link 'profile-pic'
end
step 'I should see my user page' do
page.should have_content "User Activity"
within '.navbar-gitlab' do
page.should have_content current_user.name
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment