source: main/waeup.uniben/branches/0.1/src/waeup/uniben/applicants/tests/test_browser.py @ 17932

Last change on this file since 17932 was 10589, checked in by Henrik Bettermann, 11 years ago

Hide application fee from applicants.

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1## $Id: test_browser.py 10589 2013-09-05 12:35:14Z henrik $
2##
3## Copyright (C) 2013 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18"""
19Test the applicant-related UI components.
20"""
21from waeup.uniben.testing import FunctionalLayer
22from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
23
24class CustomApplicantUITests(ApplicantsFullSetup):
25    # Tests for uploading/browsing the passport image of appplicants
26
27    layer = FunctionalLayer
28
29    def test_applicant_access(self):
30        # Anonymous users can't see the application fee.
31        self.browser.open(self.container_path)
32        self.assertFalse('Application Fee' in self.browser.contents)
33        # Applicants can edit their record
34        self.browser.open(self.login_path)
35        self.login()
36        self.assertTrue(
37            'You logged in.' in self.browser.contents)
38        self.browser.open(self.edit_path)
39        self.assertTrue(self.browser.url != self.login_path)
40        self.assertEqual(self.browser.headers['Status'], '200 Ok')
41        self.fill_correct_values()
42        self.browser.getControl("Save").click()
43        self.assertMatches('...Form has been saved...', self.browser.contents)
44        # Applicants can't see the application fee.
45        self.browser.open(self.container_path)
46        self.assertFalse('Application Fee' in self.browser.contents)
47        return
48       
Note: See TracBrowser for help on using the repository browser.