Added notify_close() to closed notify messages.

This commit is contained in:
Martin Edenhofer 2016-06-13 10:19:44 +02:00
parent ec752decc7
commit dca608aa06
2 changed files with 27 additions and 0 deletions

View file

@ -49,6 +49,7 @@ class TranslationTest < TestCase
click(css: 'a[href="#manage"]') click(css: 'a[href="#manage"]')
click(css: 'a[href="#system/translation"]') click(css: 'a[href="#system/translation"]')
notify_close(optional: true) # to be not in click area
set( set(
css: '#content input.js-Item[data-source="Translations"]', css: '#content input.js-Item[data-source="Translations"]',
value: 'Übersetzung2', value: 'Übersetzung2',

View file

@ -293,6 +293,32 @@ class TestCase < Test::Unit::TestCase
sleep 1 sleep 1
end end
=begin
notify_close(
browser: browser1,
optional: true,
)
=end
def notify_close(params = {})
switch_window_focus(params)
log('notify_close', params)
instance = params[:browser] || @browser
notify = instance.find_elements(css: '.noty_inline_layout_container.i-am-new')[0]
if !params[:optional] && !notify
screenshot(browser: instance, comment: 'no_notify')
raise 'Unable to closes notify, no notify found!'
end
return if !notify
notify.click
assert(true, 'notify closed')
sleep 1
end
=begin =begin
location( location(