Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 11 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,7 @@
"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. 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
2 changes: 1 addition & 1 deletion tests/functional/spec/preview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("Introduction preview questions", () => {
// answer guidance not implemented yet due to some work that needs to be done in the DS will be implemented in iteration 2
// $(detailsHeading).click();
// expect($(previewQuestion).$("#answer-guidance--content div p").getText()).to.equal("For example select `yes` if you can report for this period");
expect(await $(previewQuestion).$$("p")[2].getText()).toBe("You can answer with one of the following options:");
expect(await $(previewQuestion).$$("p")[1].getText()).toBe("You can answer with one of the following options:");
expect(await $(previewQuestion).$$("ul")[0].getText()).toBe("Yes\nNo");
}

Expand Down
Loading