Improved error handling.

This commit is contained in:
Martin Edenhofer 2016-03-15 12:47:26 +01:00
parent af2488f4d7
commit 7d475b1ac4
3 changed files with 13 additions and 15 deletions

View file

@ -33,7 +33,7 @@ class AgentOrganizationProfileTest < TestCase
css: '.active .profile [data-name="note"]', css: '.active .profile [data-name="note"]',
value: note, value: note,
) )
click( css: '.empty-search' ) empty_search()
sleep 2 sleep 2
# check and change note again in edit screen # check and change note again in edit screen
@ -112,9 +112,8 @@ class AgentOrganizationProfileTest < TestCase
css: '.active .profile [data-name="note"]', css: '.active .profile [data-name="note"]',
value: message, value: message,
) )
click( empty_search(
browser: browser1, browser: browser1,
css: '.empty-search',
) )
# verify # verify

View file

@ -30,7 +30,7 @@ class AgentUserProfileTest < TestCase
css: '.active [data-name="note"]', css: '.active [data-name="note"]',
value: 'some note 123', value: 'some note 123',
) )
click( css: '.empty-search' ) empty_search()
sleep 2 sleep 2
# check and change note again in edit screen # check and change note again in edit screen
@ -107,9 +107,8 @@ class AgentUserProfileTest < TestCase
css: '.active [data-name="note"]', css: '.active [data-name="note"]',
value: message, value: message,
) )
click( empty_search(
browser: browser1, browser: browser1,
css: '.empty-search',
) )
watch_for( watch_for(

View file

@ -2353,7 +2353,7 @@ wait untill text in selector disabppears
@last_used_browser = instance @last_used_browser = instance
end end
def log(method, params) def log(method, params = {})
return if !@@debug return if !@@debug
return if params[:mute_log] return if params[:mute_log]
puts "#{Time.zone.now}/#{method}: #{params.inspect}" puts "#{Time.zone.now}/#{method}: #{params.inspect}"