Ignore:
Timestamp:
14 Aug 2011, 20:54:31 (13 years ago)
Author:
Henrik Bettermann
Message:

Further increase test coverage. Yeah, pages.py is now 90% covered.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py

    r6603 r6611  
    562562        # We should be redirected to applicants form.
    563563        self.assertTrue(self.browser.url != self.login_path)
     564        # Applicants see their Access Code in the contact form
     565        self.browser.getLink("Contact").click()
     566        self.assertTrue(
     567            'Access Code:' in self.browser.contents)
    564568        return
    565569
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt

    r6608 r6611  
    4747    >>> browser.getControl(name='move').value = False
    4848    >>> browser.getControl(name='save').click()
     49
     50Set non-usable datacenter path:
     51
     52    >>> browser.getLink('Edit settings').click()
     53    >>> browser.getControl(name='newpath').value = '/'
     54    >>> browser.getControl(name='save').click()
     55    >>> 'Given storage path cannot be used.' in browser.contents
     56    True
     57    >>> browser.getControl('Cancel').click()
     58
    4959
    5060Batch processing faculties
     
    549559    >>> 'datacenter.log' in browser.contents
    550560    True
     561    >>> browser.getControl('Show', index=1).click()
     562    >>> '<input type="submit" name="back" value="Back" />' in browser.contents
     563    True
     564    >>> browser.getControl('Back', index=0).click()
     565    >>> browser.getControl('Back to Data Center').click()
     566    >>> 'Storage path:' in browser.contents
     567    True
    551568
    552569
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r6609 r6611  
    4848  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    4949  ...Error: All fields must be filled...
     50  ...
     51
     52  >>> browser.getControl(name='fullname').value = "Bob Tester"
     53  >>> browser.getControl(name='email').value = "xx@yy.zz"
     54  >>> browser.getControl(name='descr').value = "test message"
     55  >>> browser.getControl('Submit').click()
     56  >>> print browser.contents
     57  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     58  ...<li class="message">Your message has been sent.</li>
    5059  ...
    5160
     
    222231add-form to add new faculties::
    223232
    224   >>> browser.open('http://localhost/myuniversity/faculties/add')
     233  >>> browser.open('http://localhost/myuniversity/faculties/manage')
     234  >>> browser.getControl('Add faculty').click()
    225235  >>> print browser.contents
    226236  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
     
    228238  ...<span>Name of faculty</span>:
    229239  ...
    230 
     240  >>> browser.getControl('Cancel').click()
     241  >>> browser.open('http://localhost/myuniversity/faculties/add')
     242 
    231243We fill in a new name for our new faculty::
    232244
     
    262274  ...<h2>Faculty of TestFac (TF)</h2>...
    263275  ...
     276
     277If we add the same faculty twice, an error message will occur:
     278
     279  >>> browser.open('http://localhost/myuniversity/faculties/add')
     280  >>> ctrl = browser.getControl(name='form.title')
     281  >>> ctrl.value = 'TestFac'
     282  >>> browser.getControl(name='form.code').value = 'TF'
     283  >>> browser.getControl('Add faculty').click()
     284  >>> 'The faculty code chosen already exists.' in browser.contents
     285  True
    264286
    265287Modifying faculties
     
    372394  ...<span>Name of department</span>:
    373395  ...
     396  >>> browser.getControl('Cancel').click()
     397  >>> browser.open('http://localhost/myuniversity/faculties/TF/add')
    374398
    375399We fill in a new name for our new department:
Note: See TracChangeset for help on using the changeset viewer.