Commit 42a9c143 authored by Etienne Baqué's avatar Etienne Baqué

Added feature spec for forward_deployment_enabled

parent a77076e0
......@@ -31,7 +31,7 @@ class ProjectCiCdSetting < ApplicationRecord
end
def forward_deployment_enabled?
super && ::Feature.enabled?(:forward_deployment_enabled, project)
super && ::Feature.enabled?(:forward_deployment_enabled, project, default_enabled: true)
end
private
......
......@@ -7013,6 +7013,9 @@ msgstr ""
msgid "Downvotes"
msgstr ""
msgid "Drop older active deployments"
msgstr ""
msgid "Due date"
msgstr ""
......@@ -22043,6 +22046,9 @@ msgstr ""
msgid "What are you searching for?"
msgstr ""
msgid "When a deployment is successful, allow older but still pending deployment(s) to be skipped"
msgstr ""
msgid "When a runner is locked, it cannot be assigned to other projects"
msgstr ""
......
......@@ -61,6 +61,28 @@ describe "Projects > Settings > Pipelines settings" do
expect(checkbox).to be_checked
end
it 'updates forward_deployment_enabled' do
visit project_settings_ci_cd_path(project)
checkbox = find_field('project_forward_deployment_enabled')
expect(checkbox).to be_checked
checkbox.set(false)
page.within '#js-general-pipeline-settings' do
click_on 'Save changes'
end
expect(page.status_code).to eq(200)
page.within '#js-general-pipeline-settings' do
expect(page).to have_button('Save changes', disabled: false)
end
checkbox = find_field('project_forward_deployment_enabled')
expect(checkbox).not_to be_checked
end
describe 'Auto DevOps' do
context 'when auto devops is turned on instance-wide' do
before do
......
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