diff --git a/cypress/integration/home_page_spec.js b/cypress/integration/home_page_spec.js
index b0c5ab2c..b949523d 100644
--- a/cypress/integration/home_page_spec.js
+++ b/cypress/integration/home_page_spec.js
@@ -20,10 +20,13 @@ describe('The Home Page', () => {
})
it('displays the correct text', () => {
cy.get('h1').contains(
- `Update supply chain information`
+ 'Update supply chain information'
)
+ cy.get('p').contains("It's important to keep your departmental action plan records up to date. This is so we can work towards constantly improving the UK's supply chain resilience.")
cy.get('h2').contains('Complete your monthly update')
- cy.get('li').contains('You need to complete your monthly update for 5 supply chains')
+ cy.lastWorkingDay().then(deadline => {
+ cy.get('li').contains( `You need to complete your monthly update for 5 supply chains by ${deadline}`)
+ })
cy.get('li').contains(
'Select a supply chain to provide your regular monthly update or to update wider details.'
)
diff --git a/cypress/integration/task_list_spec.js b/cypress/integration/task_list_spec.js
index 7530dc1a..b94e0042 100644
--- a/cypress/integration/task_list_spec.js
+++ b/cypress/integration/task_list_spec.js
@@ -44,17 +44,6 @@ describe('The Supply Chain Tasklist Page', () => {
it('displays enabled submit button', () => {
cy.get('button').contains('Submit monthly update')
})
- it('links to the strategic action summary page', () => {
- cy.get('a').contains('View strategic action summary')
- .should('have.attr', 'href')
- .and('equal', `/${supplyChain.slug}/strategic-actions/`)
- })
- it('links to the supply chain summary page', () => {
- cy.get('a').contains('View supply chain summary')
- .should('have.attr', 'href')
- .and('equal', `/${supplyChain.slug}/summary/`)
-
- })
})
const completedSC = supplyChains[1].fields
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 2b698531..b9f42d29 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -261,3 +261,11 @@ Cypress.Commands.add(
}
)
+Cypress.Commands.add(
+ 'lastWorkingDay',
+ () => {
+ cy.exec('env PYTHONPATH=defend_data_capture python defend_data_capture/scripts/get_last_working_day_this_month.py').then(result => {
+ cy.wrap(result.stdout)
+ })
+ }
+)
diff --git a/defend_data_capture/assets/stylesheets/application.scss b/defend_data_capture/assets/stylesheets/application.scss
index c8a55332..ebfc75cb 100644
--- a/defend_data_capture/assets/stylesheets/application.scss
+++ b/defend_data_capture/assets/stylesheets/application.scss
@@ -1,12 +1,8 @@
-@function frontend-font-url($filename) {
- @return url("~govuk-frontend/govuk/assets/fonts/" + $filename);
-}
-
@function frontend-image-url($filename) {
@return url("~govuk-frontend/govuk/assets/images/" + $filename);
}
-$govuk-font-url-function: frontend-font-url;
+$govuk-font-family: "Arial";
$govuk-image-url-function: frontend-image-url;
@import "~govuk-frontend/govuk/all";
diff --git a/defend_data_capture/scripts/get_last_working_day_this_month.py b/defend_data_capture/scripts/get_last_working_day_this_month.py
new file mode 100644
index 00000000..8ca2aadf
--- /dev/null
+++ b/defend_data_capture/scripts/get_last_working_day_this_month.py
@@ -0,0 +1,21 @@
+from supply_chains.utils import (
+ get_last_day_of_this_month,
+ get_last_working_day_of_a_month,
+)
+
+
+def get_date_suffix(day):
+ if 4 <= day <= 20 or 24 <= day <= 30:
+ return "th"
+ else:
+ return ["st", "nd", "rd"][day % 10 - 1]
+
+
+def get_formatted_deadline():
+ deadline = get_last_working_day_of_a_month(get_last_day_of_this_month())
+ suffix = get_date_suffix(deadline.day)
+ print(deadline.strftime(f"%A %d{suffix} %B %Y"))
+
+
+if __name__ == "__main__":
+ get_formatted_deadline()
diff --git a/defend_data_capture/supply_chains/templates/base.html b/defend_data_capture/supply_chains/templates/base.html
index 85029421..e228ffa0 100644
--- a/defend_data_capture/supply_chains/templates/base.html
+++ b/defend_data_capture/supply_chains/templates/base.html
@@ -23,27 +23,12 @@
{{ request.user }} - {{ request.user.gov_department.name }} {{ request.user }} - {{ request.user.gov_department.name }}
It's important to keep your departmental action plan records up to date. This is so we can work towards constantly improving the UK's supply chain resilience.
-- Make sure you have updated and completed all relevant sections. -
-- This includes: Description of the action, impact, strategic action framework category and depedencies -
-- View strategic action summary -
- -- Make sure you have updated and completed all relevant sections. -
-- This includes: Key information, vulnerability assessment, scenario assessment, maturity self assessment, risk monitoring and archived strategic actions -
- - -