ticket_spec.rb 900 B

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