diff 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
line wrap: on
line diff
--- a/test/test_liveserver.py	Sun Jan 12 20:21:57 2025 -0500
+++ b/test/test_liveserver.py	Thu Jan 16 02:32:58 2025 -0500
@@ -1503,9 +1503,9 @@
         self.assertIn(b'done-cbb', f.content)
 
         if user == 'admin':
-            self.assertIn(b'<input name="submit_button" type="submit" value="Submit Changes">', f.content)
+            self.assertIn(b'<input id="submit_button" name="submit_button" type="submit" value="Submit Changes">', f.content)
         else:
-            self.assertNotIn(b'<input name="submit_button" type="submit" value="Submit Changes">', f.content)
+            self.assertNotIn(b'<input id="submit_button" name="submit_button" type="submit" value="Submit Changes">', f.content)
 
         # logout
         f = session.get(self.url_base()+'/?@action=logout')

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