diff options
Diffstat (limited to 'spec/features/users/show_spec.rb')
-rw-r--r-- | spec/features/users/show_spec.rb | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rb index 9c4a1b36ecc..f8653b22377 100644 --- a/spec/features/users/show_spec.rb +++ b/spec/features/users/show_spec.rb @@ -9,10 +9,32 @@ RSpec.describe 'User page', feature_category: :user_profile do subject(:visit_profile) { visit(user_path(user)) } - it 'shows user id' do - subject + context 'with "user_profile_overflow_menu_vue" feature flag enabled', :js do + it 'does not show the user id in the profile info' do + subject + + expect(page).not_to have_content("User ID: #{user.id}") + end + + it 'shows copy user id action in the dropdown' do + subject + + find('[data-testid="base-dropdown-toggle"').click + + expect(page).to have_content("Copy user ID: #{user.id}") + end + end + + context 'with "user_profile_overflow_menu_vue" feature flag disabled', :js do + before do + stub_feature_flags(user_profile_overflow_menu_vue: false) + end + + it 'shows user id' do + subject - expect(page).to have_content("User ID: #{user.id}") + expect(page).to have_content("User ID: #{user.id}") + end end it 'shows name on breadcrumbs' do |