diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-06-06 13:29:52 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-06-06 13:29:52 +0300 |
commit | c604c43782c5f2ac915f934d566f0502ae41f6d4 (patch) | |
tree | b6bdf2556b395b5bd1cb1133a633b0ade66456c5 | |
parent | c99332a83a61e79f03e05f578cac016756beec31 (diff) |
fix broken specs
-rw-r--r-- | app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 4 | ||||
-rw-r--r-- | spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index c4677715104..ceb3597b5de 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -7,7 +7,7 @@ - message = auto_devops_warning_message(@project) - ci_file_formatted = '<code>.gitlab-ci.yml</code>'.html_safe - if message - %p.settings-message.text-center + %p.auto-devops-warning-message.settings-message.text-center = message.html_safe = f.fields_for :auto_devops_attributes, @auto_devops do |form| .card @@ -28,7 +28,7 @@ .form-text.text-muted = s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted } - .card.js-extra-settings{ class: form.object.enabled == false ? 'hidden' : nil } + .card.js-extra-settings{ class: form.object&.enabled == false ? 'hidden' : nil } .card-body.bg-light = form.label :domain do %strong= _('Domain') diff --git a/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb b/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb index d15391911c1..cb1b9e6f5fb 100644 --- a/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb +++ b/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb @@ -12,7 +12,7 @@ describe 'projects/settings/ci_cd/_autodevops_form' do it 'shows warning message' do render - expect(rendered).to have_css('.settings-message') + expect(rendered).to have_css('.auto-devops-warning-message') expect(rendered).to have_text('Auto Review Apps and Auto Deploy need a domain name and a') expect(rendered).to have_link('Kubernetes cluster') end @@ -26,7 +26,7 @@ describe 'projects/settings/ci_cd/_autodevops_form' do it 'shows warning message' do render - expect(rendered).to have_css('.settings-message') + expect(rendered).to have_css('.auto-devops-warning-message') expect(rendered).to have_text('Auto Review Apps and Auto Deploy need a') expect(rendered).to have_link('Kubernetes cluster') end @@ -42,7 +42,7 @@ describe 'projects/settings/ci_cd/_autodevops_form' do it 'shows warning message' do render - expect(rendered).to have_css('.settings-message') + expect(rendered).to have_css('.auto-devops-warning-message') expect(rendered).to have_text('Auto Review Apps and Auto Deploy need a domain name to work correctly.') end end @@ -55,7 +55,7 @@ describe 'projects/settings/ci_cd/_autodevops_form' do it 'does not show warning message' do render - expect(rendered).not_to have_css('.settings-message') + expect(rendered).not_to have_css('.auto-devops-warning-message') end end end |