BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6f50cef8
Commit
6f50cef8
authored
Mar 15, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/13928-wrong-iid-of-max-iid' into 'master'
Fixes "iid of max iid" in Issuable sidebar for merged MR Fixes #13928. See merge request !3046
parents
a628db7b
e632bd26
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
2 deletions
+43
-2
CHANGELOG
CHANGELOG
+1
-0
issuables_helper.rb
app/helpers/issuables_helper.rb
+5
-1
merge_requests.feature
features/project/merge_requests.feature
+8
-1
merge_requests.rb
features/steps/project/merge_requests.rb
+20
-0
issuable.rb
features/steps/shared/issuable.rb
+4
-0
merge_requests.rb
spec/factories/merge_requests.rb
+5
-0
No files found.
CHANGELOG
View file @
6f50cef8
...
...
@@ -31,6 +31,7 @@ v 8.6.0 (unreleased)
- Allow to define on which builds the current one depends on
- Fix bug where Bitbucket `closed` issues were imported as `opened` (Iuri de Silvio)
- Don't show Issues/MRs from archived projects in Groups view
- Fix wrong "iid of max iid" in Issuable sidebar for some merged MRs
- Increase the notes polling timeout over time (Roberto Dip)
- Add shortcut to toggle markdown preview (Florent Baldino)
- Show labels in dashboard and group milestone views
...
...
app/helpers/issuables_helper.rb
View file @
6f50cef8
...
...
@@ -31,7 +31,11 @@ module IssuablesHelper
end
def
issuable_state_scope
(
issuable
)
issuable
.
open?
?
:
opened
:
:closed
if
issuable
.
respond_to?
(
:merged?
)
&&
issuable
.
merged?
:merged
else
issuable
.
open?
?
:
opened
:
:closed
end
end
end
features/project/merge_requests.feature
View file @
6f50cef8
...
...
@@ -46,11 +46,18 @@ Feature: Project Merge Requests
Then
I should see
"Feature NS-03"
in merge requests
And
I should see
"Bug NS-04"
in merge requests
Scenario
:
I
visit merge request page
Scenario
:
I
visit
an open
merge request page
Given
I click link
"Bug NS-04"
Then
I should see merge request
"Bug NS-04"
And
I should see
"1 of 1"
in the sidebar
Scenario
:
I
visit a merged merge request page
Given
project
"Shop"
have
"Feature NS-05"
merged merge request
And
I click link
"Merged"
And
I click link
"Feature NS-05"
Then
I should see merge request
"Feature NS-05"
And
I should see
"3 of 3"
in the sidebar
Scenario
:
I
close merge request page
Given
I click link
"Bug NS-04"
And
I click link
"Close"
...
...
features/steps/project/merge_requests.rb
View file @
6f50cef8
...
...
@@ -16,10 +16,18 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_link
"Bug NS-04"
end
step
'I click link "Feature NS-05"'
do
click_link
"Feature NS-05"
end
step
'I click link "All"'
do
click_link
"All"
end
step
'I click link "Merged"'
do
click_link
"Merged"
end
step
'I click link "Closed"'
do
click_link
"Closed"
end
...
...
@@ -40,6 +48,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect
(
page
).
to
have_content
"Bug NS-04"
end
step
'I should see merge request "Feature NS-05"'
do
expect
(
page
).
to
have_content
"Feature NS-05"
end
step
'I should not see "master" branch'
do
expect
(
find
(
'.merge-request-info'
)).
not_to
have_content
"master"
end
...
...
@@ -120,6 +132,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
author:
project
.
users
.
first
)
end
step
'project "Shop" have "Feature NS-05" merged merge request'
do
create
(
:merged_merge_request
,
title:
"Feature NS-05"
,
source_project:
project
,
target_project:
project
,
author:
project
.
users
.
first
)
end
step
'project "Shop" have "Bug NS-07" open merge request with rebased branch'
do
create
(
:merge_request
,
:rebased
,
title:
"Bug NS-07"
,
...
...
features/steps/shared/issuable.rb
View file @
6f50cef8
...
...
@@ -147,6 +147,10 @@ module SharedIssuable
expect_sidebar_content
(
'2 of 2'
)
end
step
'I should see "3 of 3" in the sidebar'
do
expect_sidebar_content
(
'3 of 3'
)
end
step
'I click link "Next" in the sidebar'
do
page
.
within
'.issuable-sidebar'
do
click_link
'Next'
...
...
spec/factories/merge_requests.rb
View file @
6f50cef8
...
...
@@ -56,6 +56,10 @@ FactoryGirl.define do
target_branch
"feature"
end
trait
:merged
do
state
:merged
end
trait
:closed
do
state
:closed
end
...
...
@@ -84,6 +88,7 @@ FactoryGirl.define do
merge_user
author
end
factory
:merged_merge_request
,
traits:
[
:merged
]
factory
:closed_merge_request
,
traits:
[
:closed
]
factory
:reopened_merge_request
,
traits:
[
:reopened
]
factory
:merge_request_with_diffs
,
traits:
[
:with_diffs
]
...
...
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