Ignore:
Timestamp:
10 Jun 2012, 20:13:34 (13 years ago)
Author:
Henrik Bettermann
Message:

Disable application slip download in state initialized (managers only) and started.

File:
1 edited

Legend:

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

    r8665 r8666  
    460460        self.browser.getControl("Save").click()
    461461        self.assertMatches('...Form has been saved...', self.browser.contents)
    462         # Open pdf slip
     462        # Pdf slip can't be opened and download button is not available
     463        self.assertFalse('Download application slip' in self.browser.contents)
    463464        self.browser.open(self.slip_path)
     465        self.assertTrue(
     466            'Please pay before trying to download the application slip.'
     467            in self.browser.contents)
     468        # If applicant is in correct state the pdf slip can be opened.
     469        IWorkflowState(self.applicant).setState('paid')
     470        self.browser.open(self.manage_path)
     471        self.browser.getLink("Download application slip").click()
    464472        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    465473        self.assertEqual(self.browser.headers['Content-Type'],
     
    743751        self.assertMatches('...started...',
    744752                           self.browser.contents)
    745         state = IWorkflowState(self.applicant).getState()
    746         self.assertTrue(state == 'started')
     753        self.assertTrue(self.applicant.state == 'started')
    747754        # Let's logout and approve the payment as manager
    748755        self.browser.getLink("Logout").click()
     
    759766        self.assertEqual(payment.r_amount_approved, 200.0)
    760767        self.assertEqual(payment.r_code, 'AP')
    761         state = IWorkflowState(self.applicant).getState()
    762         self.assertTrue(state == 'paid')
     768        self.assertTrue(self.applicant.state == 'paid')
    763769        return
    764770
Note: See TracChangeset for help on using the changeset viewer.