diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/features/profiles | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/features/profiles')
20 files changed, 60 insertions, 20 deletions
diff --git a/spec/features/profiles/account_spec.rb b/spec/features/profiles/account_spec.rb index c6db15065f2..620c2f60ba3 100644 --- a/spec/features/profiles/account_spec.rb +++ b/spec/features/profiles/account_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Account', :js do +RSpec.describe 'Profile > Account', :js do let(:user) { create(:user, username: 'foo') } before do @@ -56,6 +56,37 @@ describe 'Profile > Account', :js do end end end + + describe 'Delete account' do + before do + create_list(:project, number_of_projects, namespace: user.namespace) + visit profile_account_path + end + + context 'when there are no personal projects' do + let(:number_of_projects) { 0 } + + it 'does not show personal projects removal message' do + expect(page).not_to have_content(/\d personal projects? will be removed and cannot be restored/) + end + end + + context 'when one personal project exists' do + let(:number_of_projects) { 1 } + + it 'does show personal project removal message' do + expect(page).to have_content('1 personal project will be removed and cannot be restored') + end + end + + context 'when more than one personal projects exists' do + let(:number_of_projects) { 3 } + + it 'shows pluralized personal project removal message' do + expect(page).to have_content('3 personal projects will be removed and cannot be restored') + end + end + end end def update_username(new_username) diff --git a/spec/features/profiles/active_sessions_spec.rb b/spec/features/profiles/active_sessions_spec.rb index 8f63ce2a197..75531d43df2 100644 --- a/spec/features/profiles/active_sessions_spec.rb +++ b/spec/features/profiles/active_sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do +RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do let(:user) do create(:user).tap do |user| user.current_sign_in_at = Time.current diff --git a/spec/features/profiles/chat_names_spec.rb b/spec/features/profiles/chat_names_spec.rb index 4c447faf77e..80b36aa37b8 100644 --- a/spec/features/profiles/chat_names_spec.rb +++ b/spec/features/profiles/chat_names_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Chat' do +RSpec.describe 'Profile > Chat' do let(:user) { create(:user) } let(:service) { create(:service) } diff --git a/spec/features/profiles/emails_spec.rb b/spec/features/profiles/emails_spec.rb index a41ef9e86ae..fc7de6d8b23 100644 --- a/spec/features/profiles/emails_spec.rb +++ b/spec/features/profiles/emails_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Emails' do +RSpec.describe 'Profile > Emails' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/gpg_keys_spec.rb b/spec/features/profiles/gpg_keys_spec.rb index 07e87f36c65..18ed4e646b3 100644 --- a/spec/features/profiles/gpg_keys_spec.rb +++ b/spec/features/profiles/gpg_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > GPG Keys' do +RSpec.describe 'Profile > GPG Keys' do let(:user) { create(:user, email: GpgHelpers::User2.emails.first) } before do diff --git a/spec/features/profiles/keys_spec.rb b/spec/features/profiles/keys_spec.rb index 3fc0fd76d2e..b5e784a749f 100644 --- a/spec/features/profiles/keys_spec.rb +++ b/spec/features/profiles/keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > SSH Keys' do +RSpec.describe 'Profile > SSH Keys' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/oauth_applications_spec.rb b/spec/features/profiles/oauth_applications_spec.rb index 94c9897a7a9..2735f601307 100644 --- a/spec/features/profiles/oauth_applications_spec.rb +++ b/spec/features/profiles/oauth_applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Applications' do +RSpec.describe 'Profile > Applications' do let(:user) { create(:user) } let(:application) { create(:oauth_application, owner: user) } diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb index 9dc96080732..a274f2b6d96 100644 --- a/spec/features/profiles/password_spec.rb +++ b/spec/features/profiles/password_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Password' do +RSpec.describe 'Profile > Password' do let(:user) { create(:user) } def fill_passwords(password, confirmation) diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 1fb61eeeb5a..21a0d01a9bf 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Personal Access Tokens', :js do +RSpec.describe 'Profile > Personal Access Tokens', :js do let(:user) { create(:user) } def active_personal_access_tokens diff --git a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb index 5af48c4503d..a5b7b1fba9d 100644 --- a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb +++ b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Notifications > User changes notified_of_own_activity setting', :js do +RSpec.describe 'Profile > Notifications > User changes notified_of_own_activity setting', :js do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_edit_preferences_spec.rb b/spec/features/profiles/user_edit_preferences_spec.rb index 6e61536d5ff..e1117d2d420 100644 --- a/spec/features/profiles/user_edit_preferences_spec.rb +++ b/spec/features/profiles/user_edit_preferences_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'User edit preferences profile' do +RSpec.describe 'User edit preferences profile' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index 171dfb353f0..2659157d61d 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User edit profile' do +RSpec.describe 'User edit profile' do let(:user) { create(:user) } before do @@ -245,6 +245,15 @@ describe 'User edit profile' do end end + it 'opens the emoji modal again after closing it' do + open_user_status_modal + select_emoji('biohazard', true) + + find('.js-toggle-emoji-menu').click + + expect(page).to have_selector('.emoji-menu') + end + it 'does not update the awards panel emoji' do project.add_maintainer(user) visit(project_issue_path(project, issue)) diff --git a/spec/features/profiles/user_manages_applications_spec.rb b/spec/features/profiles/user_manages_applications_spec.rb index 668c4e8c784..d65365db880 100644 --- a/spec/features/profiles/user_manages_applications_spec.rb +++ b/spec/features/profiles/user_manages_applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User manages applications' do +RSpec.describe 'User manages applications' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_manages_emails_spec.rb b/spec/features/profiles/user_manages_emails_spec.rb index 09da819a187..373c4f565f2 100644 --- a/spec/features/profiles/user_manages_emails_spec.rb +++ b/spec/features/profiles/user_manages_emails_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User manages emails' do +RSpec.describe 'User manages emails' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_notifications_tab_spec.rb b/spec/features/profiles/user_visits_notifications_tab_spec.rb index d788c0574e2..997cc8e3c4b 100644 --- a/spec/features/profiles/user_visits_notifications_tab_spec.rb +++ b/spec/features/profiles/user_visits_notifications_tab_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the notifications tab', :js do +RSpec.describe 'User visits the notifications tab', :js do let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/features/profiles/user_visits_profile_account_page_spec.rb b/spec/features/profiles/user_visits_profile_account_page_spec.rb index f576a2bf9e1..b4d1185412b 100644 --- a/spec/features/profiles/user_visits_profile_account_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_account_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile account page' do +RSpec.describe 'User visits the profile account page' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_profile_authentication_log_spec.rb b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb index 2f6f8ebee9c..22292eff9a3 100644 --- a/spec/features/profiles/user_visits_profile_authentication_log_spec.rb +++ b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the authentication log' do +RSpec.describe 'User visits the authentication log' do let(:user) { create(:user) } context 'when user signed in' do diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb index b18f763a968..d9421631b32 100644 --- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile preferences page' do +RSpec.describe 'User visits the profile preferences page' do include Select2Helper let(:user) { create(:user) } diff --git a/spec/features/profiles/user_visits_profile_spec.rb b/spec/features/profiles/user_visits_profile_spec.rb index 1c90a794099..77da1f138c7 100644 --- a/spec/features/profiles/user_visits_profile_spec.rb +++ b/spec/features/profiles/user_visits_profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits their profile' do +RSpec.describe 'User visits their profile' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb index 05ad9096f65..0531434f00c 100644 --- a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile SSH keys page' do +RSpec.describe 'User visits the profile SSH keys page' do let(:user) { create(:user) } before do |