summaryrefslogtreecommitdiff
path: root/qa/qa/specs/config.rb
diff options
context:
space:
mode:
authorDJ Mountney <dj@gitlab.com>2017-07-10 21:20:52 +0000
committerDJ Mountney <dj@gitlab.com>2017-07-10 21:20:52 +0000
commite643c0db35617d2b0ba607708322e827c15ce132 (patch)
tree2094291da16a3c4021176f7441b865970cfeccf8 /qa/qa/specs/config.rb
parentba4250c119df661f32bc7e72b8001798464a9785 (diff)
parent26b6e299e1c97b956306572c5c9f6c02f428bfd7 (diff)
downloadgitlab-ce-e643c0db35617d2b0ba607708322e827c15ce132.tar.gz
Merge branch 'master' into 'catch-redis-address-error'
# Conflicts: # lib/gitlab/current_settings.rb
Diffstat (limited to 'qa/qa/specs/config.rb')
-rw-r--r--qa/qa/specs/config.rb18
1 files changed, 5 insertions, 13 deletions
diff --git a/qa/qa/specs/config.rb b/qa/qa/specs/config.rb
index b341aa3094a..4dfdd6cd93c 100644
--- a/qa/qa/specs/config.rb
+++ b/qa/qa/specs/config.rb
@@ -25,27 +25,15 @@ module QA
def configure_rspec!
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
- # This option will default to `true` in RSpec 4. It makes the `description`
- # and `failure_message` of custom matchers include text for helper methods
- # defined using `chain`.
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
- # Prevents you from mocking or stubbing a method that does not exist on
- # a real object. This is generally recommended, and will default to
- # `true` in RSpec 4.
mocks.verify_partial_doubles = true
end
- # Run specs in random order to surface order dependencies.
config.order = :random
Kernel.srand config.seed
-
- # config.before(:all) do
- # page.current_window.resize_to(1200, 1800)
- # end
-
config.formatter = :documentation
config.color = true
end
@@ -56,7 +44,7 @@ module QA
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
'chromeOptions' => {
'binary' => '/usr/bin/google-chrome-stable',
- 'args' => %w[headless no-sandbox disable-gpu]
+ 'args' => %w[headless no-sandbox disable-gpu window-size=1280,1024]
}
)
@@ -64,6 +52,10 @@ module QA
.new(app, browser: :chrome, desired_capabilities: capabilities)
end
+ Capybara::Screenshot.register_driver(:chrome) do |driver, path|
+ driver.browser.save_screenshot(path)
+ end
+
Capybara.configure do |config|
config.app_host = @address
config.default_driver = :chrome