Ignore:
Timestamp:
21 Nov 2014, 09:19:14 (10 years ago)
Author:
Henrik Bettermann
Message:

Fix test.

File:
1 edited

Legend:

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

    r12018 r12020  
    4040from waeup.ikoba.customers.interfaces import ICustomersUtils
    4141from waeup.ikoba.customers.customer import Customer
    42 from waeup.ikoba.interfaces import IUserAccount, IJobManager
     42from waeup.ikoba.interfaces import IUserAccount, IJobManager, APPROVED
    4343from waeup.ikoba.authentication import LocalRoleSetEvent
    4444from waeup.ikoba.tests.test_async import FunctionalAsyncTestCase
     45from waeup.ikoba.documents.workflow import VERIFIED
    4546
    4647PH_LEN = 15911  # Length of placeholder file
     
    843844        # Document can be edited ...
    844845        self.browser.getLink("d102").click()
    845 
    846 
    847846        self.browser.open(self.documents_path + '/d102/edit')
    848847        #self.browser.getLink("Edit").click()
    849848        self.assertTrue('The requested form is locked' in self.browser.contents)
    850 
    851 
    852 
    853 
    854 
    855 
    856 
     849        # Customer is in wrong state
     850        IWorkflowState(self.customer).setState(APPROVED)
     851        self.browser.open(self.documents_path + '/d102/edit')
    857852        self.browser.getControl(name="form.title").value = 'My second doc'
    858853        self.browser.getControl("Save").click()
     
    860855        self.browser.getLink("View").click()
    861856        self.assertEqual(self.browser.url, self.documents_path + '/d102/index')
     857        # Customer can't edit the document once it has been verified
     858        IWorkflowState(document).setState(VERIFIED)
     859        self.browser.open(self.documents_path + '/d102/edit')
     860        self.assertTrue('The requested form is locked' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.