blob: e98bd51ca89265077b3a11b3f5cbfbfb525a79b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
class Spinach::Features::ProjectFork < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
step 'I click link "Fork"' do
expect(page).to have_content "Shop"
click_link "Fork project"
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
step 'I should see "New merge request"' do
expect(page).to have_content(/new merge request/i)
end
step 'I goto the Merge Requests page' do
page.within '.page-sidebar-expanded' do
click_link "Merge Requests"
end
end
step 'I click link "New merge request"' do
expect(page).to have_content(/new merge request/i)
click_link "New Merge Request"
end
step 'I should see the new merge request page for my namespace' do
current_path.should have_content(/#{current_user.namespace.name}/i)
end
end
|