summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/shared/_field.html.haml2
-rw-r--r--spec/features/projects/services/jira_service_spec.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/app/views/shared/_field.html.haml b/app/views/shared/_field.html.haml
index 3bda8cd5e9c..795447a9ca6 100644
--- a/app/views/shared/_field.html.haml
+++ b/app/views/shared/_field.html.haml
@@ -23,6 +23,6 @@
- elsif type == 'select'
= form.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" }
- elsif type == 'password'
- = form.password_field name, autocomplete: "new-password", class: "form-control", required: value.present? ? nil : :required
+ = form.password_field name, autocomplete: "new-password", class: "form-control", required: value.blank? && :required
- if help
%span.help-block= help
diff --git a/spec/features/projects/services/jira_service_spec.rb b/spec/features/projects/services/jira_service_spec.rb
index 191a7103871..c96d87e5708 100644
--- a/spec/features/projects/services/jira_service_spec.rb
+++ b/spec/features/projects/services/jira_service_spec.rb
@@ -65,7 +65,8 @@ feature 'Setup Jira service', :feature, :js do
click_button('Test settings and save changes')
wait_for_requests
- expect(page).to have_content('Test failed.Save anyway')
+ expect(find('.flash-container-page')).to have_content 'Test failed.'
+ expect(find('.flash-container-page')).to have_content 'Save anyway'
find('.flash-alert .flash-action').trigger('click')
wait_for_requests