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
Jérome Perrin
gitlab-ce
Commits
02cddaea
Commit
02cddaea
authored
Jun 01, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for pipeline in MR from fork
parent
24c0f0d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
8 deletions
+38
-8
spec/features/merge_requests/created_from_fork_spec.rb
spec/features/merge_requests/created_from_fork_spec.rb
+38
-8
No files found.
spec/features/merge_requests/created_from_fork_spec.rb
View file @
02cddaea
...
@@ -9,20 +9,50 @@ feature 'Merge request created from fork' do
...
@@ -9,20 +9,50 @@ feature 'Merge request created from fork' do
create
(
:forked_project_link
,
forked_to_project:
fork_project
,
create
(
:forked_project_link
,
forked_to_project:
fork_project
,
forked_from_project:
project
)
forked_from_project:
project
)
create
(
:merge_request
,
source_project:
fork_project
,
create
(
:merge_request
_with_diffs
,
source_project:
fork_project
,
target_project:
project
,
target_project:
project
,
description:
'Test merge request'
)
description:
'Test merge request'
)
end
end
before
do
background
do
project
.
team
<<
[
user
,
:master
]
fork_project
.
team
<<
[
user
,
:master
]
login_as
user
login_as
user
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
end
end
scenario
'user can access merge request'
do
scenario
'user can access merge request'
do
visit_merge_request
(
merge_request
)
expect
(
page
).
to
have_content
'Test merge request'
expect
(
page
).
to
have_content
'Test merge request'
end
end
context
'pipeline present in source project'
do
include
WaitForAjax
given
(
:pipeline
)
do
create
(
:ci_commit_with_two_jobs
,
project:
fork_project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
end
background
{
pipeline
.
create_builds
(
user
)
}
scenario
'user visits a pipelines page'
,
js:
true
do
visit_merge_request
(
merge_request
)
page
.
within
(
'.merge-request-tabs'
)
{
click_link
'Builds'
}
wait_for_ajax
page
.
within
(
'table.builds'
)
do
expect
(
page
).
to
have_content
'rspec'
expect
(
page
).
to
have_content
'spinach'
end
expect
(
find_link
(
'Cancel running'
)[
:href
])
.
to
include
fork_project
.
path_with_namespace
end
end
def
visit_merge_request
(
mr
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
mr
)
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