Test user page with spinach

This commit is contained in:
Dmitriy Zaporozhets 2013-06-26 21:50:47 +03:00
parent 6c0fd9f29a
commit 49fcbdbd1e
3 changed files with 18 additions and 1 deletions

View File

@ -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
%i.icon-signout
%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)

View File

@ -38,6 +38,11 @@ Feature: Profile
When I visit profile history page
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
Scenario: I change my application theme
Given I visit profile design page

View File

@ -104,4 +104,16 @@ class Profile < Spinach::FeatureSteps
step 'I redirected to sign in page' do
current_path.should == new_user_session_path
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