gitlab-org--gitlab-foss/features/steps/project/fork.rb
Dmitriy Zaporozhets 2388fdd7c6
Improve fork to namespaces feature
* Show namespace thumbnail differently if project was already forked
* Show loading spinner when click on fork
* Fork link navigates to personal namespace only if no manageable groups exists

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-14 16:06:39 +02:00

34 lines
938 B
Ruby

class Spinach::Features::ProjectFork < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
step 'I click link "Fork"' do
page.should have_content "Shop"
page.should have_content "Fork"
click_link "Fork"
end
step 'I am a member of project "Shop"' do
@project = create(:project, name: "Shop")
@project.team << [@user, :reporter]
end
step 'I should see the forked project page' do
page.should have_content "Project was successfully forked."
end
step 'I already have a project named "Shop" in my namespace' do
@my_project = create(:project, name: "Shop", namespace: current_user.namespace)
end
step 'I should see a "Name has already been taken" warning' do
page.should have_content "Name has already been taken"
end
step 'I fork to my namespace' do
within '.fork-namespaces' do
click_link current_user.name
end
end
end