Commit db88797e authored by Marin Jankovski's avatar Marin Jankovski

Fix test

parent 26d1bd7c
......@@ -29,4 +29,5 @@ Feature: Project Redirects
When I visit project "Community" page
And I should see project "Community" home page
And I click on "Sign In"
And Authenticate
Then I should be redirected to "Community" page
......@@ -33,7 +33,19 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
end
step 'I click on "Sign In"' do
click_link "Sign in"
within '.pull-right' do
click_link "Sign in"
end
end
step 'Authenticate' do
admin = create(:admin)
project = Project.find_by(name: 'Community')
find(:xpath, "//input[@id='return_to']").set "/#{project.path_with_namespace}"
fill_in "user_login", with: admin.email
fill_in "user_password", with: admin.password
click_button "Sign in"
Thread.current[:current_user] = admin
end
step 'I should be redirected to "Community" page' do
......
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