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
iv
gitlab-ce
Commits
7b06c83c
Commit
7b06c83c
authored
Oct 23, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for MR index page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
fe6ec80e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+2
-1
features/project/merge_requests.feature
features/project/merge_requests.feature
+6
-0
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+13
-0
No files found.
app/views/projects/merge_requests/_merge_request.html.haml
View file @
7b06c83c
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
=
link_to_label
(
label
,
project:
merge_request
.
project
)
=
link_to_label
(
label
,
project:
merge_request
.
project
)
.pull-right.light
.pull-right.light
-
if
ci_commit
-
if
ci_commit
=
link_to
ci_status_path
(
ci_commit
),
class:
"c
#{
ci_status_color
(
ci_commit
)
}
"
do
=
link_to
ci_status_path
(
ci_commit
),
class:
"c
#{
ci_status_color
(
ci_commit
)
}
"
,
title:
"Build status:
#{
ci_commit
.
status
}
"
,
data:
{
toggle:
'tooltip'
,
placement:
'left'
}
do
=
ci_status_icon
(
ci_commit
)
=
ci_status_icon
(
ci_commit
)
-
if
merge_request
.
merged?
-
if
merge_request
.
merged?
%span
%span
...
...
features/project/merge_requests.feature
View file @
7b06c83c
...
@@ -10,6 +10,12 @@ Feature: Project Merge Requests
...
@@ -10,6 +10,12 @@ Feature: Project Merge Requests
Then
I should see
"Bug NS-04"
in merge requests
Then
I should see
"Bug NS-04"
in merge requests
And
I should not see
"Feature NS-03"
in merge requests
And
I should not see
"Feature NS-03"
in merge requests
Scenario
:
I
should see CI status for merge requests
Given
project
"Shop"
have
"Bug NS-05"
open merge request with diffs inside
Given
"Bug NS-05"
has CI status
When
I visit project
"Shop"
merge requests page
Then
I should see merge request
"Bug NS-05"
with CI status
Scenario
:
I
should see rejected merge requests
Scenario
:
I
should see rejected merge requests
Given
I click link
"Closed"
Given
I click link
"Closed"
Then
I should see
"Feature NS-03"
in merge requests
Then
I should see
"Feature NS-03"
in merge requests
...
...
features/steps/project/merge_requests.rb
View file @
7b06c83c
...
@@ -338,6 +338,19 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -338,6 +338,19 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect
(
page
).
to
have_content
(
'diff --git'
)
expect
(
page
).
to
have_content
(
'diff --git'
)
end
end
step
'"Bug NS-05" has CI status'
do
project
=
merge_request
.
source_project
project
.
enable_ci
ci_commit
=
create
:ci_commit
,
gl_project:
project
,
sha:
merge_request
.
last_commit
.
id
create
:ci_build
,
commit:
ci_commit
end
step
'I should see merge request "Bug NS-05" with CI status'
do
page
.
within
".mr-list"
do
expect
(
page
).
to
have_link
"Build status: pending"
end
end
def
merge_request
def
merge_request
@merge_request
||=
MergeRequest
.
find_by!
(
title:
"Bug NS-05"
)
@merge_request
||=
MergeRequest
.
find_by!
(
title:
"Bug NS-05"
)
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