Skip to content
Snippets Groups Projects
Commit 860c8cfc authored by Phil Hughes's avatar Phil Hughes
Browse files

Added header to protected branches access dropdowns

parent fadeefb6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -68,8 +68,12 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
 
def access_levels_options
{
push_access_levels: ProtectedBranch::PushAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } },
merge_access_levels: ProtectedBranch::MergeAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } }
push_access_levels: {
"Roles" => ProtectedBranch::PushAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } },
},
merge_access_levels: {
"Roles" => ProtectedBranch::MergeAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } }
}
}
end
 
Loading
Loading
---
title: Added headers to protected branch access dropdowns
merge_request:
author:
Loading
Loading
@@ -26,7 +26,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
 
within(".protected-branches-list") do
find(".js-allowed-to-push").click
within('.js-allowed-to-push-container') { click_on access_type_name }
within('.js-allowed-to-push-container') do
expect(first("li")).to have_content("Roles")
click_on access_type_name
end
end
 
wait_for_ajax
Loading
Loading
@@ -61,7 +65,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
 
within(".protected-branches-list") do
find(".js-allowed-to-merge").click
within('.js-allowed-to-merge-container') { click_on access_type_name }
within('.js-allowed-to-merge-container') do
expect(first("li")).to have_content("Roles")
click_on access_type_name
end
end
 
wait_for_ajax
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment