Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
99679bc6
Commit
99679bc6
authored
Jan 15, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for Forks listing.
parent
833a0f4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
features/project/fork.feature
features/project/fork.feature
+15
-0
features/steps/project/fork.rb
features/steps/project/fork.rb
+25
-0
No files found.
features/project/fork.feature
View file @
99679bc6
...
@@ -25,3 +25,18 @@ Feature: Project Fork
...
@@ -25,3 +25,18 @@ Feature: Project Fork
Then
I should see
"New merge request"
Then
I should see
"New merge request"
And
I click link
"New merge request"
And
I click link
"New merge request"
Then
I should see the new merge request page for my namespace
Then
I should see the new merge request page for my namespace
Scenario
:
Viewing forks of a Project
Given
I click link
"Fork"
When
I fork to my namespace
And
I visit the forks page of the
"Shop"
project
Then
I should see my fork on the list
Scenario
:
Viewing private forks of a Project
Given
There is an existent fork of the
"Shop"
project
And
I click link
"Fork"
When
I fork to my namespace
And
I visit the forks page of the
"Shop"
project
Then
I should see my fork on the list
And
I should not see the other fork listed
And
I should see a private fork notice
features/steps/project/fork.rb
View file @
99679bc6
...
@@ -49,4 +49,29 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
...
@@ -49,4 +49,29 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
step
'I should see the new merge request page for my namespace'
do
step
'I should see the new merge request page for my namespace'
do
current_path
.
should
have_content
(
/
#{
current_user
.
namespace
.
name
}
/i
)
current_path
.
should
have_content
(
/
#{
current_user
.
namespace
.
name
}
/i
)
end
end
step
'I visit the forks page of the "Shop" project'
do
@project
=
Project
.
where
(
name:
'Shop'
).
last
visit
namespace_project_forks_path
(
@project
.
namespace
,
@project
)
end
step
'I should see my fork on the list'
do
page
.
within
(
'.projects-list-holder'
)
do
project
=
@user
.
fork_of
(
@project
)
expect
(
page
).
to
have_content
(
"
#{
project
.
namespace
.
human_name
}
/
#{
project
.
name
}
"
)
end
end
step
'There is an existent fork of the "Shop" project'
do
user
=
create
(
:user
,
name:
'Mike'
)
@forked_project
=
Projects
::
ForkService
.
new
(
@project
,
user
).
execute
end
step
'I should not see the other fork listed'
do
expect
(
page
).
not_to
have_content
(
"
#{
@forked_project
.
namespace
.
human_name
}
/
#{
@forked_project
.
name
}
"
)
end
step
'I should see a private fork notice'
do
expect
(
page
).
to
have_content
(
"1 private fork"
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment