Commit f5fea922 authored by Rémy Coutable's avatar Rémy Coutable

Fix the QA 'Protected branch support' test for CE

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 350bb258
...@@ -24,15 +24,7 @@ module QA ...@@ -24,15 +24,7 @@ module QA
private private
def select_allowed(action, allowed) def select_allowed(action, allowed)
click_element :"allowed_to_#{action}_select" super
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
# Click the select element again to close the dropdown # Click the select element again to close the dropdown
click_element :"allowed_to_#{action}_select" click_element :"allowed_to_#{action}_select"
......
...@@ -58,10 +58,9 @@ module QA ...@@ -58,10 +58,9 @@ module QA
within_element(:"allowed_to_#{action}_dropdown") do within_element(:"allowed_to_#{action}_dropdown") do
click_on allowed[:roles] 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 end
# Click the select element again to close the dropdown
click_element :"allowed_to_#{action}_select"
end end
end 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