- Timestamp:
- 2 Dec 2014, 14:38:31 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12112 r12119 1074 1074 self.browser.getLink("c102").click() 1075 1075 self.browser.getLink("Manage").click() 1076 self.browser.getControl(name="form.product ").value = ['SAM']1076 self.browser.getControl(name="form.product_object").value = ['SAM'] 1077 1077 self.browser.getControl(name="form.title").value = 'My second contract' 1078 1078 self.browser.getControl("Save").click() … … 1134 1134 contract = self.customer['contracts']['c102'] 1135 1135 # Contract can be edited ... 1136 self.browser.getLink("c102").click()1137 1136 self.browser.open(self.contracts_path + '/c102/edit') 1138 1137 #self.browser.getLink("Edit").click() … … 1148 1147 # So far last_product_id is None. 1149 1148 self.assertTrue(self.customer['contracts']['c102'].last_product_id is None) 1150 self.browser.getControl(name="form.product ").value = ['SAM']1149 self.browser.getControl(name="form.product_object").value = ['SAM'] 1151 1150 self.browser.getControl("Save").click() 1152 1151 # Document is a required field on edit form page. … … 1157 1156 IWorkflowState(self.document).setState(SUBMITTED) 1158 1157 self.browser.open(self.contracts_path + '/c102/edit') 1159 self.browser.getControl(name="form.product ").value = ['SAM']1160 self.browser.getControl(name="form.document ").value = ['d101']1158 self.browser.getControl(name="form.product_object").value = ['SAM'] 1159 self.browser.getControl(name="form.document_object").value = ['d101'] 1161 1160 self.browser.getControl(name="form.title").value = 'My second contract' 1162 1161 self.browser.getControl("Save").click() … … 1165 1164 self.assertEqual(self.customer['contracts']['c102'].last_product_id, 'SAM') 1166 1165 self.assertEqual(contract.title, 'My second contract') 1167 self.assertEqual(contract.product , self.product)1168 self.assertEqual(contract.document , self.document)1166 self.assertEqual(contract.product_object, self.product) 1167 self.assertEqual(contract.document_object, self.document) 1169 1168 # Saving the form again does not unset last_product_id 1170 1169 self.browser.getControl(name="form.title").value = 'My third contract' … … 1174 1173 self.browser.getLink("View").click() 1175 1174 self.assertEqual(self.browser.url, self.contracts_path + '/c102/index') 1175 # An href attribute is referring to the document and product objects 1176 self.assertTrue('<a href="http://localhost/app/products/SAM">SAM -' 1177 in self.browser.contents) 1178 self.assertTrue( 1179 '<a href="http://localhost/app/customers/K1000000/documents/d101">d101 -' 1180 in self.browser.contents) 1176 1181 # Customer can submit the form. The form is also saved. 1177 1182 self.browser.getLink("Edit").click()
Note: See TracChangeset for help on using the changeset viewer.