- Timestamp:
- 19 Jul 2012, 17:33:30 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt
r9023 r9024 75 75 76 76 >>> import cStringIO 77 >>> browser.getLink('Upload CSV file').click()77 >>> browser.getLink('Upload data').click() 78 78 >>> filecontents = cStringIO.StringIO( 79 79 ... open('faculties.csv', 'rb').read()) … … 84 84 Step 1: start batch processing: 85 85 86 >>> browser.getLink(' Batch processing').click()86 >>> browser.getLink('Process data').click() 87 87 >>> button = lookup_submit_value( 88 88 ... 'select', 'faculties_zope.mgr.csv', browser) … … 177 177 178 178 >>> import cStringIO 179 >>> browser.getLink('Upload CSV file').click()179 >>> browser.getLink('Upload data').click() 180 180 >>> filecontents = cStringIO.StringIO( 181 181 ... open('departments.csv', 'rb').read()) … … 186 186 Step 1: start batch processing: 187 187 188 >>> browser.getLink(' Batch processing').click()188 >>> browser.getLink('Process data').click() 189 189 >>> button = lookup_submit_value( 190 190 ... 'select', 'departments_zope.mgr.csv', browser) … … 242 242 243 243 >>> import cStringIO 244 >>> browser.getLink('Upload CSV file').click()244 >>> browser.getLink('Upload data').click() 245 245 >>> filecontents = cStringIO.StringIO( 246 246 ... open('courses.csv', 'rb').read()) … … 251 251 Step 1: start batch processing: 252 252 253 >>> browser.getLink(' Batch processing').click()253 >>> browser.getLink('Process data').click() 254 254 >>> button = lookup_submit_value( 255 255 ... 'select', 'courses_zope.mgr.csv', browser) … … 307 307 308 308 >>> import cStringIO 309 >>> browser.getLink('Upload CSV file').click()309 >>> browser.getLink('Upload data').click() 310 310 >>> filecontents = cStringIO.StringIO( 311 311 ... open('certificates.csv', 'rb').read()) … … 316 316 Step 1: start batch processing: 317 317 318 >>> browser.getLink(' Batch processing').click()318 >>> browser.getLink('Process data').click() 319 319 >>> button = lookup_submit_value( 320 320 ... 'select', 'certificates_zope.mgr.csv', browser) … … 373 373 374 374 >>> import cStringIO 375 >>> browser.getLink('Upload CSV file').click()375 >>> browser.getLink('Upload data').click() 376 376 >>> filecontents = cStringIO.StringIO( 377 377 ... open('mycertcourses.csv', 'rb').read()) … … 382 382 Step 1: start batch processing: 383 383 384 >>> browser.getLink(' Batch processing').click()384 >>> browser.getLink('Process data').click() 385 385 >>> button = lookup_submit_value( 386 386 ... 'select', 'mycertcourses_zope.mgr.csv', browser) … … 438 438 439 439 >>> import cStringIO 440 >>> browser.getLink('Upload CSV file').click()440 >>> browser.getLink('Upload data').click() 441 441 >>> filecontents = cStringIO.StringIO( 442 442 ... open('users.csv', 'rb').read()) … … 447 447 Step 1: start batch processing: 448 448 449 >>> browser.getLink(' Batch processing').click()449 >>> browser.getLink('Process data').click() 450 450 >>> button = lookup_submit_value( 451 451 ... 'select', 'users_zope.mgr.csv', browser) … … 510 510 511 511 >>> import cStringIO 512 >>> browser.getLink('Upload CSV file').click()512 >>> browser.getLink('Upload data').click() 513 513 >>> filecontents = cStringIO.StringIO( 514 514 ... open('newfaculties.csv', 'rb').read()) … … 519 519 Step 1: start batch processing: 520 520 521 >>> browser.getLink(' Batch processing').click()521 >>> browser.getLink('Process data').click() 522 522 >>> button = lookup_submit_value( 523 523 ... 'select', 'newfaculties_zope.mgr.csv', browser) … … 581 581 582 582 >>> browser.open('http://localhost/app/datacenter') 583 >>> browser.getLink(' Batch processing').click()583 >>> browser.getLink('Process data').click() 584 584 >>> button = lookup_submit_value( 585 585 ... 'select', 'newfaculties_zope.mgr.create.pending.csv', browser) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r8920 r9024 1218 1218 page: 1219 1219 1220 >>> browser.getLink('Upload CSV file').click()1220 >>> browser.getLink('Upload data').click() 1221 1221 1222 1222 and enter the appropriate data in the form: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9023 r9024 825 825 grok.name('upload') 826 826 grok.require('waeup.manageDataCenter') 827 label = _(u'Upload file')827 label = _(u'Upload portal data as CSV file') 828 828 pnav = 0 829 829 upload_button =_(u'Upload') … … 875 875 base, ext = os.path.splitext(filename) 876 876 return '%s_%s%s' % (base, filtered_username, ext.lower()) 877 878 def getImporters(self): 879 importers = getAllUtilitiesRegisteredFor(IBatchProcessor) 880 importers = sorted( 881 [dict(title=x.name, name=x.util_name, fields=x.available_fields) 882 for x in importers], key=lambda k: k['title']) 883 return importers 877 884 878 885 class FileDownloadView(UtilityView, grok.View): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt
r7705 r9024 9 9 </div> 10 10 </form> 11 12 <br /><br /> 13 14 <h2 i18n:translate="">Available Processors (Importers)</h2> 15 16 <table i18n:domain="waeup.kofa"> 17 <thead> 18 <tr> 19 <th i18n:translate="">Processor</th> 20 <th i18n:translate="">Available Fields</th> 21 </tr> 22 </thead> 23 <tr tal:repeat="importer view/getImporters"> 24 <td tal:content="importer/title"></td> 25 <td> 26 <span tal:repeat="field python:sorted(importer['fields'])"> 27 <span tal:replace="field"></span>, 28 </span> 29 </td> 30 </tr> 31 </table> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r8992 r9024 122 122 self.assertEqual(self.browser.headers['Status'], '200 Ok') 123 123 self.assertEqual(self.browser.url, self.datacenter_path) 124 self.browser.getLink("Upload CSV file").click()124 self.browser.getLink("Upload data").click() 125 125 file = open(SAMPLE_FILE) 126 126 ctrl = self.browser.getControl(name='uploadfile:file') … … 154 154 self.assertEqual(self.browser.headers['Status'], '200 Ok') 155 155 self.assertEqual(self.browser.url, self.datacenter_path) 156 self.browser.getLink("Export CSV file").click()156 self.browser.getLink("Export data").click() 157 157 self.browser.getControl(name="exporter").value = ['faculties'] 158 158 self.browser.getControl("Download").click() -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r9023 r9024 481 481 icon = 'actionicon_up.png' 482 482 target = '@@upload' 483 text = _('Upload CSV file')483 text = _('Upload data') 484 484 485 485 class BatchOpButton(ActionButton): … … 490 490 icon = 'actionicon_gear.png' 491 491 target = '@@import1' 492 text = _(' Batch processing')492 text = _('Process data') 493 493 494 494 class ExportCSVButton(ActionButton): … … 499 499 icon = 'actionicon_down.png' 500 500 target = '@@export' 501 text = _('Export CSV file')501 text = _('Export data') 502 502 503 503 class BrowseFinishedFiles(ActionButton): … … 508 508 icon = 'actionicon_finished.png' 509 509 target = '@@processed' 510 text = _(' Processed Files')510 text = _('View processed files') 511 511 512 512 # -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9022 r9024 781 781 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 782 782 self.browser.open(datacenter_path) 783 self.browser.getLink('Upload CSV file').click()783 self.browser.getLink('Upload data').click() 784 784 filecontents = StringIO(open('students.csv', 'rb').read()) 785 785 filewidget = self.browser.getControl(name='uploadfile:file') 786 786 filewidget.add_file(filecontents, 'text/plain', 'students.csv') 787 787 self.browser.getControl(name='SUBMIT').click() 788 self.browser.getLink(' Batch processing').click()788 self.browser.getLink('Process data').click() 789 789 button = lookup_submit_value( 790 790 'select', 'students_zope.mgr.csv', self.browser) … … 807 807 """) 808 808 self.browser.open(datacenter_path) 809 self.browser.getLink('Upload CSV file').click()809 self.browser.getLink('Upload data').click() 810 810 filecontents = StringIO(open('studycourses.csv', 'rb').read()) 811 811 filewidget = self.browser.getControl(name='uploadfile:file') 812 812 filewidget.add_file(filecontents, 'text/plain', 'studycourses.csv') 813 813 self.browser.getControl(name='SUBMIT').click() 814 self.browser.getLink(' Batch processing').click()814 self.browser.getLink('Process data').click() 815 815 button = lookup_submit_value( 816 816 'select', 'studycourses_zope.mgr.csv', self.browser)
Note: See TracChangeset for help on using the changeset viewer.