Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 16251)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 16266)
@@ -1018,4 +1018,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -1127,7 +1128,4 @@
         # Managers can approve the payment
         self.assertEqual(len(self.app['accesscodes']['CLR-0']),0)
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[1] # The clearance payment is the second in the table
-        self.browser.getLink(value).click()
         self.browser.open(self.browser.url + '/approve')
         self.assertMatches('...Payment approved...',
@@ -1154,7 +1152,4 @@
         # Managers can approve the payment
         self.assertEqual(len(self.app['accesscodes']['TSC-0']),0)
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[2] # The clearance payment is the third in the table
-        self.browser.getLink(value).click()
         self.browser.open(self.browser.url + '/approve')
         self.assertMatches('...Payment approved...',
@@ -1182,4 +1177,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -1196,4 +1192,5 @@
         self.browser.getControl(name="form.p_category").value = ['schoolfee']
         self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -1241,4 +1238,5 @@
                            self.browser.contents)
         self.app['configuration']['2004'].payment_disabled = ['sf_all']
+        self.browser.open(self.payments_path)
         self.browser.getLink("Add current session payment ticket").click()
         self.browser.getControl(name="form.p_category").value = ['schoolfee']
@@ -1281,4 +1279,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -1316,7 +1315,4 @@
         self.browser.getControl(name="form.p_category").value = ['bed_allocation']
         self.browser.getControl("Create ticket").click()
-        ctrl = self.browser.getControl(name='val_id')
-        value = ctrl.options[0]
-        self.browser.getLink(value).click()
         self.browser.open(self.browser.url + '/approve')
         # The new HOS-0 pin has been created
@@ -3203,4 +3199,5 @@
         # Students can't approve the payment
         self.assertEqual(len(self.app['accesscodes']['CLR-0']),0)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3288,4 +3285,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3414,4 +3412,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3479,4 +3478,5 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3518,4 +3518,5 @@
         self.browser.getControl(name="form.p_category").value = ['schoolfee']
         self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3575,4 +3576,5 @@
         self.browser.getControl(name="form.p_category").value = ['bed_allocation']
         self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3692,4 +3694,5 @@
         self.assertMatches('...Payment ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
@@ -3702,4 +3705,5 @@
         self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
         self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[1]
@@ -3760,4 +3764,5 @@
         self.browser.getControl(name="form.p_category").value = ['transcript']
         self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_path)
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
