Merge branch 'protected-branch-dropdown-titles' into 'master'
Added header to protected branches access dropdowns See merge request !8774
This commit is contained in:
commit
57d5a5499c
3 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Added headers to protected branch access dropdowns
|
||||
merge_request:
|
||||
author:
|
|
@ -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
|
||||
|
@ -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…
Reference in a new issue