ticket_spec.rb 977 B

12345678910111213141516171819202122232425262728293031
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Manage > Settings > Ticket', type: :system do
  4. before { visit 'settings/ticket' }
  5. describe 'owner auto-assignment' do
  6. it 'enables/disables Setting ticket_auto_assignment' do
  7. within(:active_content) do
  8. click(:href, '#auto_assignment')
  9. expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden)
  10. find('.js-ticketAutoAssignment').click
  11. expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden)
  12. end
  13. refresh
  14. within(:active_content) do
  15. click(:href, '#auto_assignment')
  16. expect(page).to have_field('ticket_auto_assignment', checked: true, visible: :hidden)
  17. find('.js-ticketAutoAssignment').click
  18. expect(page).to have_field('ticket_auto_assignment', checked: false, visible: :hidden)
  19. end
  20. end
  21. end
  22. end