diff --git a/app/views/projects/protected_branches/_protected_branch.html.haml b/app/views/projects/protected_branches/_protected_branch.html.haml index 5af4052de2f..e2e01ee78f8 100644 --- a/app/views/projects/protected_branches/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_protected_branch.html.haml @@ -16,12 +16,12 @@ %td = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_level.access_level = dropdown_tag( (protected_branch.merge_access_level.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable', + options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container', data: { field_name: "allowed_to_merge_#{protected_branch.id}" }}) %td = hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_level.access_level = dropdown_tag( (protected_branch.push_access_level.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable', + options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container', data: { field_name: "allowed_to_push_#{protected_branch.id}" }}) - if can_admin_project %td diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index 2a6f3b3bb1c..ebbbca5d2f4 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -11,7 +11,7 @@ feature 'Projected Branches', feature: true, js: true do def set_protected_branch_name(branch_name) find(".js-protected-branch-select").click find(".dropdown-input-field").set(branch_name) - click_on "Create Protected Branch: #{branch_name}" + click_on "Create wildcard #{branch_name}" end describe "explicit protected branches" do @@ -108,7 +108,7 @@ feature 'Projected Branches', feature: true, js: true do within(".protected-branches-list") do find(".js-allowed-to-push").click - within('.dropdown-menu.push') { click_on access_type_name } + within('.js-allowed-to-push-container') { click_on access_type_name } end wait_for_ajax @@ -139,7 +139,7 @@ feature 'Projected Branches', feature: true, js: true do within(".protected-branches-list") do find(".js-allowed-to-merge").click - within('.dropdown-menu.merge') { click_on access_type_name } + within('.js-allowed-to-merge-container') { click_on access_type_name } end wait_for_ajax