Changeset 7208 for main/waeup.sirp/trunk/src
- Timestamp:
- 26 Nov 2011, 09:27:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r7204 r7208 74 74 >>> 'Sample University' in browser.contents 75 75 True 76 76 77 77 The edit form contains the default value for the portal skin:: 78 78 79 79 >>> 'waeuptheme-gray1.css' in browser.contents 80 True 80 True 81 81 82 82 We can perform several actions on the edit form:: … … 188 188 >>> browser.getControl(name='descr').value = "test message" 189 189 >>> browser.getControl('Submit').click() 190 >>> print browser.contents 190 >>> print browser.contents 191 191 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 192 192 ...<li class="message">Error: xx@yy is not a valid email address.</li> … … 200 200 >>> browser.getControl(name='descr').value = "test message" 201 201 >>> browser.getControl('Submit').click() 202 >>> print browser.contents 202 >>> print browser.contents 203 203 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 204 204 ...<li class="message">Your message has been sent.</li> … … 225 225 >>> browser.getControl('Cancel').click() 226 226 >>> browser.open('http://localhost/myuniversity/faculties/add') 227 227 228 228 We fill in a new name for our new faculty:: 229 229 … … 303 303 >>> browser.open('http://localhost/myuniversity/faculties/TF/manage') 304 304 >>> browser.getControl(name="user").value = ['bob'] 305 >>> browser.getControl(name="local_role").value = ['waeup.local.DepartmentManager'] 305 >>> browser.getControl( 306 ... name="local_role").value = ['waeup.local.DepartmentManager'] 306 307 >>> browser.getControl("Add local role").click() 307 308 >>> print browser.contents … … 438 439 439 440 Clicking 'Save' we will stay on the settings form. So we can change 440 the department again. 441 the department again. 441 442 442 443 >>> browser.getControl(name='form.title').value = "My renamed dept" … … 459 460 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage') 460 461 >>> browser.getControl(name="user").value = ['bob'] 461 >>> browser.getControl(name="local_role").value = ['waeup.local.DepartmentManager'] 462 >>> browser.getControl( 463 ... name="local_role").value = ['waeup.local.DepartmentManager'] 462 464 >>> browser.getControl("Add local role").click() 463 465 >>> print browser.contents … … 478 480 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage') 479 481 >>> ctrl = browser.getControl(name='role_id') 480 >>> ctrl.getControl(value='bob|waeup.local.DepartmentManager').selected = True 482 >>> ctrl.getControl( 483 ... value='bob|waeup.local.DepartmentManager').selected = True 481 484 >>> browser.getControl("Remove selected local roles").click() 482 485 >>> print browser.contents … … 621 624 afterwards: 622 625 623 >>> browser.getControl(name='form.title').value = "My renamed course" 626 >>> browser.getControl(name='form.title').value = "My renamed course" 624 627 >>> ctrl = browser.getControl("Save and return") 625 628 >>> ctrl.click() … … 673 676 ---------------- 674 677 675 We can delete courses by browsing the manage page of the containing department and 676 checking the appropriate select box and clicking the ´´Remove selected´´ button. 677 678 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-2') 678 We can delete courses by browsing the manage page of the containing 679 department and checking the appropriate select box and clicking the 680 ´´Remove selected´´ button. 681 682 >>> browser.open( 683 ... 'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-2') 679 684 >>> 'My renamed course' in browser.contents 680 685 True … … 686 691 True 687 692 688 >>> browser.getControl(name='val_id').getControl(value='COURSE1').selected = True 693 >>> browser.getControl( 694 ... name='val_id').getControl(value='COURSE1').selected = True 689 695 >>> browser.getControl('Remove selected courses').click() 690 696 … … 826 832 827 833 Clicking 'Save' we will stay on the settings form. So we can change 828 the cert again. 829 830 >>> browser.getControl(name='form.title').value = "My renamed cert" 834 the cert again. 835 836 >>> browser.getControl(name='form.title').value = "My renamed cert" 831 837 >>> ctrl = browser.getControl("Save",index=0) 832 838 >>> ctrl.click() … … 869 875 --------------------- 870 876 871 We can delete certificates by browsing the manage page of the containing department and 872 checking the appropriate select box and clicking the ´´Remove selected´´ button. 873 874 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-3') 877 We can delete certificates by browsing the manage page of the 878 containing department and checking the appropriate select box and 879 clicking the ´´Remove selected´´ button. 880 881 >>> browser.open( 882 ... 'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-3') 875 883 >>> 'My renamed cert' in browser.contents 876 884 True … … 880 888 True 881 889 882 >>> browser.getControl(name='val_id').getControl(value='CERT1').selected = True 890 >>> browser.getControl(name='val_id').getControl( 891 ... value='CERT1').selected = True 883 892 >>> browser.getControl('Remove selected certificates').click() 884 893 >>> 'My renamed cert' in browser.contents … … 899 908 >>> ctrl.value = 'Another course with same code' 900 909 >>> browser.getControl(name='form.code').value = 'COURSE1' 901 >>> browser.getControl(name='form.title').value = 'Course 1' 910 >>> browser.getControl(name='form.title').value = 'Course 1' 902 911 >>> browser.getControl('Add course').click() 903 912 … … 930 939 >>> browser.getControl(name='form.application_category').value = ['basic'] 931 940 >>> browser.getControl('Add certificate').click() 932 941 933 942 934 943 Adding certificatecourses … … 962 971 963 972 >>> ctrl.getControl('COURSE1').selected = True 964 >>> browser.getControl(name='form.level').value = ['100'] 973 >>> browser.getControl(name='form.level').value = ['100'] 965 974 >>> browser.getControl('Add course referrer').click() 966 975 … … 1014 1023 1015 1024 >>> browser.open(cert_url + '/COURSE1_100/manage') 1016 >>> browser.getControl(name='form.level').value = ['200'] 1025 >>> browser.getControl(name='form.level').value = ['200'] 1017 1026 >>> browser.getControl("Save and return").click() 1018 1027 … … 1066 1075 >>> 'No item selected' in browser.contents 1067 1076 True 1068 >>> browser.getControl(name='val_id').getControl(value='COURSE1_200').selected = True 1077 >>> browser.getControl(name='val_id').getControl( 1078 ... value='COURSE1_200').selected = True 1069 1079 >>> browser.getControl('Remove selected course referrers').click() 1070 1080 >>> 'Successfully removed: COURSE1_200' in browser.contents 1071 1081 True 1072 1082 1073 1083 >>> 'COURSE1_200</a>' in browser.contents 1074 1084 False … … 1162 1172 >>> filewidget 1163 1173 <Control name='uploadfile:file' type='file'> 1164 1174 1165 1175 A sidenote for developers: by marking the filewidget with the 1166 1176 ``:file`` extension, we tell Zope to handle this field as a file … … 1171 1181 ... open('faculties.csv', 'rb').read()) 1172 1182 >>> filewidget.add_file(filecontents, 'text/plain', 'myfaculties.csv') 1173 1183 1174 1184 >>> browser.getControl(name='SUBMIT').click() 1175 1185
Note: See TracChangeset for help on using the changeset viewer.