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" } }
def test_govuk_fieldset(self, question): assert govuk_fieldset(question) == { "legend": { "text": "Enter your criteria", "isPageHeading": True, "classes": "govuk-fieldset__legend--l" } }
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"
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)"