Commit c2912b46 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Add custom css class to each dropdown to fix failing spec

parent e1d86ec9
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
%td %td
= hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_level.access_level = 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') , = 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}" }}) data: { field_name: "allowed_to_merge_#{protected_branch.id}" }})
%td %td
= hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_level.access_level = 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') , = 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}" }}) data: { field_name: "allowed_to_push_#{protected_branch.id}" }})
- if can_admin_project - if can_admin_project
%td %td
......
...@@ -11,7 +11,7 @@ feature 'Projected Branches', feature: true, js: true do ...@@ -11,7 +11,7 @@ feature 'Projected Branches', feature: true, js: true do
def set_protected_branch_name(branch_name) def set_protected_branch_name(branch_name)
find(".js-protected-branch-select").click find(".js-protected-branch-select").click
find(".dropdown-input-field").set(branch_name) find(".dropdown-input-field").set(branch_name)
click_on "Create Protected Branch: #{branch_name}" click_on "Create wildcard #{branch_name}"
end end
describe "explicit protected branches" do describe "explicit protected branches" do
...@@ -108,7 +108,7 @@ feature 'Projected Branches', feature: true, js: true do ...@@ -108,7 +108,7 @@ feature 'Projected Branches', feature: true, js: true do
within(".protected-branches-list") do within(".protected-branches-list") do
find(".js-allowed-to-push").click 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 end
wait_for_ajax wait_for_ajax
...@@ -139,7 +139,7 @@ feature 'Projected Branches', feature: true, js: true do ...@@ -139,7 +139,7 @@ feature 'Projected Branches', feature: true, js: true do
within(".protected-branches-list") do within(".protected-branches-list") do
find(".js-allowed-to-merge").click 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 end
wait_for_ajax wait_for_ajax
......
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