Ignore:
Timestamp:
17 Feb 2019, 19:43:26 (6 years ago)
Author:
Henrik Bettermann
Message:

Add tests and adjust the documentation.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r15333 r15334  
    17091709        level_title = translate(self.context.level_title, 'waeup.kofa',
    17101710            target_language=lang)
    1711         return _('Edit transcript remark of level ${a}', mapping = {'a':level_title})
     1711        return _(
     1712            'Edit transcript remark of level ${a}', mapping = {'a':level_title})
    17121713
    17131714    @property
     
    17191720    def save(self, **data):
    17201721        msave(self, **data)
    1721         self.redirect(
    1722             self.url(self.context.student, 'studycourse/validate_transcript')
    1723             +'#tab4')
     1722        self.redirect(self.url(self.context.student)
     1723            + '/studycourse/validate_transcript#tab4')
    17241724        return
    17251725
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r15287 r15334  
    21772177        self.browser.getControl("Save").click()
    21782178        self.assertTrue('Form has been saved' in self.browser.contents)
    2179         # Officer can validate the transcript
     2179        # Officer can edit transcript remarks and validate the transcript
    21802180        self.browser.open(self.studycourse_path + '/transcript')
    21812181        self.browser.getLink("Validate transcript").click()
     2182        self.browser.getLink("Edit").click()
     2183        self.assertEqual(
     2184            self.browser.url, self.studycourse_path + '/100/remark')
     2185        self.browser.getControl(
     2186            name="form.transcript_remark").value = 'Oh, the student failed'
     2187        self.browser.getControl(
     2188            "Save remark and go and back to transcript validation page").click()
     2189        self.assertEqual(
     2190            self.browser.url,
     2191            self.studycourse_path + '/validate_transcript#tab4')
     2192        self.assertEqual(self.student['studycourse']['100'].transcript_remark,
     2193            'Oh, the student failed')
    21822194        self.browser.getControl("Save comment and validate transcript").click()
    21832195        # After validation all manage forms are locked.
     
    21892201        self.assertTrue('The requested form is locked' in self.browser.contents)
    21902202        self.browser.open(self.studycourse_path + '/100/COURSE1/manage')
     2203        self.assertTrue('The requested form is locked' in self.browser.contents)
     2204        self.browser.open(self.studycourse_path + '/100/remark')
    21912205        self.assertTrue('The requested form is locked' in self.browser.contents)
    21922206
Note: See TracChangeset for help on using the changeset viewer.