diff options
Diffstat (limited to 'spec/features/users/rss_spec.rb')
-rw-r--r-- | spec/features/users/rss_spec.rb | 55 |
1 files changed, 16 insertions, 39 deletions
diff --git a/spec/features/users/rss_spec.rb b/spec/features/users/rss_spec.rb index 99451ac472d..730c31df899 100644 --- a/spec/features/users/rss_spec.rb +++ b/spec/features/users/rss_spec.rb @@ -3,58 +3,35 @@ require 'spec_helper' RSpec.describe 'User RSS', feature_category: :user_profile do - let(:user) { create(:user, :no_super_sidebar) } - let(:path) { user_path(create(:user, :no_super_sidebar)) } + let(:user) { create(:user) } + let(:path) { user_path(create(:user)) } - describe 'with "user_profile_overflow_menu_vue" feature flag off' do + context 'when signed in' do before do - stub_feature_flags(user_profile_overflow_menu_vue: false) + sign_in(user) + visit path end - context 'when signed in' do - before do - sign_in(user) - visit path + it 'shows the RSS link with overflow menu', :js do + page.within('.user-cover-block') do + find_by_testid('base-dropdown-toggle').click end - it_behaves_like "it has an RSS button with current_user's feed token" - end - - context 'when signed out' do - before do - stub_feature_flags(super_sidebar_logged_out: false) - visit path - end - - it_behaves_like "it has an RSS button without a feed token" + expect(page).to have_link 'Subscribe', href: /feed_token=glft-.*-#{user.id}/ end end - describe 'with "user_profile_overflow_menu_vue" feature flag on', :js do - context 'when signed in' do - before do - sign_in(user) - visit path - end - - it 'shows the RSS link with overflow menu' do - find('[data-testid="base-dropdown-toggle"').click - - expect(page).to have_link 'Subscribe', href: /feed_token=glft-.*-#{user.id}/ - end + context 'when signed out' do + before do + visit path end - context 'when signed out' do - before do - stub_feature_flags(super_sidebar_logged_out: false) - visit path + it 'has an RSS without a feed token', :js do + page.within('.user-cover-block') do + find_by_testid('base-dropdown-toggle').click end - it 'has an RSS without a feed token' do - find('[data-testid="base-dropdown-toggle"').click - - expect(page).not_to have_link 'Subscribe', href: /feed_token=glft-.*-#{user.id}/ - end + expect(page).not_to have_link 'Subscribe', href: /feed_token=glft-.*-#{user.id}/ end end end |