ó
ú2¢\c           @   s?   d  d l  m Z d d l m Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   Keysi   (   t   shiftc         C   s   d } |  j  j | ƒ S(   NsK   return Jupyter.notebook.get_cells().map(function(c) {return c.get_text();})(   t   browsert   execute_script(   t   nbt   JS(    (    s?   lib/python2.7/site-packages/notebook/tests/selenium/undelete.pyt   get_cells_contents   s    c         C   s   |  j  j d ƒ d  S(   Ns!   Jupyter.notebook.undelete_cell();(   R   R   (   R   (    (    s?   lib/python2.7/site-packages/notebook/tests/selenium/undelete.pyt   undelete   s    c         C   sÍ  d } d } d } d } |  j  d d d | ƒ |  j | | | ƒ |  j ƒ  t |  ƒ | | | | g k so t ‚ |  j d ƒ t |  j t j	 ƒ |  j
 j d	 ƒ t |  ƒ | | g k s½ t ‚ |  j d ƒ |  j
 j d	 ƒ t |  ƒ | g k sõ t ‚ t |  ƒ t |  ƒ | | g k st ‚ t |  ƒ t |  ƒ | | | | g k sKt ‚ t |  ƒ t |  ƒ | | | | g k syt ‚ |  j d ƒ t |  j t j	 ƒ |  j
 j d	 ƒ t |  ƒ | | g k sÇt ‚ t |  ƒ t |  ƒ | | | | g k sõt ‚ |  j d
 ƒ t |  j t j ƒ |  j
 j d	 ƒ t |  ƒ | | g k sCt ‚ t |  ƒ t |  ƒ | | | | g k sqt ‚ | d | } |  j d ƒ t |  j d ƒ t |  j d ƒ t |  ƒ | | | g k sÍt ‚ t |  ƒ t |  ƒ | | | | g k sût ‚ | d | } |  j d
 ƒ t |  j d ƒ t |  j d ƒ t |  ƒ | | | g k sWt ‚ t |  ƒ t |  ƒ | | | | g k s…t ‚ |  j  d d d | ƒ |  j  d d d | ƒ t |  ƒ | | | | g k sÕt ‚ | d | } |  j d ƒ |  j j d ƒ t |  ƒ | | | g k s!t ‚ t |  ƒ t |  ƒ | | | | g k sOt ‚ | d | } |  j d
 ƒ |  j j d ƒ t |  ƒ | | | g k s›t ‚ t |  ƒ t |  ƒ | | | | g k sÉt ‚ d  S(   Ns
   print("a")s
   print("b")s
   print("c")s
   print("d")t   indexi    t   contenti   t   ddiÿÿÿÿs   

t   jt   mt   ki   s$   Jupyter.notebook.merge_cell_below();s$   Jupyter.notebook.merge_cell_above();(   t	   edit_cellt   appendt   to_command_modeR   t   AssertionErrort
   focus_cellR   R   R    t   DOWNt   current_cellt	   send_keysR   t   UPR   (   t   notebookt   at   bt   ct   dt   bct   cdt   ab(    (    s?   lib/python2.7/site-packages/notebook/tests/selenium/undelete.pyt   test_undelete_cells   s|    
$

$
$
$
$!
$!
$$!
$!
N(   t   selenium.webdriver.common.keysR    t   utilsR   R   R   R   (    (    (    s?   lib/python2.7/site-packages/notebook/tests/selenium/undelete.pyt   <module>   s   		