Ignore:
Timestamp:
Aug 5, 2010 4:20:18 PM (10 years ago)
Author:
liebster
Message:

Added testing view data from spreadsheet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.gdocs.spreadsheet/trunk/quintagroup/gdocs/spreadsheet/README.txt

    r2725 r2727  
    8282    >>> browser.getControl(name='spreadsheet_id').value = 'sp_id1' 
    8383    >>> browser.getControl(name='worksheet_id').value = 'od6' 
     84    >>> browser.getControl(name='order_columns.column_key:records',index=0).value 
     85    [] 
     86    >>> browser.getControl(name='order_columns.column_title:records', index=0).value 
     87    '' 
    8488    >>> browser.getControl('Save').click() 
    8589    >>> 'Changes saved' in browser.contents 
     
    97101    >>> browser.getControl(name='spreadsheet_id').value = 'id1' 
    98102    >>> browser.getControl(name='worksheet_id').value = 'od6' 
    99     >>> browser.getControl('Save').click() 
    100  
     103    >>> browser.getControl(name='order_columns.orderindex_:records',index=0).value = '1'     
     104    >>> browser.getControl(name='order_columns.column_key:records',index=0).value = ['col1'] 
     105    >>> browser.getControl(name='order_columns.column_title:records', index=0).value = 'Title 1' 
     106    >>> browser.getControl('Save').click() 
     107    >>> browser.getLink('Edit').click() 
     108    >>> browser.getControl(name='order_columns.orderindex_:records',index=1).value = '2'     
     109    >>> browser.getControl(name='order_columns.column_key:records',index=1).value = ['col2'] 
     110    >>> browser.getControl(name='order_columns.column_title:records', index=1).value = 'Title 2' 
     111    >>> browser.getControl('Save').click() 
     112     
    101113We check that the changes were applied. 
    102114 
     
    105117    >>> 'New GSpreadsheet Sample' in browser.contents 
    106118    True 
     119    >>> browser.contents 
     120    '...<table id="sshwsh"><tr><th>Title 1</th><th>Title 2</th></tr><tr><td>11</td><td>12</td></tr>\n<tr><td>21</td><td>22</td></tr>\n<tr><td>31</td><td>32</td></tr>\n<tr><td>41</td><td>42</td></tr>\n<tr><td>51</td><td>52</td></tr>\n</table>...' 
     121 
     122Let's click on the 'edit' tab and update the object attribute values. 
     123 
     124    >>> browser.getLink('Edit').click() 
     125    >>> browser.getControl(name='order_columns.orderindex_:records',index=1).value = '2'     
     126    >>> browser.getControl(name='order_columns.column_key:records',index=1).value = ['col3'] 
     127    >>> browser.getControl(name='order_columns.column_title:records', index=1).value = 'Title 3' 
     128    >>> browser.getControl('Save').click() 
     129 
     130We check that the changes were applied. 
     131 
     132    >>> 'Changes saved' in browser.contents 
     133    True 
     134    >>> browser.contents 
     135    '...<table id="sshwsh"><tr><th>Title 1</th><th>Title 3</th></tr><tr><td>11</td><td>13</td></tr>\n<tr><td>21</td><td>23</td></tr>\n<tr><td>31</td><td>33</td></tr>\n<tr><td>41</td><td>43</td></tr>\n<tr><td>51</td><td>53</td></tr>\n</table>...' 
    107136 
    108137Removing a/an GSpreadsheet content item 
Note: See TracChangeset for help on using the changeset viewer.