Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
92f682764194
Commit
92f68276
authored
Mar 27, 2015
by
Dmitriy Zaporozhets
Browse files
Fix tests and unassigned filter for issues. Updated CHANGELOG
parent
d920f34af14d
Changes
11
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
92f68276
...
...
@@ -43,6 +43,9 @@
- Link note avatar to user.
- Make Git-over-SSH errors more descriptive.
- 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
- Send EmailsOnPush email when branch or tag is created or deleted.
...
...
app/finders/issuable_finder.rb
View file @
92f68276
...
...
@@ -19,7 +19,7 @@
require_relative
'projects_finder'
class
IssuableFinder
NONE
=
0
NONE
=
'0'
attr_accessor
:current_user
,
:params
...
...
app/views/projects/_issuable_form.html.haml
View file @
92f68276
...
...
@@ -36,7 +36,7 @@
Assign to
.col-sm-10
=
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
)
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
...
...
features/dashboard/issues.feature
View file @
92f68276
...
...
@@ -10,7 +10,8 @@
Scenario
:
I
should see assigned issues
Then
I should see issues assigned to me
@javascript
Scenario
:
I
should see authored issues
When
I click
"Authored by me"
link
Then
I should see issues authored by me
...
...
@@ -13,7 +14,8 @@
Scenario
:
I
should see authored issues
When
I click
"Authored by me"
link
Then
I should see issues authored by me
@javascript
Scenario
:
I
should see all issues
When
I click
"All"
link
Then
I should see all issues
features/dashboard/merge_requests.feature
View file @
92f68276
...
...
@@ -10,7 +10,8 @@
Scenario
:
I
should see assigned merge_requests
Then
I should see merge requests assigned to me
@javascript
Scenario
:
I
should see authored merge_requests
When
I click
"Authored by me"
link
Then
I should see merge requests authored by me
...
...
@@ -13,7 +14,8 @@
Scenario
:
I
should see authored merge_requests
When
I click
"Authored by me"
link
Then
I should see merge requests authored by me
@javascript
Scenario
:
I
should see all merge_requests
When
I click
"All"
link
Then
I should see all merge requests
features/project/issues/filter_labels.feature
View file @
92f68276
...
...
@@ -8,11 +8,7 @@
And project "Shop" has issue "Feature1" with labels
:
"feature"
Given
I visit project
"Shop"
issues page
Scenario
:
I
should see project issues
Then
I should see
"bug"
in labels filter
And
I should see
"feature"
in labels filter
And
I should see
"enhancement"
in labels filter
@javascript
Scenario
:
I
filter by one label
Given
I click link
"bug"
Then
I should see
"Bugfix1"
in issues list
...
...
features/steps/dashboard/issues.rb
View file @
92f68276
class
Spinach::Features::DashboardIssues
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
Select2Helper
step
'I should see issues assigned to me'
do
should_see
(
assigned_issue
)
...
...
@@ -35,12 +36,8 @@
end
step
'I click "Authored by me" link'
do
within
".assignee-filter"
do
click_link
"Any"
end
within
".author-filter"
do
click_link
current_user
.
name
end
select2
(
current_user
.
id
,
from:
"#author_id"
)
select2
(
nil
,
from:
"#assignee_id"
)
end
step
'I click "All" link'
do
...
...
@@ -44,12 +41,8 @@
end
step
'I click "All" link'
do
within
".author-filter"
do
click_link
"Any"
end
within
".assignee-filter"
do
click_link
"Any"
end
select2
(
nil
,
from:
"#author_id"
)
select2
(
nil
,
from:
"#assignee_id"
)
end
def
should_see
(
issue
)
...
...
features/steps/dashboard/merge_requests.rb
View file @
92f68276
class
Spinach::Features::DashboardMergeRequests
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
Select2Helper
step
'I should see merge requests assigned to me'
do
should_see
(
assigned_merge_request
)
...
...
@@ -39,12 +40,8 @@
end
step
'I click "Authored by me" link'
do
within
".assignee-filter"
do
click_link
"Any"
end
within
".author-filter"
do
click_link
current_user
.
name
end
select2
(
current_user
.
id
,
from:
"#author_id"
)
select2
(
nil
,
from:
"#assignee_id"
)
end
step
'I click "All" link'
do
...
...
@@ -48,12 +45,8 @@
end
step
'I click "All" link'
do
within
".author-filter"
do
click_link
"Any"
end
within
".assignee-filter"
do
click_link
"Any"
end
select2
(
nil
,
from:
"#author_id"
)
select2
(
nil
,
from:
"#assignee_id"
)
end
def
should_see
(
merge_request
)
...
...
features/steps/project/issues/filter_labels.rb
View file @
92f68276
...
...
@@ -2,24 +2,7 @@
include
SharedAuthentication
include
SharedProject
include
SharedPaths
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
include
Select2Helper
step
'I should see "Bugfix1" in issues list'
do
within
".issues-list"
do
...
...
@@ -46,9 +29,7 @@
end
step
'I click link "bug"'
do
within
".labels-filter"
do
click_link
"bug"
end
select2
(
'bug'
,
from:
"#label_name"
)
end
step
'I click link "feature"'
do
...
...
spec/features/issues_spec.rb
View file @
92f68276
...
...
@@ -95,7 +95,7 @@
let
(
:issue
)
{
@issue
}
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
).
to
have_content
'barbaz'
...
...
@@ -111,7 +111,7 @@
end
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
).
not_to
have_content
'barbaz'
...
...
spec/support/select2_helper.rb
View file @
92f68276
...
...
@@ -17,5 +17,5 @@
selector
=
options
[
:from
]
if
options
[
:multiple
]
execute_script
(
"$('
#{
selector
}
').select2('val', ['
#{
value
}
']);"
)
execute_script
(
"$('
#{
selector
}
').select2('val', ['
#{
value
}
']
, true
);"
)
else
...
...
@@ -21,5 +21,5 @@
else
execute_script
(
"$('
#{
selector
}
').select2('val', '
#{
value
}
');"
)
execute_script
(
"$('
#{
selector
}
').select2('val', '
#{
value
}
'
, true
);"
)
end
end
end
Write
Preview
Supports
Markdown
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