Skip to content
Snippets Groups Projects
Commit dc5107dd authored by Nur Rony's avatar Nur Rony
Browse files

resolves weight dropdown not stay selected issue

Changelog entry added in CHANGELOG-EE.md

adds test for weight dropdown selected text

uses Issue weight constant from Issue class

resolves rubocop test errors by using ruby 1.9 syntax for RSpec

adds new helper module for ee issueables

removes weight_dropdown_label function from issuable_helpers

make it working for numarics weight

moves changelog entry to 8.14 and rubocop warning resolved

adds line break after release version
parent f19caa89
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
 
## 8.14.0 (2016-11-22)
 
- Weight dropdown in issue filter form does not stay selected !826
- gitlab:check rake task checks ES version according to requirements
- Convert ASCII-8BIT LDAP DNs to UTF-8 to avoid unnecessary user deletions
- [Fix] Only owner can see "Projects" button in group edit menu
Loading
Loading
module EeIssuablesHelper
def weight_dropdown_label(weight)
if Issue.weight_options.include?(weight)
weight
else
h(weight.presence || 'Weight')
end
end
end
Loading
Loading
@@ -33,7 +33,7 @@
.filter-item.inline.weight-filter
- if params[:weight]
= hidden_field_tag(:weight, params[:weight])
= dropdown_tag("Weight", options: { title: "Filter by weight", toggle_class: 'js-weight-select js-filter-submit', dropdown_class: "dropdown-menu-selectable",
= dropdown_tag(weight_dropdown_label(params[:weight]), options: { title: "Filter by weight", toggle_class: 'js-weight-select js-filter-submit', dropdown_class: "dropdown-menu-selectable",
placeholder: "Search weight", data: { field_name: "weight" , default_label: "Weight" } }) do
%ul
- Issue.weight_options.each do |weight|
Loading
Loading
Loading
Loading
@@ -14,6 +14,7 @@ feature 'Issue filtering by Weight', feature: true do
visit_issues(project)
filter_by_weight(Issue::WEIGHT_NONE)
 
expect(page).to have_css('.weight-filter .dropdown-toggle-text', text: Issue::WEIGHT_NONE)
expect(page).to have_css('.issue', count: 1)
end
 
Loading
Loading
@@ -21,6 +22,7 @@ feature 'Issue filtering by Weight', feature: true do
visit_issues(project)
filter_by_weight(Issue::WEIGHT_ANY)
 
expect(page).to have_css('.weight-filter .dropdown-toggle-text', text: Issue::WEIGHT_ANY)
expect(page).to have_css('.issue', count: 2)
end
 
Loading
Loading
@@ -28,6 +30,7 @@ feature 'Issue filtering by Weight', feature: true do
visit_issues(project)
filter_by_weight(weight_num)
 
expect(page).to have_css('.weight-filter .dropdown-toggle-text', text: weight_num)
expect(page).to have_css('.issue', count: 2)
end
 
Loading
Loading
@@ -35,6 +38,7 @@ feature 'Issue filtering by Weight', feature: true do
visit_issues(project)
filter_by_weight(Issue::WEIGHT_ALL)
 
expect(page).to have_css('.weight-filter .dropdown-toggle-text', text: Issue::WEIGHT_ALL)
expect(page).to have_css('.issue', count: 3)
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment