diff options
Diffstat (limited to 'spec/features/projects/pages/user_edits_settings_spec.rb')
-rw-r--r-- | spec/features/projects/pages/user_edits_settings_spec.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/features/projects/pages/user_edits_settings_spec.rb b/spec/features/projects/pages/user_edits_settings_spec.rb index 8350214bf99..4ad729a29e1 100644 --- a/spec/features/projects/pages/user_edits_settings_spec.rb +++ b/spec/features/projects/pages/user_edits_settings_spec.rb @@ -5,7 +5,7 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do include Spec::Support::Helpers::ModalHelpers let_it_be_with_reload(:project) { create(:project, :pages_published, pages_https_only: false) } - let_it_be(:user) { create(:user, :no_super_sidebar) } + let_it_be(:user) { create(:user) } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) @@ -22,7 +22,7 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do context 'when pages deployed' do before do - project.mark_pages_as_deployed + create(:pages_deployment, project: project) end it 'renders Access pages' do @@ -85,7 +85,7 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do it 'renders "Pages" tab' do visit project_pages_path(project) - page.within '.nav-sidebar' do + within_testid 'super-sidebar' do expect(page).to have_link('Pages') end end @@ -96,7 +96,8 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do it 'renders "Pages" tab' do visit project_environments_path(project) - page.within '.nav-sidebar' do + within_testid 'super-sidebar' do + click_button 'Deploy' expect(page).to have_link('Pages') end end @@ -110,7 +111,8 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do it 'does not render "Pages" tab' do visit project_environments_path(project) - page.within '.nav-sidebar' do + within_testid 'super-sidebar' do + click_button 'Deploy' expect(page).not_to have_link('Pages') end end @@ -123,7 +125,7 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do before do project.namespace.update!(owner: user) - project.mark_pages_as_deployed + create(:pages_deployment, project: project) end it 'tries to change the setting' do @@ -185,7 +187,7 @@ RSpec.describe 'Pages edits pages settings', :js, feature_category: :pages do describe 'Remove page' do context 'when pages are deployed' do before do - project.mark_pages_as_deployed + create(:pages_deployment, project: project) end it 'removes the pages', :sidekiq_inline do |