Small testing improvements.
This commit is contained in:
parent
38317bbe8b
commit
ac1c17fb2a
2 changed files with 7 additions and 3 deletions
|
@ -128,6 +128,7 @@ class KeyboardShortcutsTest < TestCase
|
||||||
shortcut(key: 'm')
|
shortcut(key: 'm')
|
||||||
shortcut(key: 'j')
|
shortcut(key: 'j')
|
||||||
window_keys(value: 'some note')
|
window_keys(value: 'some note')
|
||||||
|
sleep 1
|
||||||
shortcut(key: :enter)
|
shortcut(key: :enter)
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active.content .ticket-article',
|
css: '.active.content .ticket-article',
|
||||||
|
@ -138,6 +139,7 @@ class KeyboardShortcutsTest < TestCase
|
||||||
|
|
||||||
shortcut(key: 'g')
|
shortcut(key: 'g')
|
||||||
window_keys(value: 'some reply')
|
window_keys(value: 'some reply')
|
||||||
|
sleep 1
|
||||||
shortcut(key: :enter)
|
shortcut(key: :enter)
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active.content .ticket-article',
|
css: '.active.content .ticket-article',
|
||||||
|
|
|
@ -292,11 +292,13 @@ class TestCase < Test::Unit::TestCase
|
||||||
log('location_check', params)
|
log('location_check', params)
|
||||||
|
|
||||||
instance = params[:browser] || @browser
|
instance = params[:browser] || @browser
|
||||||
if instance.current_url !~ /#{Regexp.quote(params[:url])}/
|
sleep 0.7
|
||||||
|
current_url = instance.current_url
|
||||||
|
if current_url !~ /#{Regexp.quote(params[:url])}/
|
||||||
screenshot(browser: instance, comment: 'location_check_failed')
|
screenshot(browser: instance, comment: 'location_check_failed')
|
||||||
fail "url #{instance.current_url} is not matching #{params[:url]}"
|
fail "url #{current_url} is not matching #{params[:url]}"
|
||||||
end
|
end
|
||||||
assert(true, "url #{instance.current_url} is matching #{params[:url]}")
|
assert(true, "url #{current_url} is matching #{params[:url]}")
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
Loading…
Reference in a new issue