devices_spec.rb 502 B

123456789101112131415161718
  1. require 'rails_helper'
  2. RSpec.describe 'Profile > Devices', type: :system, authenticated: true do
  3. subject!(:device) { create(:user_device, user_id: User.find_by(login: 'master@example.com').id) }
  4. it 'allows to remove device' do
  5. visit 'profile/devices'
  6. within(:active_content) do
  7. find('td', text: device.name)
  8. .ancestor('tr')
  9. .find('.settings-list-control')
  10. .click
  11. end
  12. wait(5).until { expect(page).to have_no_css('td', text: device.name) }
  13. end
  14. end