Ignore:
Timestamp:
25 Jun 2013, 04:38:49 (11 years ago)
Author:
Henrik Bettermann
Message:

Add test for omitted screening venue and data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py

    r9449 r10379  
    206206        self.browser.getControl("Save").click()
    207207        self.assertMatches('...Form has been saved...', self.browser.contents)
    208         self.browser.getControl("Save").click()
    209208        self.browser.getControl("Add online payment ticket").click()
    210209        self.assertMatches('...Payment ticket created...',
     
    240239        self.assertEqual(payment.p_category,'application')
    241240        self.assertEqual(payment.amount_auth, 300.0)
     241        return
     242
     243    def test_hide_screening_data(self):
     244        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     245        self.browser.open(self.ugapplicant_path + '/manage')
     246        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     247        self.fill_correct_values()
     248        self.browser.getControl(name="form.screening_venue").value = 'Mensa'
     249        self.browser.getControl(name="form.screening_date").value = 'Easter'
     250        self.browser.getControl(name="form.course1").value = ['CERT1']
     251        self.browser.getControl("Save").click()
     252        self.assertMatches('...Form has been saved...', self.browser.contents)
     253        self.browser.getControl("Save").click()
     254        # Venue and date are not shown
     255        self.browser.open(self.ugapplicant_path)
     256        self.assertFalse('Screening' in self.browser.contents)
     257        IWorkflowState(self.ugapplicant).setState('paid')
     258        # Venue and date are shown if applicant has paid
     259        self.browser.open(self.ugapplicant_path)
     260        self.assertTrue('Screening' in self.browser.contents)
    242261        return
    243262
Note: See TracChangeset for help on using the changeset viewer.