Small testing improvements.

This commit is contained in:
Martin Edenhofer 2016-02-25 15:20:22 +01:00
parent 38317bbe8b
commit ac1c17fb2a
2 changed files with 7 additions and 3 deletions

View file

@ -128,6 +128,7 @@ class KeyboardShortcutsTest < TestCase
shortcut(key: 'm')
shortcut(key: 'j')
window_keys(value: 'some note')
sleep 1
shortcut(key: :enter)
watch_for(
css: '.active.content .ticket-article',
@ -138,6 +139,7 @@ class KeyboardShortcutsTest < TestCase
shortcut(key: 'g')
window_keys(value: 'some reply')
sleep 1
shortcut(key: :enter)
watch_for(
css: '.active.content .ticket-article',

View file

@ -292,11 +292,13 @@ class TestCase < Test::Unit::TestCase
log('location_check', params)
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')
fail "url #{instance.current_url} is not matching #{params[:url]}"
fail "url #{current_url} is not matching #{params[:url]}"
end
assert(true, "url #{instance.current_url} is matching #{params[:url]}")
assert(true, "url #{current_url} is matching #{params[:url]}")
end
=begin