Commit ef309143 authored by Hannes Rosenögger's avatar Hannes Rosenögger

Hide issues settings when issues are disabled

parent 2154fef2
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,14 @@ 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