Commit c87ad93a authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-shl-add-more-logging-to-ip-address-restriction-spec' into 'master'

Add some extra logging on failure of restrict_by_ip_address_spec

See merge request gitlab-org/gitlab!29487
parents 2419a386 1532bd2b
......@@ -66,6 +66,7 @@ module QA
def restricted_ip_address
expand_section(:permission_lfs_2fa_section)
scroll_to_element(:ip_restriction_field)
find_element(:ip_restriction_field).value
end
......
......@@ -62,6 +62,26 @@ module QA
end
end
# TODO - Remove this block when the test is un-quarantined.
after do |example|
if example.exception
@group.sandbox.visit!
QA::Runtime::Logger.info "On failure - Revisiting: #{@group.sandbox.path}"
QA::Runtime::Logger.info page.save_screenshot(::File.join(QA::Runtime::Namespace.name, "group_sandbox_on_failure.png"), full: true)
Flow::Login.while_signed_in_as_admin do
@group.sandbox.visit!
Page::Group::Menu.perform(&:click_group_general_settings_item)
Page::Group::Settings::General.perform do |settings|
QA::Runtime::Logger.info "On failure - IP address restriction is set to: #{settings.restricted_ip_address}"
QA::Runtime::Logger.info page.save_screenshot(::File.join(QA::Runtime::Namespace.name, "ip_restriction_on_failure.png"), full: true)
end
end
end
end
private
def set_ip_address_restriction_to(ip_address)
......
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