Commit 303e854b authored by Fatih Acet's avatar Fatih Acet

Change issue weight dropdown to be a input

parent f7f4112c
......@@ -13,9 +13,4 @@
- if issuable.weight
= form.hidden_field :weight
= weight_dropdown_tag(issuable, toggle_class: 'js-issuable-form-weight') do
%ul
- Issue.weight_options.each do |weight|
%li
%a{ href: '#', data: { id: weight, none: weight === Issue::WEIGHT_NONE }, class: ("is-active" if issuable.weight == weight) }
= weight
= form.text_field :weight, class: "datepicker form-control", placeholder: "Enter a number", autocomplete: "off", type: "text"
---
title: Change issue create weight dropdown to an input
merge_request: 8648
author:
type: changed
......@@ -152,11 +152,7 @@ describe 'New/edit issue', :js do
expect(page.all('input[name="issue[label_ids][]"]', visible: false)[1].value).to match(label.id.to_s)
expect(page.all('input[name="issue[label_ids][]"]', visible: false)[2].value).to match(label2.id.to_s)
click_button 'Weight'
page.within '.dropdown-menu-weight' do
click_link '1'
end
fill_in 'issue_weight', with: '1'
click_button 'Submit issue'
......
......@@ -19,11 +19,7 @@ describe "User creates issue", :js do
weight = "7"
fill_in("Title", with: issue_title)
click_button("Weight")
page.within(".dropdown-menu-weight") do
click_link(weight)
end
fill_in("issue_weight", with: weight)
click_button("Submit issue")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment