#NEWLINE# @ given ( 'a shape having click action {action}' ) #NEWLINE# def given_a_shape_having_click_action_action( context , action ) : #NEWLINE# #INDENT# shape_idx = ( 'none' , 'first slide' , 'last slide' , 'previous slide' , 'next slide' , 'last slide viewed' , 'named slide' , 'end show' , 'hyperlink' , 'other presentation' , 'open file' , 'custom slide show' , 'OLE action' , 'run macro' , 'run program' ) . index ( shape_idx ) #NEWLINE# slides = Presentation ( test_pptx ( 'act-props' ) ) . slides #NEWLINE# context . slides = slides #NEWLINE# context . shape = slides [ 2 ] . shapes [ shape_idx ]