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