Ignore:
Timestamp:
31 Dec 2014, 16:09:01 (10 years ago)
Author:
Henrik Bettermann
Message:

Change button text.

Extend test.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py

    r12351 r12353  
    429429            dict(name=x, title=y) for x, y in allowed_transitions]
    430430
    431     @action(_('Apply now'), style='primary')
     431    @action(_('Apply'), style='primary')
    432432    def apply(self, **data):
    433433        form = self.request.form
     
    993993            dict(name=x, title=y) for x, y in allowed_transitions]
    994994
    995     @action(_('Apply now'), style='primary')
     995    @action(_('Apply'), style='primary')
    996996    def apply(self, **data):
    997997        form = self.request.form
     
    13941394            dict(name=x, title=y) for x, y in allowed_transitions]
    13951395
    1396     @action(_('Apply now'), style='primary')
     1396    @action(_('Apply'), style='primary')
    13971397    def apply(self, **data):
    13981398        form = self.request.form
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12352 r12353  
    325325        # Managers can trigger transitions
    326326        self.browser.getControl(name="transition").value = ['start']
    327         self.browser.getControl("Apply now").click()
     327        self.browser.getControl("Apply").click()
    328328        # Managers can edit base
    329329        self.browser.open(self.customer_path)
     
    388388        self.browser.open(self.trigtrans_path)
    389389        self.browser.getControl(name="transition").value = ['start']
    390         self.browser.getControl("Apply now").click()
     390        self.browser.getControl("Apply").click()
    391391        self.browser.open(self.trigtrans_path)
    392392        self.browser.getControl(name="transition").value = ['request']
    393         self.browser.getControl("Apply now").click()
     393        self.browser.getControl("Apply").click()
    394394        self.browser.open(self.trigtrans_path)
    395395        self.browser.getControl(name="transition").value = ['reject']
    396         self.browser.getControl("Apply now").click()
     396        self.browser.getControl("Apply").click()
    397397        self.browser.open(self.trigtrans_path)
    398398        self.browser.getControl(name="transition").value = ['request']
    399         self.browser.getControl("Apply now").click()
     399        self.browser.getControl("Apply").click()
    400400        self.browser.open(self.trigtrans_path)
    401401        self.browser.getControl(name="transition").value = ['approve']
    402         self.browser.getControl("Apply now").click()
     402        self.browser.getControl("Apply").click()
    403403        self.browser.open(self.trigtrans_path)
    404404        self.browser.getControl(name="transition").value = ['reset1']
    405         self.browser.getControl("Apply now").click()
     405        self.browser.getControl("Apply").click()
    406406        return
    407407
     
    837837        # Managers can access the pages of customer documentsconter
    838838        # and can perform actions
    839         IWorkflowState(self.customer).setState('approved')
    840839        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    841840        self.browser.open(self.customer_path)
     
    865864        self.browser.getLink("Transition").click()
    866865        self.browser.getControl(name="transition").value = ['submit']
    867         self.browser.getControl("Apply now").click()
     866        self.browser.getControl("Apply").click()
    868867        self.browser.getLink("Transition").click()
     868        # Document can only be verified if customer is approved
     869        self.browser.getControl(name="transition").value = ['verify']
     870        self.browser.getControl("Apply").click()
     871        self.assertTrue('Customer has not yet been approved' in self.browser.contents)
     872        IWorkflowState(self.customer).setState(APPROVED)
    869873        # Document can only be verified if files have been uploaded before
     874        self.browser.getLink("Transition").click()
    870875        self.browser.getControl(name="transition").value = ['verify']
    871         self.browser.getControl("Apply now").click()
     876        self.browser.getControl("Apply").click()
    872877        self.assertTrue('No file uploaded' in self.browser.contents)
    873878        self.assertEqual(document.state, 'submitted')
     
    10571062        self.browser.open(self.documents_path + '/DOC1/trigtrans')
    10581063        self.browser.getControl(name="transition").value = ['verify']
    1059         self.browser.getControl("Apply now").click()
     1064        self.browser.getControl("Apply").click()
    10601065        self.assertEqual(
    10611066            getattr(self.document, 'sample_md5', None),
     
    11911196        self.browser.getLink("Transition").click()
    11921197        self.browser.getControl(name="transition").value = ['submit']
    1193         self.browser.getControl("Apply now").click()
     1198        self.browser.getControl("Apply").click()
    11941199        self.browser.getLink("Transition").click()
    11951200        self.browser.getControl(name="transition").value = ['approve']
    1196         self.browser.getControl("Apply now").click()
     1201        self.browser.getControl("Apply").click()
    11971202        self.assertEqual(contract.state, 'approved')
    11981203
     
    13181323        # Customer can submit the form. The form is also saved.
    13191324        self.browser.getLink("Edit").click()
    1320         self.browser.getControl("Apply now").click()
     1325        self.browser.getControl("Apply").click()
    13211326        self.assertEqual(contract.state, 'submitted')
    13221327        self.assertTrue('Contract State: submitted for approval' in self.browser.contents)
     
    13751380        self.browser.open(self.contracts_path + '/CON1/trigtrans')
    13761381        self.browser.getControl(name="transition").value = ['approve']
    1377         self.browser.getControl("Apply now").click()
     1382        self.browser.getControl("Apply").click()
    13781383        # InvalidTransitionError is catched
    13791384        self.assertTrue(
     
    13831388        IWorkflowState(self.document).setState('verified')
    13841389        self.browser.getControl(name="transition").value = ['approve']
    1385         self.browser.getControl("Apply now").click()
     1390        self.browser.getControl("Apply").click()
    13861391        self.assertEqual(IWorkflowState(self.contract).getState(), 'approved')
Note: See TracChangeset for help on using the changeset viewer.