Commit 12bde5a7 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'feature/gb/qa/do-not-add-license-if-not-present' into 'master'

Do not add EE license if not set in GitLab QA tests

See merge request !1459
parents bc4c31f9 d631056c
...@@ -3,13 +3,13 @@ module QA ...@@ -3,13 +3,13 @@ module QA
module Scenario module Scenario
module License module License
class Add < QA::Scenario::Template class Add < QA::Scenario::Template
def perform def perform(license)
QA::Page::Main::Entry.act { sign_in_using_credentials } QA::Page::Main::Entry.act { sign_in_using_credentials }
QA::Page::Main::Menu.act { go_to_admin_area } QA::Page::Main::Menu.act { go_to_admin_area }
QA::Page::Admin::Menu.act { go_to_license } QA::Page::Admin::Menu.act { go_to_license }
EE::Page::Admin::License.act do EE::Page::Admin::License.act(license) do |key|
add_new_license(ENV['EE_LICENSE']) if no_license? add_new_license(key) if no_license?
end end
QA::Page::Main::Menu.act { sign_out } QA::Page::Main::Menu.act { sign_out }
......
...@@ -2,12 +2,15 @@ module QA ...@@ -2,12 +2,15 @@ module QA
module EE module EE
module Strategy module Strategy
extend self extend self
def extend_autoloads! def extend_autoloads!
require 'qa/ee' require 'qa/ee'
end end
def perform_before_hooks def perform_before_hooks
EE::Scenario::License::Add.perform return unless ENV['EE_LICENSE']
EE::Scenario::License::Add.perform(ENV['EE_LICENSE'])
rescue rescue
Capybara::Screenshot.screenshot_and_save_page Capybara::Screenshot.screenshot_and_save_page
raise raise
......
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