diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-27 13:10:58 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-27 13:10:58 +0300 |
commit | c01338cba55ae6e32c4f8801d727e4c2c52ec1c9 (patch) | |
tree | 47f01923756a296f02fca2ab0f71c463603aa55c /spec/features/u2f_spec.rb | |
parent | b4af546820b00537c6a5053f6b21dc9805dc11c7 (diff) |
fixed spec/features/u2f_spec.rb
a lot of failures where because everything happens faster than rspec can
detect on the page
Diffstat (limited to 'spec/features/u2f_spec.rb')
-rw-r--r-- | spec/features/u2f_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index 915d90859ba..8178e4144f1 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -191,7 +191,6 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do # Try authenticating user with the old U2F device gitlab_sign_in(current_user) @u2f_device.respond_to_u2f_authentication - expect(page).to have_content('We heard back from your U2F device') expect(page).to have_content('Authentication via U2F device failed') end end @@ -209,7 +208,6 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do # Try authenticating user with the same U2F device gitlab_sign_in(current_user) @u2f_device.respond_to_u2f_authentication - expect(page).to have_content('We heard back from your U2F device') expect(page).to have_css('.sign-out-link', visible: false) end @@ -221,7 +219,6 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do unregistered_device = FakeU2fDevice.new(page, 'My device') gitlab_sign_in(user) unregistered_device.respond_to_u2f_authentication - expect(page).to have_content('We heard back from your U2F device') expect(page).to have_content('Authentication via U2F device failed') end @@ -246,7 +243,6 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do [first_device, second_device].each do |device| gitlab_sign_in(user) device.respond_to_u2f_authentication - expect(page).to have_content('We heard back from your U2F device') expect(page).to have_css('.sign-out-link', visible: false) @@ -269,7 +265,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do it "deletes u2f registrations" do visit profile_account_path - expect { click_on "Disable" }.to change { U2fRegistration.count }.by(-1) + expect do + accept_confirm { click_on "Disable" } + end.to change{ U2fRegistration.count }.by(-1) end end end |