Commit f016c504 authored by Dan Davison's avatar Dan Davison

Merge branch '196841-fix-qa-push_protected_branch_spec' into 'master'

Fix the QA 'Protected branch support' test for CE

Closes #196841

See merge request gitlab-org/gitlab!23075
parents 1e2ff8f6 f5fea922
......@@ -24,15 +24,7 @@ module QA
private
def select_allowed(action, allowed)
click_element :"allowed_to_#{action}_select"
allowed[:roles] = QA::Resource::ProtectedBranch::Roles::NO_ONE unless allowed.key?(:roles)
within_element(:"allowed_to_#{action}_dropdown") do
click_on allowed[:roles]
allowed[:users].each { |user| click_on user.username } if allowed.key?(:users)
allowed[:groups].each { |group| click_on group.name } if allowed.key?(:groups)
end
super
# Click the select element again to close the dropdown
click_element :"allowed_to_#{action}_select"
......
......@@ -58,10 +58,9 @@ module QA
within_element(:"allowed_to_#{action}_dropdown") do
click_on allowed[:roles]
allowed[:users].each { |user| click_on user.username } if allowed.key?(:users)
allowed[:groups].each { |group| click_on group.name } if allowed.key?(:groups)
end
# Click the select element again to close the dropdown
click_element :"allowed_to_#{action}_select"
end
end
end
......
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