Enhancement: Allow selection of multiple values in Trigger custom select attribute filter. Closes #1559.

This commit is contained in:
Mantas Masalskis 2019-11-21 14:18:23 +01:00 committed by Thorsten Eckel
parent e9adb2adc2
commit 377f8995a9
2 changed files with 32 additions and 0 deletions

View file

@ -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'

View file

@ -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