Commit 59f2724c authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'user-callout-showing-on-all-profiles' into 'master'

Fix usercallout to only show on the current logged in user profile

Closes #29839

See merge request !10151
parents 6eeba4b1 29e5ae8c
......@@ -97,6 +97,7 @@
Snippets
%div{ class: container_class }
- if @user == current_user
.user-callout{ 'callout-svg' => custom_icon('icon_customization') }
.tab-content
#activity.tab-pane
......
---
title: User callout only shows on current users profile
merge_request:
author:
......@@ -2,6 +2,7 @@ require 'spec_helper'
describe 'User Callouts', js: true do
let(:user) { create(:user) }
let(:another_user) { create(:user) }
let(:project) { create(:empty_project, path: 'gitlab', name: 'sample') }
before do
......@@ -32,6 +33,11 @@ describe 'User Callouts', js: true do
within('.user-callout') do
find('.close-user-callout').click
end
expect(page).not_to have_selector('#user-callout')
expect(page).not_to have_selector('.user-callout')
end
it 'does not show callout on another users profile' do
visit user_path(another_user)
expect(page).not_to have_selector('.user-callout')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment