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
Tatuya Kamada
gitlab-ce
Commits
c1c93f4f
Commit
c1c93f4f
authored
Mar 27, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and unassigned filter for issues. Updated CHANGELOG
parent
d6c8eefb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
56 deletions
+26
-56
CHANGELOG
CHANGELOG
+3
-0
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+1
-1
app/views/projects/_issuable_form.html.haml
app/views/projects/_issuable_form.html.haml
+1
-1
features/dashboard/issues.feature
features/dashboard/issues.feature
+2
-0
features/dashboard/merge_requests.feature
features/dashboard/merge_requests.feature
+2
-0
features/project/issues/filter_labels.feature
features/project/issues/filter_labels.feature
+1
-5
features/steps/dashboard/issues.rb
features/steps/dashboard/issues.rb
+5
-12
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+5
-12
features/steps/project/issues/filter_labels.rb
features/steps/project/issues/filter_labels.rb
+2
-21
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+2
-2
spec/support/select2_helper.rb
spec/support/select2_helper.rb
+2
-2
No files found.
CHANGELOG
View file @
c1c93f4f
...
@@ -43,6 +43,9 @@ v 7.10.0 (unreleased)
...
@@ -43,6 +43,9 @@ v 7.10.0 (unreleased)
- Link note avatar to user.
- Link note avatar to user.
- Make Git-over-SSH errors more descriptive.
- Make Git-over-SSH errors more descriptive.
- Fix EmailsOnPush.
- Fix EmailsOnPush.
- Refactor issue filtering
- AJAX selectbox for issue assignee and author filters
- Fix issue with missing options in issue filtering dropdown if selected one
v 7.9.0
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
- Send EmailsOnPush email when branch or tag is created or deleted.
...
...
app/finders/issuable_finder.rb
View file @
c1c93f4f
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
require_relative
'projects_finder'
require_relative
'projects_finder'
class
IssuableFinder
class
IssuableFinder
NONE
=
0
NONE
=
'0'
attr_accessor
:current_user
,
:params
attr_accessor
:current_user
,
:params
...
...
app/views/projects/_issuable_form.html.haml
View file @
c1c93f4f
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
Assign to
Assign to
.col-sm-10
.col-sm-10
=
users_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
=
users_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
placeholder:
'Select a user'
,
class:
'custom-form-control'
,
placeholder:
'Select a user'
,
class:
'custom-form-control'
,
null_user:
true
,
selected:
issuable
.
assignee_id
)
selected:
issuable
.
assignee_id
)
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
...
...
features/dashboard/issues.feature
View file @
c1c93f4f
...
@@ -10,10 +10,12 @@ Feature: Dashboard Issues
...
@@ -10,10 +10,12 @@ Feature: Dashboard Issues
Scenario
:
I
should see assigned issues
Scenario
:
I
should see assigned issues
Then
I should see issues assigned to me
Then
I should see issues assigned to me
@javascript
Scenario
:
I
should see authored issues
Scenario
:
I
should see authored issues
When
I click
"Authored by me"
link
When
I click
"Authored by me"
link
Then
I should see issues authored by me
Then
I should see issues authored by me
@javascript
Scenario
:
I
should see all issues
Scenario
:
I
should see all issues
When
I click
"All"
link
When
I click
"All"
link
Then
I should see all issues
Then
I should see all issues
features/dashboard/merge_requests.feature
View file @
c1c93f4f
...
@@ -10,10 +10,12 @@ Feature: Dashboard Merge Requests
...
@@ -10,10 +10,12 @@ Feature: Dashboard Merge Requests
Scenario
:
I
should see assigned merge_requests
Scenario
:
I
should see assigned merge_requests
Then
I should see merge requests assigned to me
Then
I should see merge requests assigned to me
@javascript
Scenario
:
I
should see authored merge_requests
Scenario
:
I
should see authored merge_requests
When
I click
"Authored by me"
link
When
I click
"Authored by me"
link
Then
I should see merge requests authored by me
Then
I should see merge requests authored by me
@javascript
Scenario
:
I
should see all merge_requests
Scenario
:
I
should see all merge_requests
When
I click
"All"
link
When
I click
"All"
link
Then
I should see all merge requests
Then
I should see all merge requests
features/project/issues/filter_labels.feature
View file @
c1c93f4f
...
@@ -8,11 +8,7 @@ Feature: Project Issues Filter Labels
...
@@ -8,11 +8,7 @@ Feature: Project Issues Filter Labels
And project "Shop" has issue "Feature1" with labels
:
"feature"
And project "Shop" has issue "Feature1" with labels
:
"feature"
Given
I visit project
"Shop"
issues page
Given
I visit project
"Shop"
issues page
Scenario
:
I
should see project issues
@javascript
Then
I should see
"bug"
in labels filter
And
I should see
"feature"
in labels filter
And
I should see
"enhancement"
in labels filter
Scenario
:
I
filter by one label
Scenario
:
I
filter by one label
Given
I click link
"bug"
Given
I click link
"bug"
Then
I should see
"Bugfix1"
in issues list
Then
I should see
"Bugfix1"
in issues list
...
...
features/steps/dashboard/issues.rb
View file @
c1c93f4f
class
Spinach::Features::DashboardIssues
<
Spinach
::
FeatureSteps
class
Spinach::Features::DashboardIssues
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedAuthentication
include
SharedPaths
include
SharedPaths
include
Select2Helper
step
'I should see issues assigned to me'
do
step
'I should see issues assigned to me'
do
should_see
(
assigned_issue
)
should_see
(
assigned_issue
)
...
@@ -35,21 +36,13 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
...
@@ -35,21 +36,13 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
end
step
'I click "Authored by me" link'
do
step
'I click "Authored by me" link'
do
within
".assignee-filter"
do
select2
(
current_user
.
id
,
from:
"#author_id"
)
click_link
"Any"
select2
(
nil
,
from:
"#assignee_id"
)
end
within
".author-filter"
do
click_link
current_user
.
name
end
end
end
step
'I click "All" link'
do
step
'I click "All" link'
do
within
".author-filter"
do
select2
(
nil
,
from:
"#author_id"
)
click_link
"Any"
select2
(
nil
,
from:
"#assignee_id"
)
end
within
".assignee-filter"
do
click_link
"Any"
end
end
end
def
should_see
(
issue
)
def
should_see
(
issue
)
...
...
features/steps/dashboard/merge_requests.rb
View file @
c1c93f4f
class
Spinach::Features::DashboardMergeRequests
<
Spinach
::
FeatureSteps
class
Spinach::Features::DashboardMergeRequests
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedAuthentication
include
SharedPaths
include
SharedPaths
include
Select2Helper
step
'I should see merge requests assigned to me'
do
step
'I should see merge requests assigned to me'
do
should_see
(
assigned_merge_request
)
should_see
(
assigned_merge_request
)
...
@@ -39,21 +40,13 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
...
@@ -39,21 +40,13 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end
end
step
'I click "Authored by me" link'
do
step
'I click "Authored by me" link'
do
within
".assignee-filter"
do
select2
(
current_user
.
id
,
from:
"#author_id"
)
click_link
"Any"
select2
(
nil
,
from:
"#assignee_id"
)
end
within
".author-filter"
do
click_link
current_user
.
name
end
end
end
step
'I click "All" link'
do
step
'I click "All" link'
do
within
".author-filter"
do
select2
(
nil
,
from:
"#author_id"
)
click_link
"Any"
select2
(
nil
,
from:
"#assignee_id"
)
end
within
".assignee-filter"
do
click_link
"Any"
end
end
end
def
should_see
(
merge_request
)
def
should_see
(
merge_request
)
...
...
features/steps/project/issues/filter_labels.rb
View file @
c1c93f4f
...
@@ -2,24 +2,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
...
@@ -2,24 +2,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
include
SharedAuthentication
include
SharedAuthentication
include
SharedProject
include
SharedProject
include
SharedPaths
include
SharedPaths
include
Select2Helper
step
'I should see "bug" in labels filter'
do
within
".labels-filter"
do
page
.
should
have_content
"bug"
end
end
step
'I should see "feature" in labels filter'
do
within
".labels-filter"
do
page
.
should
have_content
"feature"
end
end
step
'I should see "enhancement" in labels filter'
do
within
".labels-filter"
do
page
.
should
have_content
"enhancement"
end
end
step
'I should see "Bugfix1" in issues list'
do
step
'I should see "Bugfix1" in issues list'
do
within
".issues-list"
do
within
".issues-list"
do
...
@@ -46,9 +29,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
...
@@ -46,9 +29,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
end
end
step
'I click link "bug"'
do
step
'I click link "bug"'
do
within
".labels-filter"
do
select2
(
'bug'
,
from:
"#label_name"
)
click_link
"bug"
end
end
end
step
'I click link "feature"'
do
step
'I click link "feature"'
do
...
...
spec/features/issues_spec.rb
View file @
c1c93f4f
...
@@ -95,7 +95,7 @@ describe 'Issues', feature: true do
...
@@ -95,7 +95,7 @@ describe 'Issues', feature: true do
let
(
:issue
)
{
@issue
}
let
(
:issue
)
{
@issue
}
it
'should allow filtering by issues with no specified milestone'
do
it
'should allow filtering by issues with no specified milestone'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
milestone_id:
'0'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
milestone_id:
IssuableFinder
::
NONE
)
expect
(
page
).
not_to
have_content
'foobar'
expect
(
page
).
not_to
have_content
'foobar'
expect
(
page
).
to
have_content
'barbaz'
expect
(
page
).
to
have_content
'barbaz'
...
@@ -111,7 +111,7 @@ describe 'Issues', feature: true do
...
@@ -111,7 +111,7 @@ describe 'Issues', feature: true do
end
end
it
'should allow filtering by issues with no specified assignee'
do
it
'should allow filtering by issues with no specified assignee'
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
assignee_id:
'0'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
assignee_id:
IssuableFinder
::
NONE
)
expect
(
page
).
to
have_content
'foobar'
expect
(
page
).
to
have_content
'foobar'
expect
(
page
).
not_to
have_content
'barbaz'
expect
(
page
).
not_to
have_content
'barbaz'
...
...
spec/support/select2_helper.rb
View file @
c1c93f4f
...
@@ -17,9 +17,9 @@ module Select2Helper
...
@@ -17,9 +17,9 @@ module Select2Helper
selector
=
options
[
:from
]
selector
=
options
[
:from
]
if
options
[
:multiple
]
if
options
[
:multiple
]
execute_script
(
"$('
#{
selector
}
').select2('val', ['
#{
value
}
']);"
)
execute_script
(
"$('
#{
selector
}
').select2('val', ['
#{
value
}
']
, true
);"
)
else
else
execute_script
(
"$('
#{
selector
}
').select2('val', '
#{
value
}
');"
)
execute_script
(
"$('
#{
selector
}
').select2('val', '
#{
value
}
'
, true
);"
)
end
end
end
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