Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid html in test schemas #1380

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
7 changes: 4 additions & 3 deletions schemas/test/en/test_benchmark_business.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
},
"description": [
{
"text": "<p>Please note: what constitutes a &#x2018;significant change&#x2019; is dependent on your own interpretation in relation to {trad_as}&#x2019;s figures from the previous reporting period and the same reporting period last year.</p><p>This information will help us to validate your data and should reduce the need to query any figures with you.</p>",
"text": "Please note: what constitutes a &#x2018;significant change&#x2019; is dependent on your own interpretation in relation to {trad_as}&#x2019;s figures from the previous reporting period and the same reporting period last year.",
"placeholders": [
{
"placeholder": "trad_as",
Expand All @@ -394,7 +394,8 @@
]
}
]
}
},
"This information will help us to validate your data and should reduce the need to query any figures with you."
],
"type": "General",
"answers": [
Expand Down Expand Up @@ -509,7 +510,7 @@
"question": {
"id": "question-383",
"title": "Explain any differences between this quarter&apos;s opening value and the previously returned closing value",
"description": ["<p>Include any unusual fluctuations in figures</p>"],
"description": ["Include any unusual fluctuations in figures"],
"type": "General",
"answers": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"for_list": "additional_sites_name",
"title": "What was the business name for this site?",
"item_anchor_answer_id": "business-name",
"item_label": "<p>Business name</p>",
"item_label": "Business name",
"add_link_text": "Add item to this list",
"empty_list_text": "There are no items"
}
Expand Down
25 changes: 14 additions & 11 deletions schemas/test/en/test_introduction.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
}
]
},
"description": ["<p>Your return should relate to the calendar year 2021.</p>"],
"description": ["Your return should relate to the calendar year 2021."],
"instruction": ["Select your answer"],
"answers": [
{
Expand Down Expand Up @@ -338,7 +338,7 @@
"id": "projects-checkbox-question",
"title": "What dates will you be reporting for?",
"description": [
"<p>If figures are not available for the calendar year 2021, your return should relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022.</p>"
"If figures are not available for the calendar year 2021, your return should relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022."
],
"type": "DateRange",
"answers": [
Expand Down Expand Up @@ -376,22 +376,22 @@
"guidance": {
"contents": [
{
"description": "<p><strong>Only traded for a part of the year?</strong></p>"
"description": "<strong>Only traded for a part of the year?</strong>"
},
{
"description": "<p>Please provide figures for the period in which you were trading.</p>"
"description": "Please provide figures for the period in which you were trading."
},
{
"description": "<p><strong>Only commenced trading during 2021?</strong></p>"
"description": "<strong>Only commenced trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period from the commencement of your business until 31 December 2021 or, alternatively, any date up to 5 April 2022.</p>"
"description": "Your return should cover the period from the commencement of your business until 31 December 2021 or, alternatively, any date up to 5 April 2022."
},
{
"description": "<p><strong>Ceased trading during 2021?</strong></p>"
"description": "<strong>Ceased trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period 1 January 2021 to the date you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date.</p>"
"description": "Your return should cover the period 1 January 2021 to the date you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date."
}
]
}
Expand All @@ -401,7 +401,7 @@
"type": "Question",
"id": "report-radio-second",
"question": {
"description": ["<p>Your return should relate to the calendar year 2021.</p>"],
"description": ["Your return should relate to the calendar year 2021."],
"instruction": ["Select your answer"],
"answers": [
{
Expand Down Expand Up @@ -677,7 +677,7 @@
"type": "General",
"description": [
{
"text": "<p>Answer for {ru_name}</p>",
"text": "Answer for {ru_name}",
"placeholders": [
{
"placeholder": "ru_name",
Expand Down Expand Up @@ -707,7 +707,10 @@
"title": "Section complete",
"contents": [
{
"description": "<p>You have successfully completed this section</p><p>The next section covers changes in <strong>business strategy and practices</strong>, for example, implementing changes to marketing concepts or strategies.</p>"
"description": "You have successfully completed this section."
},
{
"description": "The next section covers changes in <strong>business strategy and practices</strong>, for example, implementing changes to marketing concepts or strategies."
}
]
}
Expand Down
20 changes: 10 additions & 10 deletions schemas/test/en/test_introduction_hub.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
}
]
},
"description": ["<p>Your return should relate to the calendar year 2021.</p>"],
"description": ["Your return should relate to the calendar year 2021."],
"instruction": ["Select your answer"],
"answers": [
{
Expand Down Expand Up @@ -249,7 +249,7 @@
"id": "projects-checkbox-question",
"title": "What dates will you be reporting for?",
"description": [
"<p>If figures are not available for the calendar year 2021, your return should relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022.</p>"
"If figures are not available for the calendar year 2021, your return should relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022."
],
"type": "DateRange",
"answers": [
Expand Down Expand Up @@ -287,22 +287,22 @@
"guidance": {
"contents": [
{
"description": "<p><strong>Only traded for a part of the year?</strong></p>"
"description": "<strong>Only traded for a part of the year?</strong>"
},
{
"description": "<p>Please provide figures for the period in which you were trading.</p>"
"description": "Please provide figures for the period in which you were trading."
},
{
"description": "<p><strong>Only commenced trading during 2021?</strong></p>"
"description": "<strong>Only commenced trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period from the commencement of your business until 31 December 2021 or, alternatively, any date up to 5 April 2022.</p>"
"description": "Your return should cover the period from the commencement of your business until 31 December 2021 or, alternatively, any date up to 5 April 2022."
},
{
"description": "<p><strong>Ceased trading during 2021?</strong></p>"
"description": "<strong>Ceased trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period 1 January 2021 to the date you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date.</p>"
"description": "Your return should cover the period 1 January 2021 to the date you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date."
}
]
}
Expand All @@ -312,7 +312,7 @@
"type": "Question",
"id": "report-radio-second",
"question": {
"description": ["<p>Your return should relate to the calendar year 2021.</p>"],
"description": ["Your return should relate to the calendar year 2021."],
"instruction": ["Select your answer"],
"answers": [
{
Expand Down Expand Up @@ -605,7 +605,7 @@
"type": "General",
"description": [
{
"text": "<p>Answer for {ru_name}</p>",
"text": "Answer for {ru_name}",
"placeholders": [
{
"placeholder": "ru_name",
Expand Down
6 changes: 3 additions & 3 deletions schemas/test/en/test_question_guidance.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"title": "Include"
},
{
"description": "<p>Guidance <b>include</b> description text</p>"
"description": "Guidance <strong>include</strong> description text"
},
{
"list": ["Item Include 1", "Item Include 2", "Item Include 3", "Item Include 4"]
Expand All @@ -259,7 +259,7 @@
"title": "Exclude"
},
{
"description": "<p>Guidance <b>exclude</b> description text</p>"
"description": "Guidance <strong>exclude</strong> description text"
},
{
"list": ["Item Exclude 1", "Item Exclude 2", "Item Exclude 3", "Item Exclude 4"]
Expand All @@ -268,7 +268,7 @@
"title": "Other"
},
{
"description": "<p>Guidance <b>other</b> description text</p>"
"description": "Guidance <strong>other</strong> description text"
},
{
"list": ["Item Other 1", "Item Other 2", "Item Other 3", "Item Other 4"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_validator.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
tag=latest
tag=add-html-validation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to revert

TAG=${tag} docker compose -f docker-compose-schema-validator.yml up -d
28 changes: 13 additions & 15 deletions tests/app/views/contexts/test_preview_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_build_preview_context(
}
],
"descriptions": [
"<p>Your return should relate to the calendar year 2021.</p>"
"Your return should relate to the calendar year 2021."
],
"guidance": {
"contents": [
Expand All @@ -90,30 +90,30 @@ def test_build_preview_context(
{"label": "Period to"},
],
"descriptions": [
"<p>If figures are not available for the calendar year 2021, your return should "
"relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022.</p>"
"If figures are not available for the calendar year 2021, your return should "
"relate to a 12 month business year that ends between 6 April 2021 and 5 April 2022."
],
"guidance": {
"contents": [
{
"description": "<p><strong>Only traded for a part of the year?</strong></p>"
"description": "<strong>Only traded for a part of the year?</strong>"
},
{
"description": "<p>Please provide figures for the period in which you were trading.</p>"
"description": "Please provide figures for the period in which you were trading."
},
{
"description": "<p><strong>Only commenced trading during 2021?</strong></p>"
"description": "<strong>Only commenced trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period from the commencement of "
"your business until 31 December 2021 or, alternatively, any date up to 5 April 2022.</p>"
"description": "Your return should cover the period from the commencement of "
"your business until 31 December 2021 or, alternatively, any date up to 5 April 2022."
},
{
"description": "<p><strong>Ceased trading during 2021?</strong></p>"
"description": "<strong>Ceased trading during 2021?</strong>"
},
{
"description": "<p>Your return should cover the period 1 January 2021 to the date "
"you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date.</p>"
"description": "Your return should cover the period 1 January 2021 to the date "
"you ceased to trade or, alternatively, from the beginning of your last business year up to the cessation date."
},
]
},
Expand All @@ -133,7 +133,7 @@ def test_build_preview_context(
}
],
"descriptions": [
"<p>Your return should relate to the calendar year 2021.</p>"
"Your return should relate to the calendar year 2021."
],
"guidance": None,
"id": "report-radio-second",
Expand Down Expand Up @@ -243,9 +243,7 @@ def test_build_preview_context(
"max_length": 2000,
}
],
"descriptions": [
"<p>Answer for ESSENTIAL ENTERPRISE LTD.</p>"
],
"descriptions": ["Answer for ESSENTIAL ENTERPRISE LTD."],
"guidance": None,
"id": "further-details-text-area",
"title": "Please provide any further details",
Expand Down
Loading