Changeset 9423 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 26 Oct 2012, 07:55:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9420 r9423 186 186 configuration.clearance_fee = 3456.0 187 187 configuration.booking_fee = 123.4 188 configuration.maint_fee = 987.0 188 189 self.app['configuration'].addSessionConfiguration(configuration) 189 190 … … 1889 1890 self.browser.contents) 1890 1891 1891 def test_student_ payments(self):1892 def test_student_clearance_payment(self): 1892 1893 # Login 1893 1894 self.browser.open(self.login_path) … … 1965 1966 self.browser.contents) 1966 1967 1968 def test_student_schoolfee_payment(self): 1969 # Login 1970 self.browser.open(self.login_path) 1971 self.browser.getControl(name="form.login").value = self.student_id 1972 self.browser.getControl(name="form.password").value = 'spwd' 1973 self.browser.getControl("Login").click() 1974 1967 1975 # Students can add online school fee payment tickets. 1968 1976 IWorkflowState(self.student).setState('returning') 1969 1977 self.browser.open(self.payments_path) 1978 self.assertRaises( 1979 LookupError, self.browser.getControl, name='val_id') 1970 1980 self.browser.getControl("Add online payment ticket").click() 1971 1981 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 1997 2007 self.assertMatches('...Payment approved...', 1998 2008 self.browser.contents) 1999 2000 # Students can remove only online payment tickets which have2001 # not received a valid callback2002 self.browser.open(self.payments_path)2003 self.assertRaises(2004 LookupError, self.browser.getControl, name='val_id')2005 self.browser.open(self.payments_path + '/addop')2006 self.browser.getControl(name="form.p_category").value = ['bed_allocation']2007 self.browser.getControl("Create ticket").click()2008 self.browser.open(self.payments_path)2009 ctrl = self.browser.getControl(name='val_id')2010 value = ctrl.options[0]2011 ctrl.getControl(value=value).selected = True2012 self.browser.getControl("Remove selected", index=0).click()2013 self.assertTrue('Successfully removed' in self.browser.contents)2014 2009 2015 2010 # The new SFE-0 pin can be used for starting new session … … 2026 2021 self.assertTrue(self.student.state == 'school fee paid') 2027 2022 return 2023 2024 def test_student_bedallocation_payment(self): 2025 # Login 2026 self.browser.open(self.login_path) 2027 self.browser.getControl(name="form.login").value = self.student_id 2028 self.browser.getControl(name="form.password").value = 'spwd' 2029 self.browser.getControl("Login").click() 2030 self.browser.open(self.payments_path) 2031 self.browser.open(self.payments_path + '/addop') 2032 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] 2033 self.browser.getControl("Create ticket").click() 2034 self.assertMatches('...ticket created...', 2035 self.browser.contents) 2036 # Students can remove only online payment tickets which have 2037 # not received a valid callback 2038 self.browser.open(self.payments_path) 2039 ctrl = self.browser.getControl(name='val_id') 2040 value = ctrl.options[0] 2041 ctrl.getControl(value=value).selected = True 2042 self.browser.getControl("Remove selected", index=0).click() 2043 self.assertTrue('Successfully removed' in self.browser.contents) 2044 2045 def test_student_maintenance_payment(self): 2046 # Login 2047 self.browser.open(self.login_path) 2048 self.browser.getControl(name="form.login").value = self.student_id 2049 self.browser.getControl(name="form.password").value = 'spwd' 2050 self.browser.getControl("Login").click() 2051 self.browser.open(self.payments_path) 2052 self.browser.open(self.payments_path + '/addop') 2053 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 2054 self.browser.getControl("Create ticket").click() 2055 self.assertMatches('...You have not yet booked a bed...', 2056 self.browser.contents) 2057 # We continue this test in test_student_accommodation 2028 2058 2029 2059 def test_student_previous_payments(self): … … 2285 2315 self.assertFalse('Remove' in self.browser.contents) 2286 2316 self.assertFalse('val_id' in self.browser.contents) 2317 2318 # Students can pay maintenance fee now 2319 self.browser.open(self.payments_path) 2320 self.browser.open(self.payments_path + '/addop') 2321 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 2322 self.browser.getControl("Create ticket").click() 2323 self.assertMatches('...Payment ticket created...', 2324 self.browser.contents) 2287 2325 return 2288 2326
Note: See TracChangeset for help on using the changeset viewer.