def wait_for_notification(page):
 def _is_saving():
  'Whether or not the notification is currently showing.'
  return page.q(css='.wrapper-notification-mini.is-shown').present
 def _is_saving_done():
  'Whether or not the notification is finished showing.'
  return page.q(css='.wrapper-notification-mini.is-hiding').present
 EmptyPromise(_is_saving, 'Notification should have been shown.', try_interval=0.1, timeout=60).fulfill()
 EmptyPromise(_is_saving_done, 'Notification should have been hidden.', try_interval=0.1, timeout=60).fulfill()

def wait_for_notification ( page ) : def _is_saving ( ) : return page . q ( css = '.wrapper-notification-mini.is-shown' ) . present def _is_saving_done ( ) : return page . q ( css = '.wrapper-notification-mini.is-hiding' ) . present EmptyPromise ( _is_saving , 'Notification should have been shown.' , try_interval = 0.1 , timeout = 60 ) . fulfill ( ) EmptyPromise ( _is_saving_done , 'Notification should have been hidden.' , try_interval = 0.1 , timeout = 60 ) . fulfill ( )
waits for the "mini-notification" to appear and disappear on the given page .