Commit a5ab2a5e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Do not require to set Capybara app_host in RSpec

parent 14238ee2
......@@ -3,7 +3,7 @@ module QA
module Main
class Entry < Page::Base
def initialize
visit('/')
visit(Runtime::Scenario.gitlab_address)
# This resolves cold boot / background tasks problems
#
......
......@@ -7,18 +7,9 @@ module QA
class Entrypoint < Template
include Bootable
def self.tags(*tags)
@tags = tags
end
def self.get_tags
@tags
end
def perform(address, *files)
Specs::Config.perform do |specs|
specs.address = address
end
Runtime::Scenario.define(:gitlab_address, address)
Specs::Config.perform
##
# Perform before hooks, which are different for CE and EE
......@@ -33,6 +24,16 @@ module QA
)
end
end
private
def self.tags(*tags)
@tags = tags
end
def self.get_tags
@tags
end
end
end
end
......@@ -11,13 +11,7 @@ module QA
class Config < Scenario::Template
attr_writer :address
def initialize
@address = ENV['GITLAB_URL']
end
def perform
raise 'Please configure GitLab address!' unless @address
configure_rspec!
configure_capybara!
end
......@@ -56,7 +50,7 @@ module QA
end
Capybara.configure do |config|
config.app_host = @address
# config.app_host = @address
config.default_driver = :chrome
config.javascript_driver = :chrome
config.default_max_wait_time = 4
......
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