Commit 1532bd2b authored by Sanad Liaquat's avatar Sanad Liaquat

Add extra logging on ip address restriction spec

parent 65f019e5
...@@ -66,6 +66,7 @@ module QA ...@@ -66,6 +66,7 @@ module QA
def restricted_ip_address def restricted_ip_address
expand_section(:permission_lfs_2fa_section) expand_section(:permission_lfs_2fa_section)
scroll_to_element(:ip_restriction_field)
find_element(:ip_restriction_field).value find_element(:ip_restriction_field).value
end end
......
...@@ -62,6 +62,26 @@ module QA ...@@ -62,6 +62,26 @@ module QA
end end
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 private
def set_ip_address_restriction_to(ip_address) 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