diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/views/projects/services/_form.haml_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/views/projects/services/_form.haml_spec.rb')
-rw-r--r-- | spec/views/projects/services/_form.haml_spec.rb | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/spec/views/projects/services/_form.haml_spec.rb b/spec/views/projects/services/_form.haml_spec.rb index 177f703ba6c..f212fd78b1a 100644 --- a/spec/views/projects/services/_form.haml_spec.rb +++ b/spec/views/projects/services/_form.haml_spec.rb @@ -20,13 +20,33 @@ RSpec.describe 'projects/services/_form' do ) end - context 'commit_events and merge_request_events' do - it 'display merge_request_events and commit_events descriptions' do - allow(Integrations::Redmine).to receive(:supported_events).and_return(%w(commit merge_request)) - + context 'integrations form' do + it 'does not render form element' do render - expect(rendered).to have_css("input[name='redirect_to'][value='/services']", count: 1, visible: false) + expect(rendered).not_to have_selector('[data-testid="integration-form"]') + end + + context 'when vue_integration_form feature flag is disabled' do + before do + stub_feature_flags(vue_integration_form: false) + end + + it 'renders form element' do + render + + expect(rendered).to have_selector('[data-testid="integration-form"]') + end + + context 'commit_events and merge_request_events' do + it 'display merge_request_events and commit_events descriptions' do + allow(Integrations::Redmine).to receive(:supported_events).and_return(%w(commit merge_request)) + + render + + expect(rendered).to have_css("input[name='redirect_to'][value='/services']", count: 1, visible: false) + end + end end end end |