Commit 0a830464 authored by Sanad Liaquat's avatar Sanad Liaquat

Fix merge request widget spec flakiness

parent 8f23a3bb
......@@ -49,13 +49,11 @@ module QA
def approve_license(name)
click_license(name)
click_element(:approve_license_button)
wait_for_animated_element(:license_management_modal)
end
def blacklist_license(name)
click_license(name)
click_element(:blacklist_license_button)
wait_for_animated_element(:license_management_modal)
end
end
end
......
......@@ -90,6 +90,12 @@ module QA
end
end
def wait_for_license_compliance_report
wait(reload: false) do
has_no_text?('Loading License Compliance report')
end
end
def approvals_required_from
approvals_content.match(/approvals? from (.*)/)[1]
end
......
......@@ -123,6 +123,8 @@ module QA
show.approve_license_with_mr(approved_license_name)
show.blacklist_license_with_mr(blacklisted_license_name)
show.wait_for_license_compliance_report
expect(show).to have_approved_license approved_license_name
expect(show).to have_blacklisted_license blacklisted_license_name
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