ticket_state_spec.rb 727 B

1234567891011121314151617181920212223242526
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Manage > Ticket States', type: :system do
  4. describe 'create new state' do
  5. let(:new_state_name) { Faker::Lorem.unique.word.capitalize }
  6. before do
  7. visit 'manage/ticket_states'
  8. click_on 'New Ticket State'
  9. end
  10. it 'creates a new state' do
  11. fill_in 'Name', with: new_state_name
  12. find('[name=state_type_id]').select('pending reminder')
  13. scroll_into_view('button.js-submit', position: :bottom)
  14. click_on 'Submit'
  15. within :active_content do
  16. expect(find("tr[data-id='#{Ticket::State.last.id}']")).to have_text(new_state_name)
  17. end
  18. end
  19. end
  20. end