comparison test/test_liveserver.py @ 8281:669dfccca898

issue2551391 - checkboxes and radiobutton inputs get wrong id's. Actually it breaks automatic id assignment for all inputs. Inputs now get an automatic id assignment that matches the name. It can be overridden by supplting an id parameter in the call to the field() method. This is also a partial fix for issue1513369. I think it obsoletes the changes to templating.py.
author John Rouillard <rouilj@ieee.org>
date Thu, 16 Jan 2025 02:32:58 -0500
parents c70ffbc2a003
children 51f277ed8adc
comparison
equal deleted inserted replaced
8276:8d3085b4d047 8281:669dfccca898
1501 1501
1502 # status7's name is done-cbb 1502 # status7's name is done-cbb
1503 self.assertIn(b'done-cbb', f.content) 1503 self.assertIn(b'done-cbb', f.content)
1504 1504
1505 if user == 'admin': 1505 if user == 'admin':
1506 self.assertIn(b'<input name="submit_button" type="submit" value="Submit Changes">', f.content) 1506 self.assertIn(b'<input id="submit_button" name="submit_button" type="submit" value="Submit Changes">', f.content)
1507 else: 1507 else:
1508 self.assertNotIn(b'<input name="submit_button" type="submit" value="Submit Changes">', f.content) 1508 self.assertNotIn(b'<input id="submit_button" name="submit_button" type="submit" value="Submit Changes">', f.content)
1509 1509
1510 # logout 1510 # logout
1511 f = session.get(self.url_base()+'/?@action=logout') 1511 f = session.get(self.url_base()+'/?@action=logout')
1512 self.assertIn(b"Remember me?", f.content) 1512 self.assertIn(b"Remember me?", f.content)
1513 1513

Roundup Issue Tracker: http://roundup-tracker.org/