Skip to content

Commit

Permalink
Fixes #5031 - Group selection for ticket creation box in the Forms se…
Browse files Browse the repository at this point in the history
…ttings is not stored.
  • Loading branch information
fliebe92 committed Jan 29, 2024
1 parent afb6283 commit b7ddbe8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Expand Up @@ -6,7 +6,7 @@ class ChannelForm extends App.ControllerSubContent
'change form.js-paramsDesigner': 'updateParamsDesigner'
'keyup form.js-paramsDesigner': 'updateParamsDesigner'
'change .js-formSetting input': 'toggleFormSetting'
'change .js-paramsSetting select': 'updateGroup'
'change .js-paramsSetting input': 'updateGroup'

elements:
'.js-code': 'code'
Expand Down
20 changes: 19 additions & 1 deletion spec/system/form_spec.rb
Expand Up @@ -99,6 +99,24 @@
end
end

context 'when settings are changed' do
let(:path) { 'channels/form' }
let(:group) { create(:group) }

before do
group
visit path
end

it 'stores settings correctly' do
set_tree_select_value('group_id', group.name)

check_input_field_value('group_id', group.id.to_s, visible: :all)

wait.until { Setting.get('form_ticket_create_group_id') == group.id.to_s }
end
end

context 'with in-app form' do
let(:path) { 'channels/form' }
let(:feedback_modal_button) { '.js-formBtn' }
Expand Down Expand Up @@ -139,7 +157,7 @@
end

context 'with external form' do
let(:path) { '/assets/form/form.html' }
let(:path) { '/assets/form/form.html' }
let(:feedback_modal_button) { '#feedback-form-modal' }
let(:form_inline_selector) { '#feedback-form-inline form.zammad-form' }

Expand Down

0 comments on commit b7ddbe8

Please sign in to comment.