9995f0806b
Use import_status to track async import status and give feedback to the user Closes #2388 Closes #2400
34 lines
938 B
Ruby
34 lines
938 B
Ruby
class Spinach::Features::ProjectFork < Spinach::FeatureSteps
|
|
include SharedAuthentication
|
|
include SharedPaths
|
|
include SharedProject
|
|
|
|
step 'I click link "Fork"' do
|
|
expect(page).to have_content "Shop"
|
|
expect(page).to 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
|
|
expect(page).to have_content "Forked from"
|
|
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
|
|
expect(page).to have_content "Name has already been taken"
|
|
end
|
|
|
|
step 'I fork to my namespace' do
|
|
page.within '.fork-namespaces' do
|
|
click_link current_user.name
|
|
end
|
|
end
|
|
end
|