diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-02-07 11:00:47 +0500 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-02-07 11:00:47 +0500 |
commit | 621b92120e133e1fa8e29a51ece8b850302a6a63 (patch) | |
tree | 57a95391a8778ff745ef5cb51ad1a903ef5ced49 /qa/spec | |
parent | 784eb9a4302ae78393efabcf8851fc991c93a7c0 (diff) | |
download | gitlab-ce-621b92120e133e1fa8e29a51ece8b850302a6a63.tar.gz |
Load login page only if gitlab_address is definedqa-check-server-responding-before-suit
Diffstat (limited to 'qa/spec')
-rw-r--r-- | qa/spec/spec_helper.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb index 50e6168ec8c..0f3cf5f4408 100644 --- a/qa/spec/spec_helper.rb +++ b/qa/spec/spec_helper.rb @@ -8,10 +8,12 @@ RSpec.configure do |config| # The login page could take some time to load the first time it is visited. # We visit the login page and wait for it to properly load only once at the beginning of the suite. config.before(:suite) do - QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login) + if QA::Runtime::Scenario.respond_to?(:gitlab_address) + QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login) - unless QA::Page::Main::Login.perform(&:page_loaded?) - raise ServerNotRespondingError, "Login page did not load at #{QA::Page::Main::Login.perform(&:current_url)}" + unless QA::Page::Main::Login.perform(&:page_loaded?) + raise ServerNotRespondingError, "Login page did not load at #{QA::Page::Main::Login.perform(&:current_url)}" + end end end |