diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-02 14:31:39 -0400 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-19 18:32:33 -0400 |
commit | 45860bc807b693d4b7bc9797c37a6337a19c63c4 (patch) | |
tree | 829e109d602f4af32548cca349953cbaf3e3778c /qa/spec/factory | |
parent | a310a638db037d3914cf12e580c7a41209d2d06e (diff) | |
download | gitlab-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/factory')
-rw-r--r-- | qa/spec/factory/base_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qa/spec/factory/base_spec.rb b/qa/spec/factory/base_spec.rb index 184802a7903..229f93a1041 100644 --- a/qa/spec/factory/base_spec.rb +++ b/qa/spec/factory/base_spec.rb @@ -35,8 +35,8 @@ describe QA::Factory::Base do end end - it 'does not log the factory and build method when VERBOSE=false' do - stub_env('VERBOSE', 'false') + it 'does not log the factory and build method when QA_DEBUG=false' do + stub_env('QA_DEBUG', 'false') expect(factory).to receive(fabrication_method_used).and_return(product_location) expect { subject.public_send(fabrication_method_called, 'something', factory: factory) } @@ -79,8 +79,8 @@ describe QA::Factory::Base do expect(result).to eq(product) end - it 'logs the factory and build method when VERBOSE=true' do - stub_env('VERBOSE', 'true') + it 'logs the factory and build method when QA_DEBUG=true' do + stub_env('QA_DEBUG', 'true') expect(factory).to receive(:fabricate_via_api!).and_return(product_location) expect { subject.fabricate_via_api!(factory: factory, parents: []) } @@ -106,8 +106,8 @@ describe QA::Factory::Base do expect(result).to eq(product) end - it 'logs the factory and build method when VERBOSE=true' do - stub_env('VERBOSE', 'true') + it 'logs the factory and build method when QA_DEBUG=true' do + stub_env('QA_DEBUG', 'true') expect { subject.fabricate_via_browser_ui!('something', factory: factory, parents: []) } .to output(/==> Built a MyFactory via browser_ui with args \["something"\] in [\d\w\.\-]+/) |