Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-13 18:09:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-13 18:09:32 +0300
commitbd25f1d9c685039381df23e49bc52cdcf4ec1b4a (patch)
tree33b3b16ae2ef653f74828f69742154122ff0ac2d /spec/features
parent70ce746bd011b101605e6d84f141d1f0c3175831 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/profiles/two_factor_auths_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/features/profiles/two_factor_auths_spec.rb b/spec/features/profiles/two_factor_auths_spec.rb
index 9a58950b8f3..b4355f2d669 100644
--- a/spec/features/profiles/two_factor_auths_spec.rb
+++ b/spec/features/profiles/two_factor_auths_spec.rb
@@ -6,6 +6,8 @@ RSpec.describe 'Two factor auths' do
include Spec::Support::Helpers::ModalHelpers
context 'when signed in' do
+ let(:invalid_current_pwd_msg) { 'You must provide a valid current password' }
+
before do
sign_in(user)
end
@@ -18,7 +20,7 @@ RSpec.describe 'Two factor auths' do
register_2fa(user.current_otp, '123')
- expect(page).to have_content('You must provide a valid current password')
+ expect(page).to have_selector('.gl-alert-title', text: invalid_current_pwd_msg, count: 1)
register_2fa(user.reload.current_otp, user.password)
@@ -76,7 +78,7 @@ RSpec.describe 'Two factor auths' do
click_button 'Disable'
end
- expect(page).to have_content('You must provide a valid current password')
+ expect(page).to have_selector('.gl-alert-title', text: invalid_current_pwd_msg, count: 1)
fill_in 'current_password', with: user.password
@@ -97,7 +99,7 @@ RSpec.describe 'Two factor auths' do
click_button 'Regenerate recovery codes'
- expect(page).to have_content('You must provide a valid current password')
+ expect(page).to have_selector('.gl-alert-title', text: invalid_current_pwd_msg, count: 1)
fill_in 'current_password', with: user.password