Changeset 17551
- Timestamp:
- 21 Aug 2023, 20:44:19 (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r17511 r17551 1210 1210 # All beds can be assigned 1211 1211 bed1 = self.app['hostels']['hall-1']['hall-1_A_101_A'] 1212 bed1.bed_type = u'regular_male_ all'1212 bed1.bed_type = u'regular_male_fr' 1213 1213 bed2 = self.app['hostels']['hall-1']['hall-1_A_101_B'] 1214 1214 bed2.bed_type = u'regular_female_all' … … 1220 1220 self.browser.getControl(name="form.password").value = 'spwd' 1221 1221 self.browser.getControl("Login").click() 1222 # Students can book accommodation without AC ...1223 1222 self.browser.open(self.acco_path) 1224 1223 IWorkflowInfo(self.student).fireTransition('admit') … … 1234 1233 in self.browser.contents) 1235 1234 IWorkflowState(self.student).setState(PAID) 1235 1236 self.browser.getLink("Payments").click() 1237 self.browser.getLink("Add current session payment ticket").click() 1238 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] 1239 self.browser.getControl("Create ticket").click() 1240 self.student['payments'].values()[0].approveStudentPayment() 1241 pin = self.app['accesscodes']['HOS-0'].keys()[0] 1242 ac = self.app['accesscodes']['HOS-0'][pin] 1243 parts = pin.split('-')[1:] 1244 sfeseries, sfenumber = parts 1245 self.browser.open(self.acco_path) 1236 1246 self.browser.getControl("Book accommodation").click() 1237 1247 #self.assertFalse('Activation Code:' in self.browser.contents) 1248 1249 self.assertMatches('...Activation Code:...', 1250 self.browser.contents) 1251 self.browser.getControl(name="ac_series").value = sfeseries 1252 self.browser.getControl(name="ac_number").value = sfenumber 1238 1253 self.browser.getControl("Create bed ticket").click() 1239 1254 # Bed is randomly selected but, since there is only 1240 1255 # one bed for this student, we know that 1241 1256 self.assertEqual(self.student['accommodation']['2004'].bed_coordinates, 1242 'Hall 1, Block A, Room 101, Bed A (regular_male_ all)')1257 'Hall 1, Block A, Room 101, Bed A (regular_male_fr)') 1243 1258 # Only the hall name is displayed 1244 1259 self.assertEqual(self.student[
Note: See TracChangeset for help on using the changeset viewer.