diff options
author | Illya Klymov <xanf@xanf.me> | 2019-04-24 16:23:07 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-04-24 16:23:07 +0300 |
commit | 3eff85a97cee2a4143b80f97f750e02526aee1ab (patch) | |
tree | d51b069585762df9d497b10d078612828f6e6283 /spec/features | |
parent | a89e8149b686c37962612779b0d245e7a90e59a8 (diff) |
Remove "You are already signed in" banner
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/users/login_spec.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 9d5780d29b0..efba303033b 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -137,7 +137,7 @@ describe 'Login' do enter_code(user.current_otp) - expect(page).not_to have_content('You are already signed in.') + expect(page).not_to have_content(I18n.t('devise.failure.already_authenticated')) end context 'using one-time code' do @@ -317,7 +317,17 @@ describe 'Login' do gitlab_sign_in(user) expect(current_path).to eq root_path - expect(page).not_to have_content('You are already signed in.') + expect(page).not_to have_content(I18n.t('devise.failure.already_authenticated')) + end + + it 'does not show already signed in message when opening sign in page after login' do + expect(authentication_metrics) + .to increment(:user_authenticated_counter) + + gitlab_sign_in(user) + visit new_user_session_path + + expect(page).not_to have_content(I18n.t('devise.failure.already_authenticated')) end end @@ -579,7 +589,7 @@ describe 'Login' do click_button 'Accept terms' expect(current_path).to eq(root_path) - expect(page).not_to have_content('You are already signed in.') + expect(page).not_to have_content(I18n.t('devise.failure.already_authenticated')) end it 'does not ask for terms when the user already accepted them' do |