diff options
Diffstat (limited to 'spec/features/webauthn_spec.rb')
-rw-r--r-- | spec/features/webauthn_spec.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/features/webauthn_spec.rb b/spec/features/webauthn_spec.rb index 5c42facfa8b..52e2b375187 100644 --- a/spec/features/webauthn_spec.rb +++ b/spec/features/webauthn_spec.rb @@ -15,7 +15,7 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor # TODO: it_behaves_like 'hardware device for 2fa', 'WebAuthn' describe 'registration' do - let(:user) { create(:user) } + let(:user) { create(:user, :no_super_sidebar) } before do gitlab_sign_in(user) @@ -58,7 +58,8 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor gitlab_sign_out # Second user - user = gitlab_sign_in(:user) + user = create(:user, :no_super_sidebar) + gitlab_sign_in(user) visit profile_account_path enable_two_factor_authentication webauthn_device_registration(webauthn_device: webauthn_device, name: 'My other device', password: user.password) @@ -125,7 +126,7 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor it_behaves_like 'hardware device for 2fa', 'WebAuthn' describe 'registration' do - let(:user) { create(:user) } + let(:user) { create(:user, :no_super_sidebar) } before do gitlab_sign_in(user) @@ -160,7 +161,8 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor gitlab_sign_out # Second user - user = gitlab_sign_in(:user) + user = create(:user, :no_super_sidebar) + gitlab_sign_in(user) user.update_attribute(:otp_required_for_login, true) visit profile_account_path manage_two_factor_authentication @@ -225,7 +227,7 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor describe 'authentication' do let(:otp_required_for_login) { true } - let(:user) { create(:user, webauthn_xid: WebAuthn.generate_user_id, otp_required_for_login: otp_required_for_login) } + let(:user) { create(:user, :no_super_sidebar, webauthn_xid: WebAuthn.generate_user_id, otp_required_for_login: otp_required_for_login) } let!(:webauthn_device) do add_webauthn_device(app_id, user) end @@ -254,7 +256,7 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor describe 'when a given WebAuthn device has already been registered by another user' do describe 'but not the current user' do - let(:other_user) { create(:user, webauthn_xid: WebAuthn.generate_user_id, otp_required_for_login: otp_required_for_login) } + let(:other_user) { create(:user, :no_super_sidebar, webauthn_xid: WebAuthn.generate_user_id, otp_required_for_login: otp_required_for_login) } it 'does not allow logging in with that particular device' do # Register other user with a different WebAuthn device @@ -275,7 +277,8 @@ RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_categor it "allows logging in with that particular device" do pending("support for passing credential options in FakeClient") # Register current user with the same WebAuthn device - current_user = gitlab_sign_in(:user) + current_user = create(:user, :no_super_sidebar) + gitlab_sign_in(current_user) visit profile_account_path manage_two_factor_authentication register_webauthn_device(webauthn_device) |