Ignore:
Timestamp:
27 Oct 2012, 05:35:04 (12 years ago)
Author:
Henrik Bettermann
Message:

Make level_session required and let officers select the right level_session when adding study levels.

File:
1 edited

Legend:

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

    r9424 r9437  
    674674        self.browser.getControl(name="addlevel").value = ['100']
    675675        self.browser.getControl("Add study level").click()
     676        self.assertMatches(
     677            '...You must select a session...', self.browser.contents)
     678        self.browser.getControl(name="addlevel").value = ['100']
     679        self.browser.getControl(name="level_session").value = ['2004']
     680        self.browser.getControl("Add study level").click()
    676681        self.assertMatches('...<span>100</span>...', self.browser.contents)
    677682        self.assertEqual(self.student['studycourse']['100'].level, 100)
    678683        self.assertEqual(self.student['studycourse']['100'].level_session, 2004)
     684        self.browser.getControl(name="addlevel").value = ['100']
     685        self.browser.getControl(name="level_session").value = ['2004']
    679686        self.browser.getControl("Add study level").click()
    680687        self.assertMatches('...This level exists...', self.browser.contents)
     
    683690            '...No study level selected...', self.browser.contents)
    684691        self.browser.getControl(name="val_id").value = ['100']
     692        self.browser.getControl(name="level_session").value = ['2004']
    685693        self.browser.getControl("Remove selected").click()
    686694        self.assertMatches('...Successfully removed...', self.browser.contents)
     
    693701        # Add level again
    694702        self.browser.getControl(name="addlevel").value = ['100']
     703        self.browser.getControl(name="level_session").value = ['2004']
    695704        self.browser.getControl("Add study level").click()
    696705
     
    732741        # Add next level
    733742        self.browser.getControl(name="addlevel").value = ['200']
     743        self.browser.getControl(name="level_session").value = ['2005']
    734744        self.browser.getControl("Add study level").click()
    735745        self.browser.getLink("200").click()
Note: See TracChangeset for help on using the changeset viewer.