Ignore:
Timestamp:
24 Aug 2011, 20:25:44 (13 years ago)
Author:
Henrik Bettermann
Message:

Add some basic UI stuff to start and to play with.

File:
1 edited

Legend:

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

    r6621 r6622  
    104104        # Anonymous users can't access students containers
    105105        self.assertRaises(
     106            Unauthorized, self.browser.open, self.container_path)
     107        self.assertRaises(
    106108            Unauthorized, self.browser.open, self.manage_container_path)
    107109        return
     
    114116        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    115117        self.assertEqual(self.browser.url, self.container_path)
     118        self.browser.getLink("Manage students").click()
     119        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     120        self.assertEqual(self.browser.url, self.manage_container_path)
    116121        return
     122
     123    def test_add_students(self):
     124        # Managers can add students
     125        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     126        self.add_student_path = self.container_path + '/addstudent'
     127        self.container_manage_path = self.container_path + '/@@manage'
     128        self.browser.open(self.container_manage_path)
     129        self.browser.getControl("Add student").click()
     130        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     131        self.assertEqual(self.browser.url, self.add_student_path)
     132        self.browser.getControl(name="form.student_id").value = 'A123456'
     133        self.browser.getControl(name="form.name").value = 'Bob Tester'
     134        self.browser.getControl("Create student record").click()
Note: See TracChangeset for help on using the changeset viewer.