Changeset 7208 for main


Ignore:
Timestamp:
26 Nov 2011, 09:27:08 (13 years ago)
Author:
uli
Message:

Remove trailing whitespace, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r7204 r7208  
    7474  >>> 'Sample University' in browser.contents
    7575  True
    76  
     76
    7777The edit form contains the default value for the portal skin::
    7878
    7979  >>> 'waeuptheme-gray1.css' in browser.contents
    80   True 
     80  True
    8181
    8282We can perform several actions on the edit form::
     
    188188  >>> browser.getControl(name='descr').value = "test message"
    189189  >>> browser.getControl('Submit').click()
    190   >>> print browser.contents     
     190  >>> print browser.contents
    191191  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    192192  ...<li class="message">Error: xx@yy is not a valid email address.</li>
     
    200200  >>> browser.getControl(name='descr').value = "test message"
    201201  >>> browser.getControl('Submit').click()
    202   >>> print browser.contents     
     202  >>> print browser.contents
    203203  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    204204  ...<li class="message">Your message has been sent.</li>
     
    225225  >>> browser.getControl('Cancel').click()
    226226  >>> browser.open('http://localhost/myuniversity/faculties/add')
    227  
     227
    228228We fill in a new name for our new faculty::
    229229
     
    303303  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
    304304  >>> browser.getControl(name="user").value = ['bob']
    305   >>> browser.getControl(name="local_role").value = ['waeup.local.DepartmentManager']
     305  >>> browser.getControl(
     306  ...     name="local_role").value = ['waeup.local.DepartmentManager']
    306307  >>> browser.getControl("Add local role").click()
    307308  >>> print browser.contents
     
    438439
    439440Clicking 'Save' we will stay on the settings form. So we can change
    440 the department again. 
     441the department again.
    441442
    442443  >>> browser.getControl(name='form.title').value = "My renamed dept"
     
    459460  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage')
    460461  >>> browser.getControl(name="user").value = ['bob']
    461   >>> browser.getControl(name="local_role").value = ['waeup.local.DepartmentManager']
     462  >>> browser.getControl(
     463  ...     name="local_role").value = ['waeup.local.DepartmentManager']
    462464  >>> browser.getControl("Add local role").click()
    463465  >>> print browser.contents
     
    478480  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage')
    479481  >>> ctrl = browser.getControl(name='role_id')
    480   >>> ctrl.getControl(value='bob|waeup.local.DepartmentManager').selected = True
     482  >>> ctrl.getControl(
     483  ...     value='bob|waeup.local.DepartmentManager').selected = True
    481484  >>> browser.getControl("Remove selected local roles").click()
    482485  >>> print browser.contents
     
    621624afterwards:
    622625
    623   >>> browser.getControl(name='form.title').value = "My renamed course" 
     626  >>> browser.getControl(name='form.title').value = "My renamed course"
    624627  >>> ctrl = browser.getControl("Save and return")
    625628  >>> ctrl.click()
     
    673676----------------
    674677
    675 We can delete courses by browsing the manage page of the containing department and
    676 checking the appropriate select box and clicking the ´´Remove selected´´ button.
    677 
    678   >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-2')
     678We can delete courses by browsing the manage page of the containing
     679department and checking the appropriate select box and clicking the
     680´´Remove selected´´ button.
     681
     682  >>> browser.open(
     683  ...     'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-2')
    679684  >>> 'My renamed course' in browser.contents
    680685  True
     
    686691  True
    687692
    688   >>> browser.getControl(name='val_id').getControl(value='COURSE1').selected = True
     693  >>> browser.getControl(
     694  ...    name='val_id').getControl(value='COURSE1').selected = True
    689695  >>> browser.getControl('Remove selected courses').click()
    690696
     
    826832
    827833Clicking 'Save' we will stay on the settings form. So we can change
    828 the cert again. 
    829 
    830   >>> browser.getControl(name='form.title').value = "My renamed cert" 
     834the cert again.
     835
     836  >>> browser.getControl(name='form.title').value = "My renamed cert"
    831837  >>> ctrl = browser.getControl("Save",index=0)
    832838  >>> ctrl.click()
     
    869875---------------------
    870876
    871 We can delete certificates by browsing the manage page of the containing department and
    872 checking the appropriate select box and clicking the ´´Remove selected´´ button.
    873 
    874   >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-3')
     877We can delete certificates by browsing the manage page of the
     878containing department and checking the appropriate select box and
     879clicking the ´´Remove selected´´ button.
     880
     881  >>> browser.open(
     882  ...    'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-3')
    875883  >>> 'My renamed cert' in browser.contents
    876884  True
     
    880888  True
    881889
    882   >>> browser.getControl(name='val_id').getControl(value='CERT1').selected = True
     890  >>> browser.getControl(name='val_id').getControl(
     891  ...    value='CERT1').selected = True
    883892  >>> browser.getControl('Remove selected certificates').click()
    884893  >>> 'My renamed cert' in browser.contents
     
    899908  >>> ctrl.value = 'Another course with same code'
    900909  >>> browser.getControl(name='form.code').value = 'COURSE1'
    901   >>> browser.getControl(name='form.title').value = 'Course 1' 
     910  >>> browser.getControl(name='form.title').value = 'Course 1'
    902911  >>> browser.getControl('Add course').click()
    903912
     
    930939  >>> browser.getControl(name='form.application_category').value = ['basic']
    931940  >>> browser.getControl('Add certificate').click()
    932  
     941
    933942
    934943Adding certificatecourses
     
    962971
    963972  >>> ctrl.getControl('COURSE1').selected = True
    964   >>> browser.getControl(name='form.level').value = ['100'] 
     973  >>> browser.getControl(name='form.level').value = ['100']
    965974  >>> browser.getControl('Add course referrer').click()
    966975
     
    10141023
    10151024  >>> browser.open(cert_url + '/COURSE1_100/manage')
    1016   >>> browser.getControl(name='form.level').value = ['200']     
     1025  >>> browser.getControl(name='form.level').value = ['200']
    10171026  >>> browser.getControl("Save and return").click()
    10181027
     
    10661075  >>> 'No item selected' in browser.contents
    10671076  True
    1068   >>> browser.getControl(name='val_id').getControl(value='COURSE1_200').selected = True
     1077  >>> browser.getControl(name='val_id').getControl(
     1078  ...    value='COURSE1_200').selected = True
    10691079  >>> browser.getControl('Remove selected course referrers').click()
    10701080  >>> 'Successfully removed: COURSE1_200' in browser.contents
    10711081  True
    1072  
     1082
    10731083  >>> 'COURSE1_200</a>' in browser.contents
    10741084  False
     
    11621172  >>> filewidget
    11631173  <Control name='uploadfile:file' type='file'>
    1164  
     1174
    11651175A sidenote for developers: by marking the filewidget with the
    11661176``:file`` extension, we tell Zope to handle this field as a file
     
    11711181  ...   open('faculties.csv', 'rb').read())
    11721182  >>> filewidget.add_file(filecontents, 'text/plain', 'myfaculties.csv')
    1173  
     1183
    11741184  >>> browser.getControl(name='SUBMIT').click()
    11751185
Note: See TracChangeset for help on using the changeset viewer.