2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2019-11-26 15:22:04 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2020-02-20 12:15:03 +00:00
|
|
|
RSpec.describe 'Manage > Settings > Ticket', type: :system do
|
2019-11-26 15:22:04 +00:00
|
|
|
|
2020-02-20 12:15:03 +00:00
|
|
|
before { visit 'settings/ticket' }
|
2019-11-26 15:22:04 +00:00
|
|
|
|
2020-02-20 12:15:03 +00:00
|
|
|
describe 'owner auto-assignment' do
|
|
|
|
|
|
|
|
it 'enables/disables Setting ticket_auto_assignment' do
|
2019-11-26 15:22:04 +00:00
|
|
|
|
|
|
|
within(:active_content) do
|
|
|
|
click(:href, '#auto_assignment')
|
2020-05-11 12:49:22 +00:00
|
|
|
expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden)
|
2020-02-20 12:15:03 +00:00
|
|
|
find('.js-ticketAutoAssignment').click
|
2020-05-11 12:49:22 +00:00
|
|
|
expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden)
|
2019-11-26 15:22:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
refresh
|
|
|
|
|
|
|
|
within(:active_content) do
|
2020-02-20 12:15:03 +00:00
|
|
|
click(:href, '#auto_assignment')
|
2020-05-11 12:49:22 +00:00
|
|
|
expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden)
|
2020-02-20 12:15:03 +00:00
|
|
|
find('.js-ticketAutoAssignment').click
|
2020-05-11 12:49:22 +00:00
|
|
|
expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden)
|
2019-11-26 15:22:04 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|