summaryrefslogtreecommitdiff
path: root/qa/spec/spec_helper.rb
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2018-10-02 14:31:39 -0400
committerMark Lapierre <mlapierre@gitlab.com>2018-10-19 18:32:33 -0400
commit45860bc807b693d4b7bc9797c37a6337a19c63c4 (patch)
tree829e109d602f4af32548cca349953cbaf3e3778c /qa/spec/spec_helper.rb
parenta310a638db037d3914cf12e580c7a41209d2d06e (diff)
downloadgitlab-ce-45860bc807b693d4b7bc9797c37a6337a19c63c4.tar.gz
Log page actionsml-qa-logging
Override page object methods to log the actions taken by the methods before or after the action, as appropriate. Allow page object action logging to be turned on via a QA_DEBUG env var. Unlike CHROME_HEADLESS (and the soon to arrive VERBOSE), QA_DEBUG is false by default. QA_DEBUG is used instead of just DEBUG because that enables Selenium debug logging. Mask passwords entered into fields with a QA selector with 'password' in the name. Doesn't mask sensitive data entered into any other field.
Diffstat (limited to 'qa/spec/spec_helper.rb')
-rw-r--r--qa/spec/spec_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb
index 8e6613cd688..8e01da01340 100644
--- a/qa/spec/spec_helper.rb
+++ b/qa/spec/spec_helper.rb
@@ -3,6 +3,10 @@ require_relative '../qa'
Dir[::File.join(__dir__, 'support', '**', '*.rb')].each { |f| require f }
RSpec.configure do |config|
+ config.before do |example|
+ QA::Runtime::Logger.debug("Starting test: #{example.full_description}") if QA::Runtime::Env.debug?
+ end
+
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end