diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 06:09:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 06:09:21 +0000 |
commit | c8df22c555ab707a705e57c4257fd3ed1ce7c3b0 (patch) | |
tree | 009fb7c1ff12a6192921212cae404b790fd7d66b /qa | |
parent | 9345f69894862e02f3491ea3136c3ed2b23fd5b8 (diff) | |
download | gitlab-ce-c8df22c555ab707a705e57c4257fd3ed1ce7c3b0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/runtime/browser.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb index cb475dd4973..7777d06b6f5 100644 --- a/qa/qa/runtime/browser.rb +++ b/qa/qa/runtime/browser.rb @@ -44,11 +44,21 @@ module QA new.visit(address, page_class, &block) end + # rubocop: disable Metrics/AbcSize def self.configure! RSpec.configure do |config| config.define_derived_metadata(file_path: %r{/qa/specs/features/}) do |metadata| metadata[:type] = :feature end + + config.around(:each) do |example| + example.run + + if example.metadata[:screenshot] + screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html] + example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]} + end + end end Capybara.server_port = 9887 + ENV['TEST_ENV_NUMBER'].to_i @@ -140,6 +150,7 @@ module QA config.default_normalize_ws = true end end + # rubocop: enable Metrics/AbcSize class Session include Capybara::DSL |