diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 06:06:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 06:06:24 +0000 |
commit | 1ef4b65f55f4fc6524a47050b4f6d686beb81d3a (patch) | |
tree | 3efc2710e564b86e5e2420d65457f656454006bb /qa | |
parent | 18a102a5b95198b6bc8db2589de6353997a33543 (diff) | |
download | gitlab-ce-1ef4b65f55f4fc6524a47050b4f6d686beb81d3a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/resource/base.rb | 12 | ||||
-rw-r--r-- | qa/spec/resource/base_spec.rb | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/qa/qa/resource/base.rb b/qa/qa/resource/base.rb index 88069df6ade..86de421ba3f 100644 --- a/qa/qa/resource/base.rb +++ b/qa/qa/resource/base.rb @@ -64,7 +64,13 @@ module QA end def visit! - visit(web_url) + Runtime::Logger.debug("Visiting #{web_url}") + + Support::Retrier.retry_until do + visit(web_url) + + wait { current_url == web_url } + end end def populate(*attributes) @@ -72,7 +78,9 @@ module QA end def wait(max: 60, interval: 0.1) - QA::Support::Waiter.wait(max: max, interval: interval) + QA::Support::Waiter.wait(max: max, interval: interval) do + yield + end end private diff --git a/qa/spec/resource/base_spec.rb b/qa/spec/resource/base_spec.rb index 4a6b76c869f..fe84b3d024a 100644 --- a/qa/spec/resource/base_spec.rb +++ b/qa/spec/resource/base_spec.rb @@ -269,6 +269,8 @@ describe QA::Resource::Base do end it 'calls #visit with the underlying #web_url' do + allow(resource).to receive(:current_url).and_return(subject.current_url) + resource.web_url = subject.current_url resource.visit! |