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:
Diffstat (limited to 'spec/features/users/show_spec.rb')
-rw-r--r--spec/features/users/show_spec.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rb
index 9aef3ed7cd6..9c4a1b36ecc 100644
--- a/spec/features/users/show_spec.rb
+++ b/spec/features/users/show_spec.rb
@@ -15,6 +15,14 @@ RSpec.describe 'User page', feature_category: :user_profile do
expect(page).to have_content("User ID: #{user.id}")
end
+ it 'shows name on breadcrumbs' do
+ subject
+
+ page.within '.breadcrumbs' do
+ expect(page).to have_content(user.name)
+ end
+ end
+
context 'with public profile' do
context 'with `profile_tabs_vue` feature flag disabled' do
before do
@@ -538,4 +546,36 @@ RSpec.describe 'User page', feature_category: :user_profile do
end
end
end
+
+ context 'achievements' do
+ it 'renders the user achievements mount point' do
+ subject
+
+ expect(page).to have_selector('#js-user-achievements')
+ end
+
+ context 'when the user has chosen not to display achievements' do
+ let(:user) { create(:user) }
+
+ before do
+ user.update!(achievements_enabled: false)
+ end
+
+ it 'does not render the user achievements mount point' do
+ subject
+
+ expect(page).not_to have_selector('#js-user-achievements')
+ end
+ end
+
+ context 'when the profile is private' do
+ let(:user) { create(:user, private_profile: true) }
+
+ it 'does not render the user achievements mount point' do
+ subject
+
+ expect(page).not_to have_selector('#js-user-achievements')
+ end
+ end
+ end
end