devices_spec.rb 539 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Profile > Devices', type: :system do
  4. subject!(:device) { create(:user_device, user_id: User.find_by(login: 'admin@example.com').id) }
  5. it 'allows to remove device' do
  6. visit 'profile/devices'
  7. within(:active_content) do
  8. find('td', text: device.name)
  9. .ancestor('tr')
  10. .find('.settings-list-control')
  11. .click
  12. end
  13. expect(page).to have_no_css('td', text: device.name)
  14. end
  15. end