groups_spec.rb 905 B

12345678910111213141516171819202122232425262728
  1. require 'rails_helper'
  2. require 'system/examples/pagination_examples'
  3. RSpec.describe 'Manage > Groups', type: :system do
  4. context 'ajax pagination' do
  5. include_examples 'pagination', model: :group, klass: Group, path: 'manage/groups'
  6. end
  7. context "Issue 2544 - Can't remove auto assignment timeout" do
  8. before do
  9. visit '/#manage/groups'
  10. end
  11. it 'is possible to reset the assignment timeout of a group' do
  12. find('td', text: 'Users').click
  13. fill_in 'Assignment Timeout', with: '30'
  14. find('button', text: 'Submit').click
  15. await_empty_ajax_queue
  16. expect(Group.find_by(name: 'Users').assignment_timeout).to eq(30)
  17. find('td', text: 'Users').click
  18. fill_in 'Assignment Timeout', with: ''
  19. find('button', text: 'Submit').click
  20. await_empty_ajax_queue
  21. expect(Group.find_by(name: 'Users').assignment_timeout).to be nil
  22. end
  23. end
  24. end