def _do_studio_prompt_action(intent, action):
 assert (intent in ['warning', 'error', 'confirmation', 'announcement', 'step-required', 'help', 'mini'])
 assert (action in ['primary', 'secondary'])
 world.wait_for_present('div.wrapper-prompt.is-shown#prompt-{}'.format(intent))
 action_css = 'li.nav-item > button.action-{}'.format(action)
 world.trigger_event(action_css, event='focus')
 world.browser.execute_script("$('{}').click()".format(action_css))
 world.wait_for_ajax_complete()
 world.wait_for_present('div.wrapper-prompt.is-hiding#prompt-{}'.format(intent))

def _do_studio_prompt_action ( intent , action ) : assert ( intent in [ 'warning' , 'error' , 'confirmation' , 'announcement' , 'step-required' , 'help' , 'mini' ] ) assert ( action in [ 'primary' , 'secondary' ] ) world . wait_for_present ( 'div.wrapper-prompt.is-shown#prompt-{}' . format ( intent ) ) action_css = 'li.nav-item > button.action-{}' . format ( action ) world . trigger_event ( action_css , event = 'focus' ) world . browser . execute_script ( "$('{}').click()" . format ( action_css ) ) world . wait_for_ajax_complete ( ) world . wait_for_present ( 'div.wrapper-prompt.is-hiding#prompt-{}' . format ( intent ) )
wait for a studio prompt to appear and press the specified action button see common/js/components/views/feedback_prompt .