From 966ecdd482167f3f6b08b00f484936c837751cb9 Mon Sep 17 00:00:00 2001 From: Gregor Jerše Date: Thu, 1 Jun 2023 16:44:57 +0200 Subject: Fixed #32819 -- Established relationship between form fields and their help text. Thanks Nimra for the initial patch. Thanks Natalia Bidart, Thibaud Colas, David Smith, and Mariusz Felisiak for reviews. --- tests/forms_tests/tests/test_forms.py | 70 ++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) (limited to 'tests/forms_tests') diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index c283ab20ef..99a38eedcb 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -3016,6 +3016,72 @@ Options: ' + "
" + '' + '
Wählen Sie mit Bedacht.' + '
', + ) + self.assertHTMLEqual( + p.as_ul(), + '
  • ' + 'e.g., user@example.com' + "
  • " + '' + '' + 'Wählen Sie mit Bedacht.' + "
  • ", + ) + self.assertHTMLEqual( + p.as_p(), + '

    ' + 'e.g., user@example.com' + "

    " + '' + '' + 'Wählen Sie mit Bedacht.' + "

    ", + ) + self.assertHTMLEqual( + p.as_table(), + '' + '
    ' + 'e.g., user@example.com' + "" + '' + '
    ' + 'Wählen Sie mit Bedacht.' + "", + ) + def test_subclassing_forms(self): # You can subclass a Form to add fields. The resulting form subclass will have # all of the fields of the parent Form, plus whichever fields you define in the @@ -4796,7 +4862,7 @@ class TemplateTests(SimpleTestCase): "
    " '

    ' '

    " + 'aria-describedby="id_username_helptext" required>

    ' '

    ' '

    ' '

    ' @@ -4833,7 +4899,7 @@ class TemplateTests(SimpleTestCase): "" '

    Username:' '

    " + 'aria-describedby="id_username_helptext" required>

    ' '

    Password1:' '

    ' '

    Password2:' -- cgit v1.3