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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
53832eff
Commit
53832eff
authored
Mar 09, 2021
by
Samantha Ming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec for creating fork
Issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/323301
parent
2054a1e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
spec/features/projects/fork_spec.rb
spec/features/projects/fork_spec.rb
+44
-0
No files found.
spec/features/projects/fork_spec.rb
View file @
53832eff
...
...
@@ -118,6 +118,50 @@ RSpec.describe 'Project fork' do
it_behaves_like
'fork button on project page'
it_behaves_like
'create fork page'
,
'Fork project'
context
'fork form'
,
:js
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:user
)
{
create
(
:group_member
,
:maintainer
,
user:
create
(
:user
),
group:
group
).
user
}
def
submit_form
select
(
group
.
name
)
click_button
'Fork project'
end
it
'forks the project'
,
:sidekiq_might_not_need_inline
do
visit
new_project_fork_path
(
project
)
submit_form
expect
(
page
).
to
have_content
'Forked from'
end
it
'shows the new forked project on the forks page'
do
visit
new_project_fork_path
(
project
)
submit_form
wait_for_requests
visit
project_forks_path
(
project
)
page
.
within
(
'.js-projects-list-holder'
)
do
expect
(
page
).
to
have_content
(
"
#{
group
.
name
}
/
#{
project
.
name
}
"
)
end
end
it
'shows the filled in info forked project on the forks page'
do
fork_name
=
'some-name'
visit
new_project_fork_path
(
project
)
fill_in
(
'fork-name'
,
with:
fork_name
,
fill_options:
{
clear: :backspace
})
fill_in
(
'fork-slug'
,
with:
fork_name
,
fill_options:
{
clear: :backspace
})
submit_form
wait_for_requests
visit
project_forks_path
(
project
)
page
.
within
(
'.js-projects-list-holder'
)
do
expect
(
page
).
to
have_content
(
"
#{
group
.
name
}
/
#{
fork_name
}
"
)
end
end
end
context
'with fork_project_form feature flag disabled'
do
before
do
stub_feature_flags
(
fork_project_form:
false
)
...
...
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