Commit d7793c0e authored by Anastasia McDonald's avatar Anastasia McDonald

Merge branch 'shl-log-on-successful-license-creation' into 'master'

E2E: Log successful adding of license key

See merge request gitlab-org/gitlab!82302
parents 0cc6a229 0749a4db
......@@ -10,18 +10,22 @@ module QA
QA::Page::Admin::Menu.perform(&:click_subscription_menu_link)
EE::Page::Admin::License.perform do |license_page|
unless license_page.license?
if license_page.license?
QA::Runtime::Logger.debug("A license already exists.")
else
QA::Page::Admin::Menu.perform(&:go_to_general_settings)
license_page.add_new_license(license)
end
end
unless EE::Page::Admin::Subscription.perform(&:has_ultimate_subscription_plan?)
license_length = license.to_s.strip.length
license_info = "License key length: #{license_length}. " + (license_length > 5 ? "Last five characters: #{license.to_s.strip[-5..]}" : "")
license_length = license.to_s.strip.length
license_info = "TEST_LICENSE_MODE: #{ENV['TEST_LICENSE_MODE']}. License key length: #{license_length}. " + (license_length > 5 ? "Last five characters: #{license.to_s.strip[-5..]}" : "")
raise "Adding license key was unsuccessful. #{license_info}"
if EE::Page::Admin::Subscription.perform(&:has_ultimate_subscription_plan?)
QA::Runtime::Logger.debug("Successfully added license key. #{license_info}")
else
raise "Adding license key was unsuccessful. #{license_info}"
end
end
end
QA::Page::Main::Menu.perform(&:sign_out_if_signed_in)
......
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