Exemple #1
0
 def test_is_page_heading_false_removes_classes_and_ispageheading(self, question):
     assert govuk_fieldset(question, is_page_heading=False) == {
         "legend": {
             "classes": "govuk-fieldset__legend--m",
             "text": "Enter your criteria"
         }
     }
Exemple #2
0
 def test_govuk_fieldset(self, question):
     assert govuk_fieldset(question) == {
         "legend": {
             "text": "Enter your criteria",
             "isPageHeading": True,
             "classes": "govuk-fieldset__legend--l"
         }
     }
Exemple #3
0
    def test_not_optional_question_does_not_have_optional_in_legend_text(self, question):
        question.type = "list"
        question.optional = False

        assert govuk_fieldset(question)["legend"]["text"] == "Enter your criteria"
Exemple #4
0
    def test_optional_question_has_optional_in_legend_text(self, question):
        question.type = "list"
        question.optional = True

        assert govuk_fieldset(question)["legend"]["text"] == "Enter your criteria (optional)"