Ignore:
Timestamp:
25 Nov 2016, 10:06:54 (8 years ago)
Author:
Henrik Bettermann
Message:

Add control button to create graduated students.

File:
1 edited

Legend:

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

    r14286 r14293  
    425425        self.browser.getControl("Find student(s)").click()
    426426        self.assertTrue('No student found' in self.browser.contents)
     427        return
     428
     429    def test_add_graduated_students(self):
     430        # Managers can add search and remove students
     431        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     432        self.browser.open(self.manage_container_path)
     433        self.browser.getLink("Add student").click()
     434        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     435        self.assertEqual(self.browser.url, self.add_student_path)
     436        self.browser.getControl(name="form.firstname").value = 'Bob'
     437        self.browser.getControl(name="form.lastname").value = 'Tester'
     438        self.browser.getControl(name="form.reg_number").value = '1234'
     439        self.browser.getControl("Create graduated student").click()
     440        self.assertTrue('Student record created' in self.browser.contents)
     441        self.assertEqual(self.app['students']['K1000001'].state, 'graduated')
    427442        return
    428443
Note: See TracChangeset for help on using the changeset viewer.