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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 15:08:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 15:08:34 +0300
commit0820b29dca14bd22c2cee6d9ee2900b64385bfa6 (patch)
tree3637b0c997f5764c7255b830ffe32e53ac7ce078 /qa/spec
parent778772c8d97adc025c126a941a1bd37bf72419ac (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/page/base_spec.rb10
-rw-r--r--qa/spec/page/logging_spec.rb16
2 files changed, 13 insertions, 13 deletions
diff --git a/qa/spec/page/base_spec.rb b/qa/spec/page/base_spec.rb
index 88d0eac40e6..717112b12ce 100644
--- a/qa/spec/page/base_spec.rb
+++ b/qa/spec/page/base_spec.rb
@@ -3,7 +3,7 @@
describe QA::Page::Base do
describe 'page helpers' do
it 'exposes helpful page helpers' do
- expect(subject).to respond_to :refresh, :wait, :scroll_to
+ expect(subject).to respond_to :refresh, :wait_until, :scroll_to
end
end
@@ -69,11 +69,11 @@ describe QA::Page::Base do
it 'does not refresh' do
expect(subject).not_to receive(:refresh)
- subject.wait(max: 0.01, raise_on_failure: false) { true }
+ subject.wait_until(max_duration: 0.01, raise_on_failure: false) { true }
end
it 'returns true' do
- expect(subject.wait(max: 0.1, raise_on_failure: false) { true }).to be_truthy
+ expect(subject.wait_until(max_duration: 0.1, raise_on_failure: false) { true }).to be_truthy
end
end
@@ -81,13 +81,13 @@ describe QA::Page::Base do
it 'refreshes' do
expect(subject).to receive(:refresh).at_least(:once)
- subject.wait(max: 0.01, raise_on_failure: false) { false }
+ subject.wait_until(max_duration: 0.01, raise_on_failure: false) { false }
end
it 'returns false' do
allow(subject).to receive(:refresh)
- expect(subject.wait(max: 0.01, raise_on_failure: false) { false }).to be_falsey
+ expect(subject.wait_until(max_duration: 0.01, raise_on_failure: false) { false }).to be_falsey
end
end
end
diff --git a/qa/spec/page/logging_spec.rb b/qa/spec/page/logging_spec.rb
index 0d68f4bdae9..a6b61e9b1ee 100644
--- a/qa/spec/page/logging_spec.rb
+++ b/qa/spec/page/logging_spec.rb
@@ -28,20 +28,20 @@ describe QA::Support::Page::Logging do
end
it 'logs wait' do
- expect { subject.wait(max: 0) {} }
+ expect { subject.wait_until(max_duration: 0) {} }
.to output(/next wait uses reload: true/).to_stdout_from_any_process
- expect { subject.wait(max: 0) {} }
+ expect { subject.wait_until(max_duration: 0) {} }
.to output(/with wait_until/).to_stdout_from_any_process
- expect { subject.wait(max: 0) {} }
+ expect { subject.wait_until(max_duration: 0) {} }
.to output(/ended wait_until$/).to_stdout_from_any_process
end
it 'logs wait with reload false' do
- expect { subject.wait(max: 0, reload: false) {} }
+ expect { subject.wait_until(max_duration: 0, reload: false) {} }
.to output(/next wait uses reload: false/).to_stdout_from_any_process
- expect { subject.wait(max: 0, reload: false) {} }
+ expect { subject.wait_until(max_duration: 0, reload: false) {} }
.to output(/with wait_until/).to_stdout_from_any_process
- expect { subject.wait(max: 0, reload: false) {} }
+ expect { subject.wait_until(max_duration: 0, reload: false) {} }
.to output(/ended wait_until$/).to_stdout_from_any_process
end
@@ -121,10 +121,10 @@ describe QA::Support::Page::Logging do
end
it 'logs has_no_text?' do
- allow(page).to receive(:has_no_text?).with('foo').and_return(true)
+ allow(page).to receive(:has_no_text?).with('foo', any_args).and_return(true)
expect { subject.has_no_text? 'foo' }
- .to output(/has_no_text\?\('foo'\) returned true/).to_stdout_from_any_process
+ .to output(/has_no_text\?\('foo', wait: #{QA::Runtime::Browser::CAPYBARA_MAX_WAIT_TIME}\) returned true/).to_stdout_from_any_process
end
it 'logs finished_loading?' do