diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-22 21:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-22 21:08:56 +0300 |
commit | c25c2a508b3322278c6528685c2af703b29ba170 (patch) | |
tree | fe7aba0d3633225baa308cb647c9cc7b4b455e3a /spec/features/users | |
parent | 632d0734750382e7c4e5f1b3c526a94acf6e7ce2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/users')
-rw-r--r-- | spec/features/users/login_spec.rb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 08d0a8d556a..259a82498b9 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -49,15 +49,15 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do expect(page).to have_current_path edit_user_password_path, ignore_query: true expect(page).to have_content('Please create a password for your new account.') - fill_in 'user_password', with: 'password' - fill_in 'user_password_confirmation', with: 'password' + fill_in 'user_password', with: user.password + fill_in 'user_password_confirmation', with: user.password click_button 'Change your password' expect(page).to have_current_path new_user_session_path, ignore_query: true expect(page).to have_content(I18n.t('devise.passwords.updated_not_active')) fill_in 'user_login', with: user.username - fill_in 'user_password', with: 'password' + fill_in 'user_password', with: user.password click_button 'Sign in' expect_single_session_with_authenticated_ttl @@ -231,7 +231,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do end it 'does not allow sign-in if the user password is updated before entering a one-time code' do - user.update!(password: 'new_password') + user.update!(password: User.random_password) enter_code(user.current_otp) @@ -468,7 +468,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' expect(page).to have_current_path(new_profile_password_path, ignore_query: true) @@ -788,7 +788,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' @@ -809,7 +809,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' @@ -830,7 +830,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' @@ -873,7 +873,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' fill_in 'user_otp_attempt', with: user.reload.current_otp @@ -899,7 +899,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: user.password click_button 'Sign in' expect_to_be_on_terms_page @@ -907,9 +907,11 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do expect(page).to have_current_path(new_profile_password_path, ignore_query: true) - fill_in 'user_password', with: '12345678' - fill_in 'user_new_password', with: 'new password' - fill_in 'user_password_confirmation', with: 'new password' + new_password = User.random_password + + fill_in 'user_password', with: user.password + fill_in 'user_new_password', with: new_password + fill_in 'user_password_confirmation', with: new_password click_button 'Set new password' expect(page).to have_content('Password successfully changed') |