summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-08-03 22:32:57 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-08-05 17:19:01 -0500
commitc2912b46f8f51567fa7c18c90c493a94c1ffad30 (patch)
treedb8463544b84f422995a494a7a766546f3500803
parente1d86ec9149a328bf975f55d003b3c29806cadbb (diff)
downloadgitlab-ce-c2912b46f8f51567fa7c18c90c493a94c1ffad30.tar.gz
Add custom css class to each dropdown to fix failing spec
-rw-r--r--app/views/projects/protected_branches/_protected_branch.html.haml4
-rw-r--r--spec/features/protected_branches_spec.rb6
2 files changed, 5 insertions, 5 deletions
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