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
path: root/qa/spec
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-01-24 21:11:52 +0300
committerMark Lapierre <mlapierre@gitlab.com>2019-01-25 17:07:55 +0300
commitdbb5324881c04d7abb328a7af25b3c72a4991adf (patch)
tree92fab227ab087a15fdc1e0c336d526de61e9d277 /qa/spec
parenta05cef5b5695136bc8ada2625e500cd114539b2c (diff)
Fix failing E2E test
Sometimes add_list_delete_branches_spec.rb would not wait after deleting a branch before checking that the branch was done. It would fail when the UI was still processing. This checks that the loading icon is gone before returning from delete_branch. It also makes sure credentials are added properly after recent changes to QA::Git::Repository
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/page/logging_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/qa/spec/page/logging_spec.rb b/qa/spec/page/logging_spec.rb
index 2eb826becea..2666dd3b03b 100644
--- a/qa/spec/page/logging_spec.rb
+++ b/qa/spec/page/logging_spec.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'capybara/dsl'
+require 'logger'
describe QA::Support::Page::Logging do
include Support::StubENV
@@ -8,7 +9,7 @@ describe QA::Support::Page::Logging do
let(:page) { double().as_null_object }
before do
- logger = Logger.new $stdout
+ logger = ::Logger.new $stdout
logger.level = ::Logger::DEBUG
QA::Runtime::Logger.logger = logger
@@ -95,6 +96,13 @@ describe QA::Support::Page::Logging do
.to output(/has_no_text\?\('foo'\) returned true/).to_stdout_from_any_process
end
+ it 'logs finished_loading?' do
+ expect { subject.finished_loading? }
+ .to output(/waiting for loading to complete\.\.\./).to_stdout_from_any_process
+ expect { subject.finished_loading? }
+ .to output(/loading complete after .* seconds$/).to_stdout_from_any_process
+ end
+
it 'logs within_element' do
expect { subject.within_element(:element) }
.to output(/within element :element/).to_stdout_from_any_process