diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 09:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-06 09:08:29 +0300 |
commit | d111e00680d2b3e46a7ee37af5499407c4a93a22 (patch) | |
tree | c4001334d2db7d00747d2df35ee239f9f78691b8 /spec/features/projects/pages/user_edits_settings_spec.rb | |
parent | b8fbfa9c705435090b9342efd47f2b27becb7819 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/pages/user_edits_settings_spec.rb')
-rw-r--r-- | spec/features/projects/pages/user_edits_settings_spec.rb | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/spec/features/projects/pages/user_edits_settings_spec.rb b/spec/features/projects/pages/user_edits_settings_spec.rb index 8c713b6f73a..eec9f2befb6 100644 --- a/spec/features/projects/pages/user_edits_settings_spec.rb +++ b/spec/features/projects/pages/user_edits_settings_spec.rb @@ -10,8 +10,6 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) - stub_feature_flags(show_pages_in_deployments_menu: false) - project.add_maintainer(user) sign_in(user) @@ -82,25 +80,39 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do end end - describe 'project settings page' do - it 'renders "Pages" tab' do - visit edit_project_path(project) + describe 'menu entry' do + describe 'on the pages page' do + it 'renders "Pages" tab' do + visit project_pages_path(project) - page.within '.nav-sidebar' do - expect(page).to have_link('Pages') + page.within '.nav-sidebar' do + expect(page).to have_link('Pages') + end end end - context 'when pages are disabled' do - before do - allow(Gitlab.config.pages).to receive(:enabled).and_return(false) + describe 'in another menu entry under deployments' do + context 'when pages are enabled' do + it 'renders "Pages" tab' do + visit project_environments_path(project) + + page.within '.nav-sidebar' do + expect(page).to have_link('Pages') + end + end end - it 'does not render "Pages" tab' do - visit edit_project_path(project) + context 'when pages are disabled' do + before do + allow(Gitlab.config.pages).to receive(:enabled).and_return(false) + end - page.within '.nav-sidebar' do - expect(page).not_to have_link('Pages') + it 'does not render "Pages" tab' do + visit project_environments_path(project) + + page.within '.nav-sidebar' do + expect(page).not_to have_link('Pages') + end end end end |