Enhancement: Allow selection of multiple values in Trigger custom select attribute filter. Closes #1559.
This commit is contained in:
parent
e9adb2adc2
commit
377f8995a9
2 changed files with 32 additions and 0 deletions
|
@ -87,6 +87,9 @@ class App.UiElement.ticket_selector
|
|||
config.operator = operator
|
||||
elements["#{groupKey}.#{config.name}"] = config
|
||||
|
||||
if config.tag == 'select'
|
||||
config.multiple = true
|
||||
|
||||
if attribute.out_of_office
|
||||
elements['ticket.out_of_office_replacement_id'] =
|
||||
name: 'out_of_office_replacement_id'
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Admin Panel > Trigger', type: :system do
|
||||
it 'custom select attribute allows to select multiple values', db_strategy: :reset do
|
||||
attribute = create_attribute :object_manager_attribute_select,
|
||||
data_option: {
|
||||
options: {
|
||||
'name 1': 'name 1',
|
||||
'name 2': 'name 2',
|
||||
},
|
||||
default: '',
|
||||
null: false,
|
||||
relation: '',
|
||||
maxlength: 255,
|
||||
nulloption: true,
|
||||
}
|
||||
|
||||
visit '/#manage/trigger'
|
||||
click '.page-header-meta .btn--success'
|
||||
|
||||
modal_ready
|
||||
|
||||
within '.modal .ticket_selector' do
|
||||
find('.js-attributeSelector select').select(attribute.display)
|
||||
|
||||
expect(find('.js-value select')).to be_multiple
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue