summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-04-07 13:27:35 +1000
committerMark Fletcher <mark@gitlab.com>2017-05-04 14:11:40 +0800
commit3ce95e7c16712cbede82f70c3a67916088f42b7e (patch)
tree9cc6d32eff7b925506a682aa49dd7b3f80046031 /features/steps
parent03f13af588cf2b578a27717db492c216fcafbf9a (diff)
downloadgitlab-ce-3ce95e7c16712cbede82f70c3a67916088f42b7e.tar.gz
Disable navigation to Pages config if Pages is disabled
* Regards project-level pages config - Nav link is now shown only if Pages is enabled for instance - Navigation to following controllers denied if Pages disabled: * projects/pages_controller * projects/pages_domains_controller - 'disabled' partial removed + Test for pages_controller introduced
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/project/active_tab.rb6
-rw-r--r--features/steps/project/pages.rb16
2 files changed, 12 insertions, 10 deletions
diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb
index 4befd49ac81..5cd9bd38c9d 100644
--- a/features/steps/project/active_tab.rb
+++ b/features/steps/project/active_tab.rb
@@ -39,12 +39,6 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
end
- step 'I click the "Pages" tab' do
- page.within '.sub-nav' do
- click_link('Pages')
- end
- end
-
step 'I click the "Activity" tab' do
page.within '.sub-nav' do
click_link('Activity')
diff --git a/features/steps/project/pages.rb b/features/steps/project/pages.rb
index 4045955a8b9..fea82d9fb57 100644
--- a/features/steps/project/pages.rb
+++ b/features/steps/project/pages.rb
@@ -18,14 +18,22 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps
visit namespace_project_pages_path(@project.namespace, @project)
end
- step 'I should see that GitLab Pages are disabled' do
- expect(page).to have_content('GitLab Pages are disabled')
- end
-
step 'I should see the usage of GitLab Pages' do
expect(page).to have_content('Configure pages')
end
+ step 'I should see the "Pages" tab' do
+ page.within '.sub-nav' do
+ expect(page).to have_link('Pages')
+ end
+ end
+
+ step 'I should not see the "Pages" tab' do
+ page.within '.sub-nav' do
+ expect(page).not_to have_link('Pages')
+ end
+ end
+
step 'pages are deployed' do
pipeline = @project.ensure_pipeline('HEAD', @project.commit('HEAD').sha)
build = build(:ci_build,