Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/page/logging_spec.rb')
-rw-r--r--qa/spec/page/logging_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/qa/spec/page/logging_spec.rb b/qa/spec/page/logging_spec.rb
index 93a08108787..1a82cda2585 100644
--- a/qa/spec/page/logging_spec.rb
+++ b/qa/spec/page/logging_spec.rb
@@ -5,6 +5,7 @@ require 'capybara/dsl'
RSpec.describe QA::Support::Page::Logging do
let(:page) { double.as_null_object }
let(:logger) { Gitlab::QA::TestLogger.logger(level: ::Logger::DEBUG, source: 'QA Tests') }
+ let(:page_class) { class_double('QA::Page::TestPage') }
before do
allow(QA::Runtime::Logger).to receive(:logger).and_return(logger)
@@ -66,6 +67,14 @@ RSpec.describe QA::Support::Page::Logging do
.to output(/clicking :element/).to_stdout_from_any_process
end
+ it 'logs click_element with a page' do
+ allow(page_class).to receive(:validate_elements_present!).and_return(true)
+ allow(page_class).to receive(:to_s).and_return('QA::Page::TestPage')
+
+ expect { subject.click_element(:element, page_class) }
+ .to output(/clicking :element and ensuring QA::Page::TestPage is present/).to_stdout_from_any_process
+ end
+
it 'logs fill_element' do
expect { subject.fill_element(:element, 'foo') }
.to output(/filling :element with "foo"/).to_stdout_from_any_process