Commit 97700125 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'hide_issues_settings' into 'master'

Hide issues settings when issues are disabled

This closes gitlab-org/gitlab-ee#198

/cc @DouweM @axil @JobV 

See merge request !122
parents 2154fef2 2aa4a682
Please view this file on the master branch, on stable branches it's out of date.
v 8.4.0 (unreleased)
- Hide issues settings when issues are disabled (Hannes Rosenögger)
- Add pagination headers to already paginated API resources
- Properly generate diff of orphan commits, like the first commit in a repository
- Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
......
......@@ -4,6 +4,7 @@ class @ProjectNew
$('.project-edit-container').hide()
$('.save-project-loader').show()
@toggleSettings()
@toggleSettingsOnclick()
toggleSettings: ->
......@@ -12,3 +13,12 @@ class @ProjectNew
$('.merge-request-feature').show()
else
$('.merge-request-feature').hide()
checked = $("#project_issues_enabled").prop("checked")
if checked
$('.issues-feature').show()
else
$('.issues-feature').hide()
toggleSettingsOnclick: ->
$("#project_merge_requests_enabled").on 'click', @toggleSettings
$("#project_issues_enabled").on 'click', @toggleSettings
......@@ -18,6 +18,18 @@ Feature: Project
Then I should see the default project avatar
And I should not see the "Remove avatar" button
@javascript
Scenario: I disable issues
Given I visit edit project "Shop" page
When I disable project issues
Then I should not see the issues settings
@javascript
Scenario: I enable issues
Given I visit edit project "Shop" page
When I enable project issues
Then I should see the issues settings
Scenario: I should have back to group button
And project "Shop" belongs to group
And I visit project "Shop" page
......
......@@ -177,4 +177,21 @@ class Spinach::Features::Project < Spinach::FeatureSteps
expect(page).to have_content 'Notification settings saved'
end
end
step 'I enable project issues' do
check 'project_issues_enabled'
end
step 'I disable project issues' do
uncheck 'project_issues_enabled'
end
step 'I should not see the issues settings' do
expect(find('.issues-feature')).not_to be_visible
end
step 'I should see the issues settings' do
expect(find('.issues-feature')).to be_visible
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment