Changeset 11942 for main/kofacustom.wdu


Ignore:
Timestamp:
10 Nov 2014, 07:23:07 (10 years ago)
Author:
Henrik Bettermann
Message:

Remove language selector.

Add test_application_slip.

Location:
main/kofacustom.wdu/trunk
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/kofacustom.wdu/trunk/layout/rules.xml

    r11472 r11942  
    113113-->
    114114
    115     <!-- the language selector
    116 
    117       quite tricky. We insert a <li> element at beginning of
    118       ul.kofa-navbar-right. This <li> has a header element
    119       (the 'Language' button) and the a number of <li> elements
    120       representing the supported languages.
    121       We change the input content of format
    122 
    123          <a href="foo" title="Lang">Abbrev</a>
    124 
    125       to
    126 
    127          <a href="foo">Lang</a>
    128 
    129       creating new nodes (<xsl:element>) with attributes copied over.
    130     -->
    131     <before css:theme-children="ul.kofa-navbar-right">
    132       <li class="dropdown kofa-langselect">
    133         <a href="#" class="dropdown-toggle"
    134            data-toggle="dropdown">
    135            <img src="/static/img/earth.png" />
    136         </a>
    137         <ul class="dropdown-menu">
    138           <xsl:for-each css:select=" .language a">
    139             <li class="kofa-language">
    140               <xsl:element name="a">
    141                 <xsl:attribute name="href">
    142                   <xsl:value-of select="@href" />
    143                 </xsl:attribute>
    144                 <xsl:value-of select="@title" />
    145               </xsl:element>
    146             </li>
    147           </xsl:for-each>
    148         </ul>
    149       </li>
    150     </before>
    151 
    152115    <!-- Make all data tables responsive -->
    153116
  • main/kofacustom.wdu/trunk/src/kofacustom/wdu/applicants/tests/test_browser.py

    r11940 r11942  
    2424from zope.catalog.interfaces import ICatalog
    2525from zope.intid.interfaces import IIntIds
     26from hurry.workflow.interfaces import IWorkflowState
    2627from kofacustom.wdu.testing import FunctionalLayer
     28from waeup.kofa.browser.tests.test_pdf import samples_dir
    2729from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
    2830from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup
     
    143145        self.assertEqual(num_fail,0)
    144146        return
     147
     148
     149class ApplicantsContainerUITests(ApplicantsFullSetup):
     150    # Tests for ApplicantsContainer class views and pages
     151
     152    layer = FunctionalLayer
     153
     154    def test_application_slip(self):
     155        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     156        self.slip_path = self.view_path + '/application_slip.pdf'
     157        self.browser.open(self.manage_path)
     158        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     159        self.fill_correct_values()
     160        self.browser.getControl("Save").click()
     161        IWorkflowState(self.applicant).setState('submitted')
     162        self.browser.open(self.manage_path)
     163        self.browser.getLink("Download application slip").click()
     164        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     165        self.assertEqual(self.browser.headers['Content-Type'],
     166                         'application/pdf')
     167        path = os.path.join(samples_dir(), 'application_slip.pdf')
     168        open(path, 'wb').write(self.browser.contents)
     169        print "Sample application_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.