Edgewall Software

Ticket #8816: trac-#8861-functional-test.patch

File trac-#8861-functional-test.patch, 1.5 KB (added by niels.reedijk@…, 2 years ago)

Functional test

  • trac/ticket/tests/functional.py

    ### Eclipse Workspace Patch 1.0
    #P trac-0.11-stable
     
    12941294        tc.notfind('anonymous') 
    12951295 
    12961296 
     1297class RegressionTestTicket8861(FunctionalTwillTestCaseSetup): 
     1298    def runTest(self): 
     1299        """Test for regression of http://trac.edgewall.org/ticket/8816 
     1300        When creating a milestone with an already existing name, you get 
     1301        a warning. After changing the name you will find that the original 
     1302        milestone with that name is renamed instead of a new one being 
     1303        created.""" 
     1304        name = "8861Milestone" 
     1305        self._tester.create_milestone(name) 
     1306        tc.go(self._tester.url + "/milestone?action=new") 
     1307        tc.formvalue('edit', 'name', name) 
     1308        tc.submit('Add milestone') 
     1309        tc.formvalue('edit', 'name', name + '__') 
     1310        tc.submit('Add milestone') 
     1311        tc.go(self._tester.url + "/roadmap") 
     1312        tc.find('Milestone: <em>%s</em>' % name) 
     1313        tc.find('Milestone: <em>%s</em>' % (name + '__')) 
     1314 
     1315 
    12971316def functionalSuite(suite=None): 
    12981317    if not suite: 
    12991318        import trac.tests.functional.testcases 
     
    13781397    suite.addTest(RegressionTestTicket6912a()) 
    13791398    suite.addTest(RegressionTestTicket6912b()) 
    13801399    suite.addTest(RegressionTestTicket8247()) 
     1400    suite.addTest(RegressionTestTicket8861()) 
    13811401 
    13821402    return suite 
    13831403