Ignore:
Timestamp:
22 Dec 2012, 09:16:05 (12 years ago)
Author:
Henrik Bettermann
Message:

Combine ExportCSVPage and ExportJobContainerOverview? as well as ExportCSVView and ExportJobContainerDownload?. Adjust pagetemplates. Do not remove jobs after download. Display jobs of all users on ExportCSVPage.

One test still fails because we do not have a logger for VirtualExportJobContainers?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py

    r9701 r9822  
    200200        # while the export file is created, we get a reload button
    201201        # (or a loading bar if javascript is enabled)...
    202         self.browser.getControl("Reload").click()
     202        self.assertTrue('Reload' in self.browser.contents)
    203203        # ...which is displayed as long as the job is not finished.
    204204        # When the job is finished and we reload the page...
    205205        job_id = self.wait_for_export_job_completed()
    206         try:
    207             self.browser.getControl("Reload").click()
    208         except LookupError:
    209             # if the job completed very fast, we will get the download
    210             # link immediately
    211             pass
     206        self.browser.open(self.datacenter_path + '/export')
     207        self.assertFalse('Reload' in self.browser.contents)
    212208        # ...we can download the result
    213         self.browser.getControl("Download").click()
     209        self.browser.getLink("Download").click()
    214210        self.assertEqual(self.browser.headers['content-type'],
    215211                         'text/csv; charset=UTF-8')
     
    221217
    222218        # after download, the job and the result file are removed
    223         manager = getUtility(IJobManager)
    224         result = manager.get(job_id)
    225         self.assertEqual(result, None)
    226         self.assertEqual(self.stored_in_datacenter(job_id), False)
     219        #manager = getUtility(IJobManager)
     220        #result = manager.get(job_id)
     221        #self.assertEqual(result, None)
     222        #self.assertEqual(self.stored_in_datacenter(job_id), False)
    227223        logfile = os.path.join(
    228224            self.app['datacenter'].storage, 'logs', 'datacenter.log')
     
    259255        self.browser.getControl("Create CSV file").click()
    260256        job_id = self.wait_for_export_job_completed()
    261         try:
    262             self.browser.getControl("Reload").click()
    263         except LookupError:
    264             pass
    265         self.browser.getControl("Download").click()
     257        self.browser.open(self.datacenter_path + '/@@export')
     258        self.browser.getLink("Download").click()
    266259        self.assertEqual(self.browser.headers['content-type'],
    267260                         'text/csv; charset=UTF-8')
     
    291284        self.browser.open(self.datacenter_path + '/@@export')
    292285        self.browser.getControl("Discard").click()
    293         self.assertTrue('Discarded export result' in self.browser.contents)
     286        self.assertTrue('Discarded export' in self.browser.contents)
    294287        return
    295288
Note: See TracChangeset for help on using the changeset viewer.