From bf0fbcc796066009b38b0caec5c02e0fc72dd857 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:07:45 +0000
Subject: [PATCH 01/11] Bundle update
This ensures we're on the latest version of govuk-components and
govuk_design_system_formbuilder.
---
Gemfile.lock | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 4be30666c5..c74cf20ead 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -183,9 +183,9 @@ GEM
email_address (0.2.4)
simpleidn
erubi (1.12.0)
- et-orbi (1.2.7)
+ et-orbi (1.2.11)
tzinfo
- factory_bot (6.4.5)
+ factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
@@ -223,8 +223,8 @@ GEM
webrick (~> 1.7)
websocket-driver (>= 0.6, < 0.8)
ffi (1.16.3)
- fugit (1.9.0)
- et-orbi (~> 1, >= 1.2.7)
+ fugit (1.11.0)
+ et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
globalid (1.2.1)
activesupport (>= 6.1)
@@ -258,11 +258,11 @@ GEM
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
- govuk-components (4.1.2)
+ govuk-components (5.3.2)
html-attributes-utils (~> 1.0.0, >= 1.0.0)
- pagy (~> 6.0)
- view_component (>= 3.3, < 3.7)
- govuk_design_system_formbuilder (4.1.1)
+ pagy (>= 6, < 8)
+ view_component (>= 3.9, < 3.12)
+ govuk_design_system_formbuilder (5.3.3)
actionview (>= 6.1)
activemodel (>= 6.1)
activesupport (>= 6.1)
@@ -289,7 +289,7 @@ GEM
reline (>= 0.4.2)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
- json (2.7.1)
+ json (2.7.2)
jwt (2.8.1)
base64
language_server-protocol (3.17.0.3)
@@ -309,9 +309,9 @@ GEM
activesupport (>= 5.2.8.1)
notifications-ruby-client (~> 6.0)
rack (>= 2.1.4.1)
- marcel (1.0.2)
+ marcel (1.0.4)
matrix (0.4.2)
- method_source (1.0.0)
+ method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.22.3)
msgpack (1.7.2)
@@ -330,7 +330,7 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
- nio4r (2.7.0)
+ nio4r (2.7.1)
nokogiri (1.16.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-darwin)
@@ -362,7 +362,7 @@ GEM
omniauth (~> 2.0)
orm_adapter (0.5.0)
os (1.1.4)
- pagy (6.5.0)
+ pagy (7.0.11)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
@@ -392,7 +392,8 @@ GEM
rack (2.2.9)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
- rack-protection (3.1.0)
+ rack-protection (3.2.0)
+ base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-session (1.0.2)
rack (< 3)
@@ -436,14 +437,14 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
- rbs (3.4.1)
+ rbs (3.4.4)
abbrev
rdoc (6.6.3.1)
psych (>= 4.0.0)
redcarpet (3.6.0)
redis (4.8.1)
regexp_parser (2.9.0)
- reline (0.5.1)
+ reline (0.5.3)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
@@ -516,7 +517,7 @@ GEM
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
- rubocop-rspec_rails (2.28.2)
+ rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
@@ -525,7 +526,6 @@ GEM
ruby2_keywords (0.0.5)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
- railties (>= 5.0)
sentry-rails (5.17.3)
railties (>= 5.0)
sentry-ruby (~> 5.17.3)
@@ -553,7 +553,7 @@ GEM
addressable (~> 2.8, >= 2.8.1)
capybara (~> 3.31)
site_prism-all_there (> 2, < 5)
- site_prism-all_there (3.0.3)
+ site_prism-all_there (3.0.4)
sitemap_generator (6.3.0)
builder (~> 3.0)
snaky_hash (2.0.1)
@@ -587,8 +587,8 @@ GEM
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
- version_gem (1.1.3)
- view_component (3.6.0)
+ version_gem (1.1.4)
+ view_component (3.11.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
From ce98fb5801dce22052f4af73bb658216fdbee6f8 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:09:02 +0000
Subject: [PATCH 02/11] Yarn update
This ensures we're on the latest version of govuk-frontend.
---
package.json | 4 +--
yarn.lock | 73 ++++++++++++++++++++++++----------------------------
2 files changed, 36 insertions(+), 41 deletions(-)
diff --git a/package.json b/package.json
index d0cd53abdc..8940dc0a7b 100644
--- a/package.json
+++ b/package.json
@@ -2,11 +2,11 @@
"name": "app",
"private": "true",
"dependencies": {
- "@ministryofjustice/frontend": "^1.8.1",
+ "@ministryofjustice/frontend": "^2.1.2",
"dfe-autocomplete": "github:DFE-Digital/dfe-autocomplete",
"esbuild": "^0.20.2",
"govuk-country-and-territory-autocomplete": "^1.0.2",
- "govuk-frontend": "^4.8.0",
+ "govuk-frontend": "^5.3.1",
"sass": "^1.75.0"
},
"scripts": {
diff --git a/yarn.lock b/yarn.lock
index 1a2c50498d..edc06db523 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -117,12 +117,12 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc"
integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==
-"@ministryofjustice/frontend@^1.8.1":
- version "1.8.1"
- resolved "https://registry.yarnpkg.com/@ministryofjustice/frontend/-/frontend-1.8.1.tgz#6bac39524ba406533d1ce51c55d4c8ff96ad358e"
- integrity sha512-HNl8XXbNje/NtQRlGM57CTLlAGBTW+ziGTBkxXHDn7VauKNz418PnErDlKRWeaHIyc6V9twI5EbOj4lFCsvasw==
+"@ministryofjustice/frontend@^2.1.2":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/@ministryofjustice/frontend/-/frontend-2.1.2.tgz#9c87572b2fe49033003ab8880e0d6e532b5336e4"
+ integrity sha512-Hf4QfnXGvof7h7Qg3BRW3CzVGihqJHhPX2YWWj2YQpCiT1PwG1SX1ZrkfZLVkmJffW20tAzaq7/cflO1jeSquA==
dependencies:
- govuk-frontend "^3.0.0 || ^4.0.0"
+ govuk-frontend "^5.0.0"
moment "^2.27.0"
"@prettier/plugin-ruby@^4.0.4":
@@ -146,9 +146,9 @@ anymatch@~3.1.2:
picomatch "^2.0.4"
binary-extensions@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
- integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522"
+ integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
braces@~3.0.2:
version "3.0.2"
@@ -158,9 +158,9 @@ braces@~3.0.2:
fill-range "^7.0.1"
"chokidar@>=3.0.0 <4.0.0":
- version "3.5.3"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
- integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
+ integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
@@ -178,15 +178,15 @@ core-js@3.2.1:
integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==
corejs-typeahead@^1.1.1:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/corejs-typeahead/-/corejs-typeahead-1.3.1.tgz#26b9b158cba7f123556c74068bffce9356505bd3"
- integrity sha512-fyNlBNWJNL6EQUnJyAunEzBzRcwR2cEHtZXBi2pndHPOJ/wpOf3wbS+/Oh+kYYS5sKowQcs0LFwMSl6Y2Xeqkw==
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/corejs-typeahead/-/corejs-typeahead-1.3.4.tgz#dad8c5ab63579947b5d665eee3b538479847b0f8"
+ integrity sha512-4SAc1UWszc05IyG9te1JHSeLas5WUWKmKAB8m9E6AAmHCpYhdSaySkblVSIUwQG2FR5uAsaeHbKM+pkEP7SiNw==
dependencies:
jquery ">=1.11"
"dfe-autocomplete@github:DFE-Digital/dfe-autocomplete":
version "0.0.1"
- resolved "https://codeload.github.com/DFE-Digital/dfe-autocomplete/tar.gz/36d80e6b5bba67c92cd9ec6982a4e536d1889aed"
+ resolved "https://codeload.github.com/DFE-Digital/dfe-autocomplete/tar.gz/8e7389ff62a38bc8880323f6c58eed9c8d10f080"
dependencies:
accessible-autocomplete "^2.0.4"
@@ -227,9 +227,9 @@ fill-range@^7.0.1:
to-regex-range "^5.0.1"
fsevents@~2.3.2:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
- integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
glob-parent@~5.1.2:
version "5.1.2"
@@ -247,20 +247,15 @@ govuk-country-and-territory-autocomplete@^1.0.2:
core-js "3.2.1"
openregister-picker-engine "^1.2.1"
-"govuk-frontend@^3.0.0 || ^4.0.0":
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.7.0.tgz#69950b6c2e69f435ffe9aa60d8dee232dac977de"
- integrity sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==
-
-govuk-frontend@^4.8.0:
- version "4.8.0"
- resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.8.0.tgz#df4e56c762e93aae74fed214bb6be08e13783772"
- integrity sha512-NOmPJxL8IYq1HSNHYKx9XY2LLTxuwb+IFASiGQO4sgJ8K7AG66SlSeqARrcetevV8zOf+i1z+MbJJ2O7//OxAw==
+govuk-frontend@^5.0.0, govuk-frontend@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.3.1.tgz#d63e2078b0d94a119bfe322431218f04024668a2"
+ integrity sha512-EzegdVdmZVwXUGTQTsBgK4TkMpMyPdOIa2g1kvwX7EeyP9Kah+amXSo97gbiI8N49L6E0J6/2H6qLW4QN3KhMQ==
immutable@^4.0.0:
- version "4.2.4"
- resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.4.tgz#83260d50889526b4b531a5e293709a77f7c55a2a"
- integrity sha512-WDxL3Hheb1JkRN3sQkyujNlL/xRjAo3rJtaU5xeufUauG66JdMr32bLj4gF+vWl84DIA3Zxw7tiAjneYzRRw+w==
+ version "4.3.5"
+ resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.5.tgz#f8b436e66d59f99760dc577f5c99a4fd2a5cc5a0"
+ integrity sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==
is-binary-path@~2.1.0:
version "2.1.0"
@@ -287,14 +282,14 @@ is-number@^7.0.0:
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
jquery@>=1.11:
- version "3.6.3"
- resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.3.tgz#23ed2ffed8a19e048814f13391a19afcdba160e6"
- integrity sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
+ integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
moment@^2.27.0:
- version "2.29.4"
- resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
- integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
+ version "2.30.1"
+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
+ integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
@@ -341,9 +336,9 @@ sass@^1.75.0:
source-map-js ">=0.6.2 <2.0.0"
"source-map-js@>=0.6.2 <2.0.0":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
- integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
+ integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
to-regex-range@^5.0.1:
version "5.0.1"
From 334927eb71e658e213ab827bb138e4d0bba2a6eb Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:22:35 +0000
Subject: [PATCH 03/11] Update GOV.UK Frontend assets path
There's now a dist directory.
---
app/assets/stylesheets/application.sass.scss | 2 +-
config/application.rb | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss
index 36c4594cf1..d04a27f842 100644
--- a/app/assets/stylesheets/application.sass.scss
+++ b/app/assets/stylesheets/application.sass.scss
@@ -3,7 +3,7 @@ $govuk-new-link-styles: true;
$govuk-assets-path: "/";
$moj-images-path: "/";
-@import "govuk-frontend/govuk/all";
+@import "govuk-frontend/dist/govuk/all";
@import "@ministryofjustice/frontend/moj/components/ticket-panel/ticket-panel";
@import "@ministryofjustice/frontend/moj/components/timeline/timeline";
@import "dfe-autocomplete/src/dfe-autocomplete";
diff --git a/config/application.rb b/config/application.rb
index 4af5119943..ebcf26ed94 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -39,9 +39,12 @@ class Application < Rails::Application
config.exceptions_app = routes
- config.assets.paths << Rails.root.join(
- "node_modules/govuk-frontend/govuk/assets",
- )
+ config.assets.paths +=
+ %w[
+ node_modules/govuk-frontend/dist/govuk/assets
+ node_modules/govuk-frontend/dist/govuk/assets/images
+ node_modules/govuk-frontend/dist/govuk/assets/fonts
+ ].map { |path| Rails.root.join(path) }
config.action_dispatch.rescue_responses[
"Pundit::NotAuthorizedError"
From fea311b4f070711ccd1e554a08c9240e3b523213 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:23:59 +0000
Subject: [PATCH 04/11] Update js-enabled script
This is necessary to support the upgrade.
---
app/views/layouts/application.html.erb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 94fb14baac..c7766d1c13 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -22,9 +22,9 @@
- <%= javascript_tag nonce: true do -%>
- document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
- <% end -%>
+ <%= javascript_tag nonce: true do %>
+ document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
+ <% end %>
<%= govuk_skip_link %>
From da0875a2033a33e09b28df8a9f45cfc5c9043b92 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:25:50 +0000
Subject: [PATCH 05/11] Update favicons
These have been upgraded in GOV.UK Frontend.
---
app/views/layouts/application.html.erb | 11 +++++------
public/apple-touch-icon-precomposed.png | 0
public/apple-touch-icon.png | 0
public/favicon.ico | 0
4 files changed, 5 insertions(+), 6 deletions(-)
delete mode 100644 public/apple-touch-icon-precomposed.png
delete mode 100644 public/apple-touch-icon.png
delete mode 100644 public/favicon.ico
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index c7766d1c13..344b70f3e7 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -10,12 +10,11 @@
<%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %>
<%= tag :meta, property: 'og:image', content: asset_path('images/govuk-opengraph-image.png') %>
<%= tag :meta, name: 'theme-color', content: '#0b0c0c' %>
- <%= favicon_link_tag asset_path('images/favicon.ico') %>
- <%= favicon_link_tag asset_path('images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %>
+
+ <%= favicon_link_tag image_path('images/favicon.ico'), type: nil, sizes: "48x48" %>
+ <%= favicon_link_tag image_path('images/favicon.svg'), type: 'image/svg+xml', sizes: "any" %>
+ <%= favicon_link_tag image_path('images/govuk-icon-mask.svg'), rel: 'mask-icon', color: "#0b0c0c", type: nil %>
+ <%= favicon_link_tag image_path('images/govuk-icon-180.png'), rel: 'apple-touch-icon', type: nil %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application", defer: true %>
diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index e69de29bb2..0000000000
From 8f3915330142d76b0112589dae720dda3459ecf5 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Fri, 22 Dec 2023 15:34:02 +0000
Subject: [PATCH 06/11] Update tests following tag changes
In the new version of GOV.UK Frontend the tags are not written in upper
case so we need to change the tests.
---
.../page_objects/assessor_interface/login.rb | 2 +-
.../checking_submitted_details_spec.rb | 10 ++---
.../completing_assessment_spec.rb | 8 ++--
...firming_english_language_exemption_spec.rb | 2 +-
.../pre_assessment_tasks_spec.rb | 14 +++---
.../reviewing_consent_spec.rb | 10 +++--
.../reviewing_professional_standing_spec.rb | 6 +--
.../reviewing_qualifications_spec.rb | 4 +-
.../reviewing_references_spec.rb | 8 ++--
.../verifying_professional_standing_spec.rb | 26 +++++------
.../verifying_qualifications_spec.rb | 45 ++++++++++---------
.../verifying_references_spec.rb | 33 +++++++++++---
.../support_interface/countries_spec.rb | 4 +-
spec/system/support_interface/staff_spec.rb | 8 ++--
.../age_range_and_subjects_spec.rb | 4 +-
.../further_information_spec.rb | 10 ++---
.../personal_information_spec.rb | 2 +-
.../registration_number_spec.rb | 2 +-
.../written_statement_spec.rb | 4 +-
19 files changed, 113 insertions(+), 89 deletions(-)
diff --git a/spec/support/autoload/page_objects/assessor_interface/login.rb b/spec/support/autoload/page_objects/assessor_interface/login.rb
index 7594c354ba..d34f5c5b79 100644
--- a/spec/support/autoload/page_objects/assessor_interface/login.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/login.rb
@@ -6,7 +6,7 @@ class Login < SitePrism::Page
section :form, "form" do
element :email_field, "#staff-email-field"
element :password_field, "#staff-password-field"
- element :continue_button, "button"
+ element :continue_button, ".govuk-button:not(.govuk-button--secondary)"
end
element :azure_sign_in, "#button-sign-in-with-active-directory"
diff --git a/spec/system/assessor_interface/checking_submitted_details_spec.rb b/spec/system/assessor_interface/checking_submitted_details_spec.rb
index 48d2c00244..f1b9277e90 100644
--- a/spec/system/assessor_interface/checking_submitted_details_spec.rb
+++ b/spec/system/assessor_interface/checking_submitted_details_spec.rb
@@ -265,7 +265,7 @@ def personal_information_task_item
def and_i_see_check_personal_information_completed
expect(
assessor_application_page.personal_information_task.status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def when_i_choose_check_personal_information_no
@@ -313,7 +313,7 @@ def when_i_choose_check_qualifications_no
def and_i_see_check_qualifications_completed
expect(assessor_application_page.qualifications_task.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
@@ -365,7 +365,7 @@ def and_i_choose_verify_age_range_subjects_no
def and_i_see_verify_age_range_subjects_completed
expect(
assessor_application_page.age_range_subjects_task.status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def then_i_see_the_work_history
@@ -382,7 +382,7 @@ def when_i_choose_check_work_history_yes
def and_i_see_check_work_history_completed
expect(assessor_application_page.work_history_task.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
@@ -436,7 +436,7 @@ def and_i_choose_induction_not_required
def and_i_see_check_professional_standing_completed
expect(
assessor_application_page.professional_standing_task.status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def when_i_choose_check_professional_standing_no
diff --git a/spec/system/assessor_interface/completing_assessment_spec.rb b/spec/system/assessor_interface/completing_assessment_spec.rb
index 592e0f61e9..759a669aab 100644
--- a/spec/system/assessor_interface/completing_assessment_spec.rb
+++ b/spec/system/assessor_interface/completing_assessment_spec.rb
@@ -385,25 +385,25 @@ def when_i_click_on_overview_button
def then_the_application_form_is_awarded
expect(assessor_application_page.status_summary.value).to have_text(
- "AWARDED",
+ "Awarded",
)
end
def then_the_application_form_is_waiting_on
expect(assessor_application_page.status_summary.value.text).to include(
- "WAITING ON",
+ "Waiting on",
)
end
def then_the_application_form_is_verification_in_progress
expect(assessor_application_page.status_summary.value.text).to include(
- "VERIFICATION IN PROGRESS",
+ "Verification in progress",
)
end
def then_the_application_form_is_declined
expect(assessor_application_page.status_summary.value).to have_text(
- "DECLINED",
+ "Declined",
)
end
diff --git a/spec/system/assessor_interface/confirming_english_language_exemption_spec.rb b/spec/system/assessor_interface/confirming_english_language_exemption_spec.rb
index 08803d4094..9e8e145ecf 100644
--- a/spec/system/assessor_interface/confirming_english_language_exemption_spec.rb
+++ b/spec/system/assessor_interface/confirming_english_language_exemption_spec.rb
@@ -281,7 +281,7 @@ def and_the_english_language_section_is_complete
def assert_section_is_complete(section)
expect(
assessor_application_page.send("#{section}_task").status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def application_form
diff --git a/spec/system/assessor_interface/pre_assessment_tasks_spec.rb b/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
index 8fd84d9ce4..69d67c8e4a 100644
--- a/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
+++ b/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
@@ -63,19 +63,19 @@ def given_there_is_an_application_form_with_professional_standing_request
def and_i_see_a_waiting_on_status
expect(assessor_application_page.status_summary.value).to have_text(
- "WAITING ON LOPS",
+ "Waiting on LoPS",
)
end
def and_i_see_a_preliminary_check_status
expect(assessor_application_page.status_summary.value).to have_text(
- "PRELIMINARY CHECK",
+ "Preliminary check",
)
end
def and_i_see_a_assessment_not_started_status
expect(assessor_application_page.status_summary.value).to have_text(
- "ASSESSMENT NOT STARTED",
+ "Assessment not started",
)
end
@@ -84,11 +84,11 @@ def and_i_see_an_unstarted_preliminary_check_task
"Preliminary check (qualifications)",
)
expect(assessor_application_page.preliminary_check_task).to have_content(
- "NOT STARTED",
+ "Not started",
)
expect(
assessor_application_page.awaiting_professional_standing_task,
- ).to have_content("CANNOT START")
+ ).to have_content("Cannot start")
end
def when_i_click_on_the_preliminary_check_task
@@ -135,11 +135,11 @@ def and_i_see_the_failure_reasons
def and_i_see_a_completed_preliminary_check_task
expect(assessor_application_page.preliminary_check_task).to have_content(
- "COMPLETED",
+ "Completed",
)
expect(
assessor_application_page.awaiting_professional_standing_task,
- ).to have_content("WAITING ON")
+ ).to have_content("Waiting on")
end
def and_the_teacher_receives_a_checks_passed_email
diff --git a/spec/system/assessor_interface/reviewing_consent_spec.rb b/spec/system/assessor_interface/reviewing_consent_spec.rb
index 9ff880b267..2ed00e1249 100644
--- a/spec/system/assessor_interface/reviewing_consent_spec.rb
+++ b/spec/system/assessor_interface/reviewing_consent_spec.rb
@@ -96,7 +96,7 @@ def when_i_click_on_the_consent
def and_i_see_the_overdue_status
expect(assessor_review_verifications_page).to have_content(
- "This consent’s status has changed from OVERDUE to RECEIVED",
+ "This consent’s status has changed from Overdue to Received",
)
end
@@ -109,11 +109,15 @@ def when_i_click_on_back_to_overview
end
def and_i_see_the_consent_not_started
- expect(consent_task_item.status_tag.text).to eq("NOT STARTED")
+ expect(consent_task_item.status_tag.text).to eq("Not started")
+ end
+
+ def and_i_see_the_consent_accepted
+ expect(consent_task_item.status_tag.text).to eq("Accepted")
end
def and_i_see_the_consent_rejected
- expect(consent_task_item.status_tag.text).to eq("REJECTED")
+ expect(consent_task_item.status_tag.text).to eq("Rejected")
end
def consent_task_item
diff --git a/spec/system/assessor_interface/reviewing_professional_standing_spec.rb b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
index fbab367d4d..806d263b15 100644
--- a/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
+++ b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
@@ -129,7 +129,7 @@ def and_i_see_the_lops_not_started
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
- expect(item.status_tag.text).to eq("NOT STARTED")
+ expect(item.status_tag.text).to eq("Not started")
end
def and_i_see_the_lops_accepted
@@ -137,7 +137,7 @@ def and_i_see_the_lops_accepted
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
- expect(item.status_tag.text).to eq("ACCEPTED")
+ expect(item.status_tag.text).to eq("Accepted")
end
def and_i_see_the_lops_rejected
@@ -145,7 +145,7 @@ def and_i_see_the_lops_rejected
assessor_review_verifications_page.task_list.find_item(
"Relevant competent authority",
)
- expect(item.status_tag.text).to eq("REJECTED")
+ expect(item.status_tag.text).to eq("Rejected")
end
def application_form
diff --git a/spec/system/assessor_interface/reviewing_qualifications_spec.rb b/spec/system/assessor_interface/reviewing_qualifications_spec.rb
index bf98879b8d..19b62b35f0 100644
--- a/spec/system/assessor_interface/reviewing_qualifications_spec.rb
+++ b/spec/system/assessor_interface/reviewing_qualifications_spec.rb
@@ -123,13 +123,13 @@ def when_i_click_on_back_to_overview
def and_i_see_the_qualification_accepted
item =
assessor_review_verifications_page.task_list.find_item("BSc Teaching")
- expect(item.status_tag.text).to eq("ACCEPTED")
+ expect(item.status_tag.text).to eq("Accepted")
end
def and_i_see_the_qualification_rejected
item =
assessor_review_verifications_page.task_list.find_item("BSc Teaching")
- expect(item.status_tag.text).to eq("REJECTED")
+ expect(item.status_tag.text).to eq("Rejected")
end
def application_form
diff --git a/spec/system/assessor_interface/reviewing_references_spec.rb b/spec/system/assessor_interface/reviewing_references_spec.rb
index 3c10ac5c67..5c60824706 100644
--- a/spec/system/assessor_interface/reviewing_references_spec.rb
+++ b/spec/system/assessor_interface/reviewing_references_spec.rb
@@ -111,7 +111,7 @@ def when_i_click_on_the_reference
def and_i_see_the_overdue_status
expect(assessor_review_verifications_page).to have_content(
- "This reference’s status has changed from OVERDUE to RECEIVED",
+ "This reference’s status has changed from Overdue to Received",
)
end
@@ -129,17 +129,17 @@ def when_i_click_on_back_to_overview
def and_i_see_the_reference_not_started
item = assessor_review_verifications_page.task_list.find_item("School")
- expect(item.status_tag.text).to eq("NOT STARTED")
+ expect(item.status_tag.text).to eq("Not started")
end
def and_i_see_the_reference_accepted
item = assessor_review_verifications_page.task_list.find_item("School")
- expect(item.status_tag.text).to eq("ACCEPTED")
+ expect(item.status_tag.text).to eq("Accepted")
end
def and_i_see_the_reference_rejected
item = assessor_review_verifications_page.task_list.find_item("School")
- expect(item.status_tag.text).to eq("REJECTED")
+ expect(item.status_tag.text).to eq("Rejected")
end
def application_form
diff --git a/spec/system/assessor_interface/verifying_professional_standing_spec.rb b/spec/system/assessor_interface/verifying_professional_standing_spec.rb
index 95f4284caf..63e898f9a2 100644
--- a/spec/system/assessor_interface/verifying_professional_standing_spec.rb
+++ b/spec/system/assessor_interface/verifying_professional_standing_spec.rb
@@ -16,8 +16,8 @@
reference:,
assessment_id:,
)
- and_the_request_lops_verification_status_is("NOT STARTED")
- and_the_record_lops_response_status_is("CANNOT START")
+ and_the_request_lops_verification_status_is("Not started")
+ and_the_record_lops_response_status_is("Cannot start")
when_i_click_request_lops_verification
then_i_see_the(
@@ -31,8 +31,8 @@
reference:,
assessment_id:,
)
- and_the_request_lops_verification_status_is("COMPLETED")
- and_the_record_lops_response_status_is("WAITING ON")
+ and_the_request_lops_verification_status_is("Completed")
+ and_the_record_lops_response_status_is("Waiting on")
end
it "record" do
@@ -45,8 +45,8 @@
reference:,
assessment_id:,
)
- and_the_request_lops_verification_status_is("COMPLETED")
- and_the_record_lops_response_status_is("WAITING ON")
+ and_the_request_lops_verification_status_is("Completed")
+ and_the_record_lops_response_status_is("Waiting on")
when_i_click_record_lops_response
then_i_see_the(
@@ -60,7 +60,7 @@
reference:,
assessment_id:,
)
- and_the_record_lops_response_status_is("COMPLETED")
+ and_the_record_lops_response_status_is("Completed")
when_i_click_record_lops_response
then_i_see_the(
@@ -80,7 +80,7 @@
reference:,
assessment_id:,
)
- and_the_record_lops_response_status_is("REVIEW")
+ and_the_record_lops_response_status_is("Review")
end
it "record after overdue" do
@@ -94,8 +94,8 @@
reference:,
assessment_id:,
)
- and_the_request_lops_verification_status_is("COMPLETED")
- and_the_record_lops_response_status_is("OVERDUE")
+ and_the_request_lops_verification_status_is("Completed")
+ and_the_record_lops_response_status_is("Overdue")
when_i_click_record_lops_response
then_i_see_the(
@@ -110,7 +110,7 @@
reference:,
assessment_id:,
)
- and_the_record_lops_response_status_is("COMPLETED")
+ and_the_record_lops_response_status_is("Completed")
when_i_click_record_lops_response
then_i_see_the(
@@ -130,7 +130,7 @@
reference:,
assessment_id:,
)
- and_the_record_lops_response_status_is("REVIEW")
+ and_the_record_lops_response_status_is("Review")
when_i_click_record_lops_response
then_i_see_the(
@@ -150,7 +150,7 @@
reference:,
assessment_id:,
)
- and_the_record_lops_response_status_is("REVIEW")
+ and_the_record_lops_response_status_is("Review")
end
private
diff --git a/spec/system/assessor_interface/verifying_qualifications_spec.rb b/spec/system/assessor_interface/verifying_qualifications_spec.rb
index 4c1646cd11..b7d3e26e60 100644
--- a/spec/system/assessor_interface/verifying_qualifications_spec.rb
+++ b/spec/system/assessor_interface/verifying_qualifications_spec.rb
@@ -164,7 +164,12 @@ def and_i_click_the_verify_qualifications_task
def and_the_check_and_select_consent_method_task_is_not_started
expect(check_and_select_consent_method_task_item.status_tag.text).to eq(
- "NOT STARTED",
+ "Not started",
+ )
+ end
+ def and_i_see_a_waiting_on_status
+ expect(assessor_application_page.status_summary.value).to have_text(
+ "Waiting on qualification",
)
end
@@ -190,19 +195,19 @@ def when_i_confirm_the_consent_methods
def and_the_check_and_select_consent_method_task_is_completed
expect(check_and_select_consent_method_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
def and_the_generate_consent_document_task_item_is_not_started
expect(generate_consent_document_task_item.status_tag.text).to eq(
- "NOT STARTED",
+ "Not started",
)
end
def and_the_upload_consent_document_task_item_is_not_started
expect(upload_consent_document_task_item.status_tag.text).to eq(
- "NOT STARTED",
+ "Not started",
)
end
@@ -216,7 +221,7 @@ def when_i_check_unsigned_consent_document_generated
def and_the_generate_consent_document_task_item_is_completed
expect(generate_consent_document_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
@@ -231,12 +236,12 @@ def when_i_upload_the_consent_document
end
def and_the_upload_consent_document_task_item_is_completed
- expect(upload_consent_document_task_item.status_tag.text).to eq("COMPLETED")
+ expect(upload_consent_document_task_item.status_tag.text).to eq("Completed")
end
def and_the_send_consent_document_to_applicant_task_is_not_started
expect(send_consent_document_to_applicant_task_item.status_tag.text).to eq(
- "NOT STARTED",
+ "Not started",
)
end
@@ -250,19 +255,19 @@ def when_i_send_the_signed_consent_documents
def and_the_send_consent_document_to_applicant_task_is_completed
expect(send_consent_document_to_applicant_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
def and_the_record_applicant_response_task_is_waiting_on
expect(record_applicant_response_task_item.status_tag.text).to eq(
- "WAITING ON",
+ "Waiting on",
)
end
def and_the_record_applicant_response_task_is_received
expect(record_applicant_response_task_item.status_tag.text).to eq(
- "RECEIVED",
+ "Received",
)
end
@@ -276,7 +281,7 @@ def and_i_submit_yes_on_the_verify_consent_form
def and_the_record_applicant_response_task_is_accepted
expect(record_applicant_response_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
@@ -284,23 +289,19 @@ def and_i_submit_no_on_the_verify_consent_form
assessor_verify_consent_request_page.submit_no
end
- def and_i_submit_an_internal_note
- assessor_verify_failed_consent_request_page.submit(note: "A note.")
- end
-
def and_the_record_applicant_response_task_is_review
- expect(record_applicant_response_task_item.status_tag.text).to eq("REVIEW")
+ expect(record_applicant_response_task_item.status_tag.text).to eq("Review")
end
def and_the_request_ecctis_verification_task_is_not_started
expect(request_ecctis_verification_task_item.status_tag.text).to eq(
- "NOT STARTED",
+ "Not started",
)
end
def and_the_record_ecctis_response_task_is_cannot_start
expect(record_ecctis_response_task_item.status_tag.text).to eq(
- "CANNOT START",
+ "Cannot start",
)
end
@@ -318,12 +319,12 @@ def and_i_submit_unchecked_on_the_request_form
def and_the_request_ecctis_verification_task_is_completed
expect(request_ecctis_verification_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
def and_the_record_ecctis_response_task_is_waiting_on
- expect(record_ecctis_response_task_item.status_tag.text).to eq("WAITING ON")
+ expect(record_ecctis_response_task_item.status_tag.text).to eq("Waiting on")
end
def when_i_click_the_record_ecctis_response_task
@@ -335,7 +336,7 @@ def and_i_submit_yes_on_the_verify_form
end
def and_the_record_ecctis_response_task_is_completed
- expect(record_ecctis_response_task_item.status_tag.text).to eq("COMPLETED")
+ expect(record_ecctis_response_task_item.status_tag.text).to eq("Completed")
end
def and_i_submit_no_on_the_verify_form
@@ -347,7 +348,7 @@ def and_i_submit_an_internal_note
end
def and_the_record_ecctis_response_task_is_review
- expect(record_ecctis_response_task_item.status_tag.text).to eq("REVIEW")
+ expect(record_ecctis_response_task_item.status_tag.text).to eq("Review")
end
def when_i_go_back_to_overview
diff --git a/spec/system/assessor_interface/verifying_references_spec.rb b/spec/system/assessor_interface/verifying_references_spec.rb
index 437af8ab99..b8f5e80989 100644
--- a/spec/system/assessor_interface/verifying_references_spec.rb
+++ b/spec/system/assessor_interface/verifying_references_spec.rb
@@ -16,7 +16,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("WAITING ON")
+ and_the_reference_request_status_is("Waiting on")
when_i_click_on_the_reference_request
then_i_see_the(
@@ -47,7 +47,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("RECEIVED")
+ and_the_reference_request_status_is("Received")
when_i_click_on_the_reference_request
then_i_see_the(
@@ -64,7 +64,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("COMPLETED")
+ and_the_reference_request_status_is("Completed")
when_i_click_on_the_reference_request
then_i_see_the(
@@ -86,7 +86,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("REVIEW")
+ and_the_reference_request_status_is("Review")
when_i_verify_that_all_references_are_accepted
then_i_see_the_verify_references_task_is_completed
@@ -102,7 +102,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("OVERDUE")
+ and_the_reference_request_status_is("Overdue")
when_i_click_on_the_reference_request
then_i_see_the(
@@ -124,7 +124,7 @@
reference:,
assessment_id:,
)
- and_the_reference_request_status_is("REVIEW")
+ and_the_reference_request_status_is("Review")
when_i_verify_that_all_references_are_accepted
then_i_see_the_verify_references_task_is_completed
@@ -144,6 +144,12 @@ def given_the_reference_request_is_overdue
reference_request.expired!
end
+ def and_i_see_a_waiting_on_status
+ expect(assessor_application_page.status_summary.value).to have_text(
+ "Waiting on reference",
+ )
+ end
+
def and_i_click_verify_references
assessor_application_page.verify_references_task.link.click
end
@@ -243,6 +249,19 @@ def and_i_submit_an_internal_note
assessor_verify_failed_reference_request_page.submit(note: "A note.")
end
+ def then_i_see_the_reference_request_status_is_accepted
+ expect(
+ assessor_reference_requests_page
+ .task_list
+ .sections
+ .first
+ .items
+ .first
+ .status_tag
+ .text,
+ ).to eq("Completed")
+ end
+
def when_i_verify_that_all_references_are_accepted
assessor_reference_requests_page.continue_button.click
end
@@ -257,7 +276,7 @@ def then_i_see_the_verify_references_task_is_completed
.first
.status_tag
.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def when_i_click_on_resend_email_summary
diff --git a/spec/system/support_interface/countries_spec.rb b/spec/system/support_interface/countries_spec.rb
index f10b4ac546..7279e9d8a5 100644
--- a/spec/system/support_interface/countries_spec.rb
+++ b/spec/system/support_interface/countries_spec.rb
@@ -105,8 +105,8 @@ def then_i_see_country_changes_preview
end
def then_i_see_region_changes_confirmation
- expect(page).to have_content("CREATE California")
- expect(page).to have_content("DELETE Hawaii")
+ expect(page).to have_content("Create California")
+ expect(page).to have_content("Delete Hawaii")
end
def when_i_click_on_a_region
diff --git a/spec/system/support_interface/staff_spec.rb b/spec/system/support_interface/staff_spec.rb
index e403a74bfb..9557ce8fd5 100644
--- a/spec/system/support_interface/staff_spec.rb
+++ b/spec/system/support_interface/staff_spec.rb
@@ -132,12 +132,12 @@ def then_i_see_an_invitation_email
def then_i_see_the_invited_staff_user
expect(page).to have_content("test@example.com")
- expect(page).to have_content("NOT ACCEPTED")
+ expect(page).to have_content("Not accepted")
end
def then_i_see_the_accepted_staff_user
expect(page).to have_content("test@example.com")
- expect(page).to have_content("ACCEPTED")
+ expect(page).to have_content("Accepted")
end
def and_i_fill_name
@@ -162,7 +162,7 @@ def and_i_set_password
end
def and_i_see_the_helpdesk_user
- expect(page).to have_content("Support console access\tNO")
+ expect(page).to have_content("Support console access\tNo")
end
def when_i_click_on_the_helpdesk_user
@@ -181,7 +181,7 @@ def and_i_submit_the_edit_form
end
def then_i_see_the_changed_permission
- expect(page).to_not have_content("Support console access\tNO")
+ expect(page).to_not have_content("Support console access\tNo")
end
def then_i_am_taken_to_the_azure_login_page
diff --git a/spec/system/teacher_interface/age_range_and_subjects_spec.rb b/spec/system/teacher_interface/age_range_and_subjects_spec.rb
index 8e02dd3b4d..7f817c87f7 100644
--- a/spec/system/teacher_interface/age_range_and_subjects_spec.rb
+++ b/spec/system/teacher_interface/age_range_and_subjects_spec.rb
@@ -69,13 +69,13 @@ def when_i_fill_in_the_subjects
def and_i_see_the_completed_age_range_task
expect(teacher_application_page.age_range_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
def and_i_see_the_completed_subjects_task
expect(teacher_application_page.subjects_task_item.status_tag.text).to eq(
- "COMPLETED",
+ "Completed",
)
end
diff --git a/spec/system/teacher_interface/further_information_spec.rb b/spec/system/teacher_interface/further_information_spec.rb
index 29e3e32abf..a80d35314a 100644
--- a/spec/system/teacher_interface/further_information_spec.rb
+++ b/spec/system/teacher_interface/further_information_spec.rb
@@ -80,23 +80,23 @@ def when_i_click_the_start_button
end
def and_i_see_the_text_task_list_item
- expect(text_task_list_item.status_tag.text).to eq("NOT STARTED")
+ expect(text_task_list_item.status_tag.text).to eq("Not started")
end
def and_i_see_a_completed_text_task_list_item
- expect(text_task_list_item.status_tag.text).to eq("COMPLETED")
+ expect(text_task_list_item.status_tag.text).to eq("Completed")
end
def and_i_see_the_document_task_list_item
- expect(document_task_list_item.status_tag.text).to eq("NOT STARTED")
+ expect(document_task_list_item.status_tag.text).to eq("Not started")
end
def and_i_see_a_completed_document_task_list_item
- expect(document_task_list_item.status_tag.text).to eq("COMPLETED")
+ expect(document_task_list_item.status_tag.text).to eq("Completed")
end
def and_i_see_the_completed_work_history_contact_list_item
- expect(work_history_task_list_item.status_tag.text).to eq("COMPLETED")
+ expect(work_history_task_list_item.status_tag.text).to eq("Completed")
end
def when_i_click_the_text_task_list_item
diff --git a/spec/system/teacher_interface/personal_information_spec.rb b/spec/system/teacher_interface/personal_information_spec.rb
index 4a694d7644..d8cfbaf60f 100644
--- a/spec/system/teacher_interface/personal_information_spec.rb
+++ b/spec/system/teacher_interface/personal_information_spec.rb
@@ -195,7 +195,7 @@ def when_i_continue_from_check_page
def and_i_see_the_completed_personal_information_task
expect(
teacher_application_page.personal_information_task_item.status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def teacher
diff --git a/spec/system/teacher_interface/registration_number_spec.rb b/spec/system/teacher_interface/registration_number_spec.rb
index 58b1fb42ea..0bba757d44 100644
--- a/spec/system/teacher_interface/registration_number_spec.rb
+++ b/spec/system/teacher_interface/registration_number_spec.rb
@@ -44,7 +44,7 @@ def when_i_fill_in_the_registration_number
def and_i_see_the_completed_registration_number_task
expect(
teacher_application_page.registration_number_task_item.status_tag.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def teacher
diff --git a/spec/system/teacher_interface/written_statement_spec.rb b/spec/system/teacher_interface/written_statement_spec.rb
index 6990ae242e..0151c3c089 100644
--- a/spec/system/teacher_interface/written_statement_spec.rb
+++ b/spec/system/teacher_interface/written_statement_spec.rb
@@ -105,7 +105,7 @@ def and_i_see_the_upload_written_statement_task_is_completed
.upload_written_statement_task_item
.status_tag
.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def and_i_see_the_provide_written_statement_task
@@ -132,7 +132,7 @@ def and_i_see_the_provide_written_statement_task_is_completed
.provide_written_statement_task_item
.status_tag
.text,
- ).to eq("COMPLETED")
+ ).to eq("Completed")
end
def teacher
From 355d964b964e1504b9a5cc9a30149323dfe9c1bb Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Thu, 11 Apr 2024 14:17:29 +0100
Subject: [PATCH 07/11] Fix issue related to OpenStruct
This used to already be available before the form was instansiated but
now it's not.
---
app/forms/teacher_interface/english_language_provider_form.rb | 2 ++
spec/support/autoload/page_objects/assessor_interface/login.rb | 2 ++
2 files changed, 4 insertions(+)
diff --git a/app/forms/teacher_interface/english_language_provider_form.rb b/app/forms/teacher_interface/english_language_provider_form.rb
index a5ca9dfa6f..47c01ec122 100644
--- a/app/forms/teacher_interface/english_language_provider_form.rb
+++ b/app/forms/teacher_interface/english_language_provider_form.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "ostruct"
+
module TeacherInterface
class EnglishLanguageProviderForm < BaseForm
attr_accessor :application_form
diff --git a/spec/support/autoload/page_objects/assessor_interface/login.rb b/spec/support/autoload/page_objects/assessor_interface/login.rb
index d34f5c5b79..b4161fedda 100644
--- a/spec/support/autoload/page_objects/assessor_interface/login.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/login.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module PageObjects
module AssessorInterface
class Login < SitePrism::Page
From 0af5ea57875289df140d40643cf21bf845794b1e Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Mon, 19 Feb 2024 19:33:41 +0100
Subject: [PATCH 08/11] Revert "Switch to the new crown"
This reverts commit 9f12f3736e5ecc6989f2d437926c494cf58ac4b0.
---
app/views/shared/_header.html.erb | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb
index 83ca169c80..28c7a32ae8 100644
--- a/app/views/shared/_header.html.erb
+++ b/app/views/shared/_header.html.erb
@@ -4,22 +4,6 @@
service_url: "/#{current_namespace}",
classes: "app-header--#{HostingEnvironment.name}"
) do |header| %>
- <% header.with_custom_logo do %>
-
- <% end %>
-
<% case current_namespace %>
<% when "assessor" %>
<% if current_staff %>
From 5c3d848eeee7b3375d28de2c04edf84f87404244 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:30:17 +0000
Subject: [PATCH 09/11] Use govuk_link_to new_tab argument
This automatically makes the link open in a new tab by setting the
correct HTML attributes.
---
app/helpers/upload_helper.rb | 7 +------
.../_english_language_provider_details.html.erb | 4 ++--
.../_professional_standing_summary.html.erb | 2 +-
.../consent_requests/edit_verify.html.erb | 6 +++---
.../edit_unsigned_consent_document.html.erb | 2 +-
app/views/shared/_employment_warning.html.erb | 2 +-
.../shared/_english_language_approved_providers.html.erb | 3 +--
.../_certified_translation.html.erb | 2 +-
.../_english_language.html.erb | 2 +-
.../teacher_interface/work_histories/add_another.html.erb | 2 +-
.../work_histories/requirements_unmet.html.erb | 4 +++-
.../check_your_answers_summary_component_spec.rb | 6 +++---
spec/helpers/upload_helper_spec.rb | 4 ++--
spec/system/teacher_interface/documents_spec.rb | 6 +++---
spec/system/teacher_interface/english_language_spec.rb | 4 ++--
spec/system/teacher_interface/personal_information_spec.rb | 2 +-
spec/system/teacher_interface/qualifications_spec.rb | 4 ++--
17 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/app/helpers/upload_helper.rb b/app/helpers/upload_helper.rb
index 73f8988c76..d42dd11860 100644
--- a/app/helpers/upload_helper.rb
+++ b/app/helpers/upload_helper.rb
@@ -11,12 +11,7 @@ def upload_link_to(upload)
)
end
elsif upload.safe_to_link?
- govuk_link_to(
- "#{upload.filename} (opens in a new tab)",
- upload_path(upload),
- target: :_blank,
- rel: :noopener,
- )
+ govuk_link_to(upload.filename, upload_path(upload), new_tab: true)
else
upload.filename
end
diff --git a/app/views/assessor_interface/assessment_sections/_english_language_provider_details.html.erb b/app/views/assessor_interface/assessment_sections/_english_language_provider_details.html.erb
index de551121d0..5279a5e6c4 100644
--- a/app/views/assessor_interface/assessment_sections/_english_language_provider_details.html.erb
+++ b/app/views/assessor_interface/assessment_sections/_english_language_provider_details.html.erb
@@ -6,7 +6,7 @@
<% if provider.check_url.present? %>
Check the applicant’s <%= provider.reference_name %> at:
- <%= govuk_link_to provider.check_url, provider.check_url, target: "_blank", rel: "noreferrer noopener" %>
+ <%= govuk_link_to provider.check_url, provider.check_url, new_tab: true %>
<% end %>
<% else %>
@@ -14,7 +14,7 @@
- <%= govuk_link_to "Approved providers", "https://register.ofqual.gov.uk/Search?category=Qualifications&query=ESOl", target: "_blank", rel: "noreferrer noopener" %>
+ <%= govuk_link_to "Approved providers", "https://register.ofqual.gov.uk/Search?category=Qualifications&query=ESOl", new_tab: true %>
<% end %>
<% end %>
diff --git a/app/views/assessor_interface/assessment_sections/_professional_standing_summary.html.erb b/app/views/assessor_interface/assessment_sections/_professional_standing_summary.html.erb
index 679a3bc2db..5725bb899d 100644
--- a/app/views/assessor_interface/assessment_sections/_professional_standing_summary.html.erb
+++ b/app/views/assessor_interface/assessment_sections/_professional_standing_summary.html.erb
@@ -24,7 +24,7 @@
<% if (online_checker_url = region.teaching_authority_online_checker_url).present? %>
<% accordion.with_section(heading_text: "Online checker") do %>
This authority has an online checker for validating the supplied registration number:
- <%= govuk_link_to online_checker_url, online_checker_url, target: "_blank", rel: "noreferrer noopener" %>
+ <%= govuk_link_to online_checker_url, online_checker_url, new_tab: true %>
<% end %>
<% end %>
diff --git a/app/views/assessor_interface/consent_requests/edit_verify.html.erb b/app/views/assessor_interface/consent_requests/edit_verify.html.erb
index 17047bb28e..872de8d30a 100644
--- a/app/views/assessor_interface/consent_requests/edit_verify.html.erb
+++ b/app/views/assessor_interface/consent_requests/edit_verify.html.erb
@@ -22,10 +22,10 @@
<% if upload.is_pdf? %>
- <%= govuk_button_link_to "Download", [:assessor_interface, :application_form, upload.document, upload], target: "_blank", rel: "noreferrer noopener" %>
+ <%= govuk_button_link_to "Download", [:assessor_interface, :application_form, upload.document, upload], new_tab: true %>
<% else %>
- <%= govuk_button_link_to "Download original", [:assessor_interface, :application_form, upload.document, upload], target: "_blank", rel: "noreferrer noopener" %>
- <%= govuk_button_link_to "Download as PDF", assessor_interface_application_form_document_pdf_path(upload.document, "original"), inverse: true, target: "_blank", rel: "noreferrer noopener" %>
+ <%= govuk_button_link_to "Download original", [:assessor_interface, :application_form, upload.document, upload], new_tab: true %>
+ <%= govuk_button_link_to "Download as PDF", assessor_interface_application_form_document_pdf_path(upload.document, "original"), inverse: true, new_tab: true %>
<% end %>
<% else %>
diff --git a/app/views/assessor_interface/qualification_requests/edit_unsigned_consent_document.html.erb b/app/views/assessor_interface/qualification_requests/edit_unsigned_consent_document.html.erb
index c093da4e74..c5c769a260 100644
--- a/app/views/assessor_interface/qualification_requests/edit_unsigned_consent_document.html.erb
+++ b/app/views/assessor_interface/qualification_requests/edit_unsigned_consent_document.html.erb
@@ -22,7 +22,7 @@
- <%= govuk_button_link_to "Generate consent document", [:generate_unsigned_consent_document, :assessor_interface, @application_form, @assessment, :qualification_requests], inverse: true, target: :_blank, rel: :noopener %>
+ <%= govuk_button_link_to "Generate consent document", [:generate_unsigned_consent_document, :assessor_interface, @application_form, @assessment, :qualification_requests], inverse: true, new_tab: true %>
diff --git a/app/views/shared/_employment_warning.html.erb b/app/views/shared/_employment_warning.html.erb
index 4095369300..8995c936df 100644
--- a/app/views/shared/_employment_warning.html.erb
+++ b/app/views/shared/_employment_warning.html.erb
@@ -1,4 +1,4 @@
<%= govuk_warning_text do %>
The Department for Education (DfE) does not employ teachers directly.
- To find a teaching job, you must <%= govuk_link_to "apply to individual schools in England", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas/#find-a-teaching-job", target: "_blank", rel: "noreferrer noopener" %>.
+ To find a teaching job, you must <%= govuk_link_to "apply to individual schools in England", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas/#find-a-teaching-job", new_tab: true %>.
<% end %>
diff --git a/app/views/shared/_english_language_approved_providers.html.erb b/app/views/shared/_english_language_approved_providers.html.erb
index b4fd13ff9e..7c3bab3491 100644
--- a/app/views/shared/_english_language_approved_providers.html.erb
+++ b/app/views/shared/_english_language_approved_providers.html.erb
@@ -10,7 +10,6 @@
See the list of <%= govuk_link_to "approved providers (opens in new tab)",
reduced_evidence_accepted ? "https://register.ofqual.gov.uk/Search?category=Qualifications&query=ESOl" : english_language_guidance_path,
- rel: "noreferrer noopener",
- target: "_blank" %>.
+ new_tab: true %>.
<% end %>
diff --git a/app/views/shared/eligible_region_content_components/_certified_translation.html.erb b/app/views/shared/eligible_region_content_components/_certified_translation.html.erb
index 88cd58020a..d0c99e910f 100644
--- a/app/views/shared/eligible_region_content_components/_certified_translation.html.erb
+++ b/app/views/shared/eligible_region_content_components/_certified_translation.html.erb
@@ -26,7 +26,7 @@
Finding a certified translator
- We cannot recommend translation providers. You can find a professional translator through the <%= govuk_link_to "Institute of Translating and Interpreting (ITI) (opens in new tab)", "https://www.iti.org.uk/component/itisearch/?view=translators", target: :_blank, rel: :noopener %>. All listed translators have been certified by the ITI and are qualified to complete translations.
+ We cannot recommend translation providers. You can find a professional translator through the <%= govuk_link_to "Institute of Translating and Interpreting (ITI) (opens in new tab)", "https://www.iti.org.uk/component/itisearch/?view=translators", new_tab: true %>. All listed translators have been certified by the ITI and are qualified to complete translations.
diff --git a/app/views/shared/eligible_region_content_components/_english_language.html.erb b/app/views/shared/eligible_region_content_components/_english_language.html.erb
index 0e03e4f1a7..ad5448d0c4 100644
--- a/app/views/shared/eligible_region_content_components/_english_language.html.erb
+++ b/app/views/shared/eligible_region_content_components/_english_language.html.erb
@@ -30,7 +30,7 @@
You’ll need a Secure English Language Test (SELT) at level B2 from an approved provider.
<% else %>
- If you cannot provide one of the documents described in 1,2 or 3, you'll need a B2 level Secure English Language Test (SELT) from on approved provider. We accept the following approved providers and tests:
+ If you cannot provide one of the documents described in 1,2 or 3, you'll need a <%= govuk_link_to "B2 level", "https://www.coe.int/en/web/common-european-framework-reference-languages/table-1-cefr-3.3-common-reference-levels-global-scale", new_tab: true %> Secure English Language Test (SELT) from on approved provider. We accept the following approved providers and tests:
diff --git a/app/views/teacher_interface/work_histories/add_another.html.erb b/app/views/teacher_interface/work_histories/add_another.html.erb
index 7808c315b7..72a0f5d8e4 100644
--- a/app/views/teacher_interface/work_histories/add_another.html.erb
+++ b/app/views/teacher_interface/work_histories/add_another.html.erb
@@ -63,7 +63,7 @@
<% if @years_count == 0 && @months_count < 9 %>
<%= govuk_details(summary_text: "I do not have more than 9 months of teaching experience") do %>
QTS requires a minimum of 9 months of active teaching experience. We can keep your application open for 6 months, so you can continue later, if you gain enough experience in that time.
- Alternatively, you can explore other ways to teach in England (opens in new tab).
+ Alternatively, you can <%= govuk_link_to "explore other ways to teach in England (opens in new tab)", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas", new_tab: true %>.
<% end %>
<% end %>
diff --git a/app/views/teacher_interface/work_histories/requirements_unmet.html.erb b/app/views/teacher_interface/work_histories/requirements_unmet.html.erb
index 454e143f43..df9ac31e78 100644
--- a/app/views/teacher_interface/work_histories/requirements_unmet.html.erb
+++ b/app/views/teacher_interface/work_histories/requirements_unmet.html.erb
@@ -3,6 +3,8 @@
Your work experience does not meet all of the requirements for QTS
-You can explore other ways to teach in England (opens in new tab).
+
+ You can <%= govuk_link_to "explore other ways to teach in England (opens in new tab)", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas", new_tab: true %>.
+
<%= render "shared/help_us_to_improve_this_service" %>
diff --git a/spec/components/check_your_answers_summary_component_spec.rb b/spec/components/check_your_answers_summary_component_spec.rb
index c529279427..94efc6bb0c 100644
--- a/spec/components/check_your_answers_summary_component_spec.rb
+++ b/spec/components/check_your_answers_summary_component_spec.rb
@@ -265,7 +265,7 @@
it "renders the value" do
expect(row.at_css(".govuk-summary-list__value a").text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
expect(row.at_css(".govuk-summary-list__value a")[:href]).to eq(
"/teacher/application/documents/#{model.document.id}/uploads/#{model.document.uploads.last.id}",
@@ -311,7 +311,7 @@
it "renders the value" do
expect(row.at_css(".govuk-summary-list__value a").text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
document = model.translatable_document
@@ -340,7 +340,7 @@
it "renders the value" do
expect(row.at_css(".govuk-summary-list__value a").text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
document = model.translatable_document
diff --git a/spec/helpers/upload_helper_spec.rb b/spec/helpers/upload_helper_spec.rb
index 10d458a652..2104b40616 100644
--- a/spec/helpers/upload_helper_spec.rb
+++ b/spec/helpers/upload_helper_spec.rb
@@ -9,7 +9,7 @@
it "returns a link to the upload" do
expect(upload_link_to).to have_link(
- "#{upload.filename} (opens in a new tab)",
+ "#{upload.filename} (opens in new tab)",
href:
"/teacher/application/documents/#{upload.document.id}/uploads/#{upload.id}",
)
@@ -24,7 +24,7 @@
it "returns a link to the upload" do
expect(upload_link_to).to have_link(
- "#{upload.filename} (opens in a new tab)",
+ "#{upload.filename} (opens in new tab)",
href:
"/assessor/application/documents/#{upload.document.id}/uploads/#{upload.id}",
)
diff --git a/spec/system/teacher_interface/documents_spec.rb b/spec/system/teacher_interface/documents_spec.rb
index d512211566..0b1b9ffd36 100644
--- a/spec/system/teacher_interface/documents_spec.rb
+++ b/spec/system/teacher_interface/documents_spec.rb
@@ -81,17 +81,17 @@ def then_i_see_the_check_your_uploaded_files_page
"Check your uploaded files – written statement document",
)
expect(teacher_check_uploaded_files_page.files).to have_content(
- "File 1\tupload.pdf (opens in a new tab)\tDelete",
+ "File 1\tupload.pdf (opens in new tab)\tDelete",
)
expect(teacher_check_uploaded_files_page.files).to have_content(
- "File 2\tupload.pdf (opens in a new tab)\tDelete",
+ "File 2\tupload.pdf (opens in new tab)\tDelete",
)
end
def then_i_see_the_check_your_uploaded_files_page_with_three_files
then_i_see_the_check_your_uploaded_files_page
expect(teacher_check_uploaded_files_page.files).to have_content(
- "File 3\tupload.pdf (opens in a new tab)\tDelete",
+ "File 3\tupload.pdf (opens in new tab)\tDelete",
)
end
diff --git a/spec/system/teacher_interface/english_language_spec.rb b/spec/system/teacher_interface/english_language_spec.rb
index d141e3b312..a051aa6aaa 100644
--- a/spec/system/teacher_interface/english_language_spec.rb
+++ b/spec/system/teacher_interface/english_language_spec.rb
@@ -247,7 +247,7 @@ def and_i_see_the_my_medium_of_instruction
"Medium of instruction document",
)
expect(document_summary_list_row.value.text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
end
@@ -374,7 +374,7 @@ def and_i_see_the_my_other_provider
"English language proficiency test document",
)
expect(reference_summary_list_row.value.text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
end
diff --git a/spec/system/teacher_interface/personal_information_spec.rb b/spec/system/teacher_interface/personal_information_spec.rb
index d8cfbaf60f..e0fc20461f 100644
--- a/spec/system/teacher_interface/personal_information_spec.rb
+++ b/spec/system/teacher_interface/personal_information_spec.rb
@@ -156,7 +156,7 @@ def and_i_see_the_check_page_with_an_alternative_name
teacher_check_personal_information_page.summary_list.rows[6]
expect(name_change_document_row.key.text).to eq("Name change document")
expect(name_change_document_row.value.text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
end
diff --git a/spec/system/teacher_interface/qualifications_spec.rb b/spec/system/teacher_interface/qualifications_spec.rb
index e9ec3735e3..a07320d506 100644
--- a/spec/system/teacher_interface/qualifications_spec.rb
+++ b/spec/system/teacher_interface/qualifications_spec.rb
@@ -157,12 +157,12 @@ def and_i_see_the_qualification_information
expect(summary_list_rows[6].key.text).to eq("Certificate document")
expect(summary_list_rows[6].value.text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
expect(summary_list_rows[7].key.text).to eq("Transcript document")
expect(summary_list_rows[7].value.text).to eq(
- "upload.pdf (opens in a new tab)",
+ "upload.pdf (opens in new tab)",
)
expect(summary_list_rows[8].key.text).to eq(
From a6b2af1d236da14cb2bd9343d029ba36ee1c191f Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Tue, 12 Dec 2023 09:30:58 +0000
Subject: [PATCH 10/11] Use govuk_visually_hidden helper
This is a new helper added in GOV.UK Frontend 5.
---
app/views/assessor_interface/application_forms/index.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/assessor_interface/application_forms/index.html.erb b/app/views/assessor_interface/application_forms/index.html.erb
index b086564f74..de26e255e4 100644
--- a/app/views/assessor_interface/application_forms/index.html.erb
+++ b/app/views/assessor_interface/application_forms/index.html.erb
@@ -9,7 +9,7 @@
<%= f.govuk_submit t(".filters.apply") do %>
<%= t(".filters.clear") %>
- <%= t(".filters.of_filter") %>
+ <%= govuk_visually_hidden(t(".filters.of_filter")) %>
<% end %>
From 3a4cedc45b847d94bb24807570458a1019e98558 Mon Sep 17 00:00:00 2001
From: Thomas Leese
Date: Thu, 14 Dec 2023 10:47:47 +0000
Subject: [PATCH 11/11] Use GOV.UK Design System task list
This upgrades our task lists to use the new one that is included as
part of the GOV.UK Design System.
---
app/assets/stylesheets/_task_list.scss | 70 ------------------
app/assets/stylesheets/application.sass.scss | 1 -
app/components/task_list/component.html.erb | 33 ---------
app/components/task_list/component.rb | 42 -----------
.../qualification_requests_view_object.rb | 28 +++----
...further_information_request_view_object.rb | 37 +++++-----
.../application_forms/show.html.erb | 12 ++-
.../assessments/review.html.erb | 74 +++++++++----------
.../show.html.erb | 64 ++++++++--------
.../qualification_requests/index.html.erb | 26 ++++---
.../reference_requests/index.html.erb | 24 +++---
.../application_forms/show/_draft.html.erb | 10 ++-
.../consent_requests/index.html.erb | 10 ++-
.../show.html.erb | 11 ++-
spec/components/task_list_spec.rb | 27 -------
.../assessor_interface/application.rb | 46 ++++++------
.../professional_standing_request.rb | 2 +-
.../qualification_requests.rb | 2 +-
.../assessor_interface/reference_requests.rb | 2 +-
.../review_verifications.rb | 2 +-
.../autoload/page_objects/govuk_task_list.rb | 20 +++++
.../autoload/page_objects/task_list.rb | 13 ----
.../autoload/page_objects/task_list_item.rb | 9 ---
.../page_objects/task_list_section.rb | 6 --
.../teacher_interface/application.rb | 24 +++---
.../teacher_interface/consent_requests.rb | 2 +-
.../further_information_requested.rb | 4 +-
.../checking_submitted_details_spec.rb | 6 --
.../pre_assessment_tasks_spec.rb | 4 +-
.../reverse_decision_spec.rb | 4 +-
.../reviewing_further_information_spec.rb | 2 +-
.../reviewing_professional_standing_spec.rb | 2 +-
.../reviewing_qualifications_spec.rb | 2 +-
.../verifying_professional_standing_spec.rb | 2 +-
.../verifying_qualifications_spec.rb | 2 +-
.../verifying_references_spec.rb | 26 ++-----
.../view_application_form_spec.rb | 6 +-
.../withdraw_application_spec.rb | 6 +-
spec/system/teacher_interface/consent_spec.rb | 12 +--
.../further_information_spec.rb | 6 +-
...qualification_requests_view_object_spec.rb | 52 ++++++-------
...er_information_request_view_object_spec.rb | 50 +++++++------
42 files changed, 305 insertions(+), 478 deletions(-)
delete mode 100644 app/assets/stylesheets/_task_list.scss
delete mode 100644 app/components/task_list/component.html.erb
delete mode 100644 app/components/task_list/component.rb
delete mode 100644 spec/components/task_list_spec.rb
create mode 100644 spec/support/autoload/page_objects/govuk_task_list.rb
delete mode 100644 spec/support/autoload/page_objects/task_list.rb
delete mode 100644 spec/support/autoload/page_objects/task_list_item.rb
delete mode 100644 spec/support/autoload/page_objects/task_list_section.rb
diff --git a/app/assets/stylesheets/_task_list.scss b/app/assets/stylesheets/_task_list.scss
deleted file mode 100644
index dca012f558..0000000000
--- a/app/assets/stylesheets/_task_list.scss
+++ /dev/null
@@ -1,70 +0,0 @@
-.app-task-list {
- list-style-type: none;
- padding-left: 0;
- margin-top: 0;
- margin-bottom: 0;
- @include govuk-media-query($from: tablet) {
- min-width: 550px;
- }
-}
-
-.app-task-list__section {
- display: table;
- @include govuk-font($size: 24, $weight: bold);
-}
-
-.app-task-list__section-number {
- display: table-cell;
-
- @include govuk-media-query($from: tablet) {
- min-width: govuk-spacing(6);
- padding-right: 0;
- }
-}
-
-.app-task-list__items-no-indentation {
- @include govuk-font($size: 19);
- @include govuk-responsive-margin(9, "bottom");
- list-style: none;
- padding-left: 0;
-}
-
-.app-task-list__items {
- @include govuk-font($size: 19);
- @include govuk-responsive-margin(9, "bottom");
- list-style: none;
- padding-left: 0;
- @include govuk-media-query($from: tablet) {
- padding-left: govuk-spacing(6);
- }
-}
-
-.app-task-list__item {
- border-bottom: 1px solid $govuk-border-colour;
- margin-bottom: 0 !important;
- padding-top: govuk-spacing(2);
- padding-bottom: govuk-spacing(2);
- @include govuk-clearfix;
-}
-
-.app-task-list__item:first-child {
- border-top: 1px solid $govuk-border-colour;
-}
-
-.app-task-list__task-name {
- display: block;
- @include govuk-media-query($from: 450px) {
- float: left;
- }
-}
-
-.app-task-list__tag {
- margin-top: govuk-spacing(2);
- margin-bottom: govuk-spacing(1);
-
- @include govuk-media-query($from: 450px) {
- float: right;
- margin-top: 0;
- margin-bottom: 0;
- }
-}
diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss
index d04a27f842..d642ae0961 100644
--- a/app/assets/stylesheets/application.sass.scss
+++ b/app/assets/stylesheets/application.sass.scss
@@ -15,7 +15,6 @@ $moj-images-path: "/";
@import "_environments";
@import "_search_results";
@import "_support";
-@import "_task_list";
ul.autocomplete__menu {
li {
diff --git a/app/components/task_list/component.html.erb b/app/components/task_list/component.html.erb
deleted file mode 100644
index 6820a071ec..0000000000
--- a/app/components/task_list/component.html.erb
+++ /dev/null
@@ -1,33 +0,0 @@
-
- <% sections.each do |section| %>
- -
- <% if (title = section[:title]).present? %>
-
- <% if sections.count > 1 %>
- <%= section[:number] %>.
- <% end %>
-
- <%= title %>
-
- <% end %>
-
-
- <% section[:items].each do |item| %>
- -
- <% status_id = "#{section[:number]}-#{section[:key]}-#{item[:key]}-status" %>
-
-
- <% if (link = item[:link]).present? %>
- <%= govuk_link_to item[:name], link %>
- <% else %>
- <%= item[:name] %>
- <% end %>
-
-
- <%= render(StatusTag::Component.new(item[:status], id: status_id, class_context: "app-task-list")) %>
-
- <% end %>
-
-
- <% end %>
-
diff --git a/app/components/task_list/component.rb b/app/components/task_list/component.rb
deleted file mode 100644
index ac12461ce6..0000000000
--- a/app/components/task_list/component.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-module TaskList
- class Component < ViewComponent::Base
- ##
- # Renders a task list from the following data structure:
- #
- # sections: [
- # {
- # title: "Title",
- # items: [
- # {
- # name: "Do this thing",
- # link: "/do-this-thing",
- # status: "not_started"
- # }
- # ]
- # }
- # ]
-
- def initialize(sections)
- super
- @sections = sections
- end
-
- def sections
- @sections
- .filter { |section| section[:items].present? }
- .each_with_index
- .map do |section, index|
- section.merge(
- number: index + 1,
- key: section[:title]&.parameterize,
- items:
- section[:items].map do |item|
- item.merge(key: item[:name].parameterize)
- end,
- )
- end
- end
- end
-end
diff --git a/app/view_objects/assessor_interface/qualification_requests_view_object.rb b/app/view_objects/assessor_interface/qualification_requests_view_object.rb
index 918632c5d7..34a5a8e335 100644
--- a/app/view_objects/assessor_interface/qualification_requests_view_object.rb
+++ b/app/view_objects/assessor_interface/qualification_requests_view_object.rb
@@ -65,8 +65,8 @@ def check_consent_method_task_item
consent_requests.exists? || qualification_requests.requested.exists?
{
- name: "Check and select consent method",
- link:
+ title: "Check and select consent method",
+ href:
unless cannot_change
[
(
@@ -100,8 +100,8 @@ def generate_consent_document_in_all_qualifications?
def generate_consent_document_task_item
{
- name: "Generate consent document",
- link: [
+ title: "Generate consent document",
+ href: [
:unsigned_consent_document,
:assessor_interface,
application_form,
@@ -133,9 +133,9 @@ def send_consent_document_task_item
all_consents_requested = consent_requests.all?(&:requested?)
{
- name:
+ title:
"Send consent #{"document".pluralize(consent_requests.count)} to applicant",
- link:
+ href:
if all_documents_completed && !all_consents_requested
[
:request,
@@ -162,8 +162,8 @@ def signed_consent_method_task_items(qualification_request)
[
{
- name: "Upload consent document",
- link:
+ title: "Upload consent document",
+ href:
if consent_request.nil?
Rails
.application
@@ -190,8 +190,8 @@ def signed_consent_method_task_items(qualification_request)
send_consent_document_task_item
end,
{
- name: "Record applicant response",
- link:
+ title: "Record applicant response",
+ href:
if consent_request&.requested?
[
:verify,
@@ -239,8 +239,8 @@ def ecctis_task_items(qualification_request)
[
{
- name: "Request Ecctis verification",
- link:
+ title: "Request Ecctis verification",
+ href:
if can_start && !qualification_request.requested?
[
:request,
@@ -260,8 +260,8 @@ def ecctis_task_items(qualification_request)
end,
},
{
- name: "Record Ecctis response",
- link:
+ title: "Record Ecctis response",
+ href:
if qualification_request.requested?
[
:verify,
diff --git a/app/view_objects/teacher_interface/further_information_request_view_object.rb b/app/view_objects/teacher_interface/further_information_request_view_object.rb
index f80d4655a5..d4e01d314f 100644
--- a/app/view_objects/teacher_interface/further_information_request_view_object.rb
+++ b/app/view_objects/teacher_interface/further_information_request_view_object.rb
@@ -15,26 +15,23 @@ def further_information_request
.find(params[:id])
end
- def task_list_sections
- items =
- further_information_request
- .items
- .order(:created_at)
- .map do |item|
- {
- name: item_name(item),
- link: [
- :edit,
- :teacher_interface,
- :application_form,
- further_information_request,
- item,
- ],
- status: item.status,
- }
- end
-
- [{ title: "Further information requested", items: }]
+ def task_list_items
+ further_information_request
+ .items
+ .order(:created_at)
+ .map do |item|
+ {
+ title: item_name(item),
+ href: [
+ :edit,
+ :teacher_interface,
+ :application_form,
+ further_information_request,
+ item,
+ ],
+ status: item.status,
+ }
+ end
end
def can_check_answers?
diff --git a/app/views/assessor_interface/application_forms/show.html.erb b/app/views/assessor_interface/application_forms/show.html.erb
index e9b268d84f..8dd236bd2e 100644
--- a/app/views/assessor_interface/application_forms/show.html.erb
+++ b/app/views/assessor_interface/application_forms/show.html.erb
@@ -30,4 +30,14 @@
Task list
-<%= render(TaskList::Component.new(@view_object.task_list_sections)) %>
+<% @view_object.task_list_sections.each do |section| %>
+ <% if (items = section[:items]).present? %>
+ <%= section[:title] %>
+
+ <%= govuk_task_list(id_prefix: section[:title].parameterize) do |task_list|
+ items.each do |item|
+ task_list.with_item(title: item[:name], href: item[:link], status: render(StatusTag::Component.new(item[:status])))
+ end
+ end %>
+ <% end %>
+<% end %>
diff --git a/app/views/assessor_interface/assessments/review.html.erb b/app/views/assessor_interface/assessments/review.html.erb
index 16925e2414..482c1482d0 100644
--- a/app/views/assessor_interface/assessments/review.html.erb
+++ b/app/views/assessor_interface/assessments/review.html.erb
@@ -12,55 +12,49 @@
<% if @professional_standing_request.present? %>
LoPS
- <%= render(TaskList::Component.new([{
- indentation: false,
- items: [
- {
- name: region_teaching_authority_name(@application_form.region, context: :assessor).upcase_first,
- link: [:review, :assessor_interface, @application_form, @assessment, :professional_standing_request],
- status: @professional_standing_request.review_status,
- }
- ],
- }])) %>
+ <%= govuk_task_list(id_prefix: "lops") do |task_list|
+ task_list.with_item(
+ title: region_teaching_authority_name(@application_form.region, context: :assessor).upcase_first,
+ href: [:review, :assessor_interface, @application_form, @assessment, :professional_standing_request],
+ status: render(StatusTag::Component.new(@professional_standing_request.review_status)),
+ )
+ end %>
<% end %>
-
<% if @consent_requests.present? || @qualification_requests.present? %>
Qualifications
- <%= render(TaskList::Component.new([{
- indentation: false,
- items: @consent_requests.map do |consent_request|
- {
- name: qualification_title(consent_request.qualification),
- link: [:review, :assessor_interface, @application_form, @assessment, consent_request],
- status: consent_request.review_status,
- }
- end + @qualification_requests.map do |qualification_request|
- {
- name: qualification_title(qualification_request.qualification),
- link: [:review, :assessor_interface, @application_form, @assessment, qualification_request],
- status: qualification_request.review_status,
- }
- end
- }])) %>
+ <%= govuk_task_list(id_prefix: "qualifications") do |task_list|
+ @consent_requests.each do |consent_request|
+ task_list.with_item(
+ title: qualification_title(consent_request.qualification),
+ href: [:review, :assessor_interface, @application_form, @assessment, consent_request],
+ status: render(StatusTag::Component.new(consent_request.review_status)),
+ )
+ end
+
+ @qualification_requests.each do |qualification_request|
+ task_list.with_item(
+ title: qualification_title(qualification_request.qualification),
+ href: [:review, :assessor_interface, @application_form, @assessment, qualification_request],
+ status: render(StatusTag::Component.new(qualification_request.review_status)),
+ )
+ end
+ end %>
<% end %>
<% if @reference_requests.present? %>
References
- <%= render(TaskList::Component.new([{
- indentation: false,
- items: @reference_requests.map do |reference_request|
- {
- name: work_history_name(reference_request.work_history),
- link: [:review, :assessor_interface, @application_form, @assessment, reference_request],
- status: reference_request.review_status,
- }
- end
- }])) %>
+ <%= govuk_task_list(id_prefix: "references") do |task_list|
+ @reference_requests.each do |reference_request|
+ task_list.with_item(
+ title: work_history_name(reference_request.work_history),
+ href: [:review, :assessor_interface, @application_form, @assessment, reference_request],
+ status: render(StatusTag::Component.new(reference_request.review_status)),
+ )
+ end
+ end %>
<% end %>
-
- <%= govuk_button_link_to "Back to overview", [:assessor_interface, @application_form] %>
-
+<%= govuk_button_link_to "Back to overview", [:assessor_interface, @application_form] %>
diff --git a/app/views/assessor_interface/professional_standing_requests/show.html.erb b/app/views/assessor_interface/professional_standing_requests/show.html.erb
index 77c36b67b8..3dda9ac0d5 100644
--- a/app/views/assessor_interface/professional_standing_requests/show.html.erb
+++ b/app/views/assessor_interface/professional_standing_requests/show.html.erb
@@ -7,40 +7,34 @@
You need to request verification for this application’s LoPS.
-<%= render(TaskList::Component.new(
- [
- {
- indentation: false,
- items: [
- {
- name: "Request LoPS verification",
- link: unless @professional_standing_request.requested?
- [
- :request,
- :assessor_interface,
- @application_form,
- @assessment,
- :professional_standing_request,
- ]
- end,
- status: @professional_standing_request.requested? ? "completed" : "not_started"
- },
- {
- name: "Record LoPS response",
- link: if @professional_standing_request.requested?
- [
- :verify,
- :assessor_interface,
- @application_form,
- @assessment,
- :professional_standing_request
- ]
- end,
- status: @professional_standing_request.status
- }
- ],
- }
- ]
-)) %>
+<%= govuk_task_list do |task_list|
+ task_list.with_item(
+ title: "Request LoPS verification",
+ href: unless @professional_standing_request.requested?
+ [
+ :request,
+ :assessor_interface,
+ @application_form,
+ @assessment,
+ :professional_standing_request,
+ ]
+ end,
+ status: render(StatusTag::Component.new(@professional_standing_request.requested? ? "completed" : "not_started"))
+ )
+
+ task_list.with_item(
+ title: "Record LoPS response",
+ href: if @professional_standing_request.requested?
+ [
+ :verify,
+ :assessor_interface,
+ @application_form,
+ @assessment,
+ :professional_standing_request
+ ]
+ end,
+ status: render(StatusTag::Component.new(@professional_standing_request.status))
+ )
+end %>
<%= govuk_button_link_to "Back to overview", [:assessor_interface, @application_form] %>
diff --git a/app/views/assessor_interface/qualification_requests/index.html.erb b/app/views/assessor_interface/qualification_requests/index.html.erb
index dabdc17c3d..5c9adc8f40 100644
--- a/app/views/assessor_interface/qualification_requests/index.html.erb
+++ b/app/views/assessor_interface/qualification_requests/index.html.erb
@@ -11,12 +11,13 @@
Complete the following tasks:
<% end %>
-<%= render TaskList::Component.new([
- {
- indentation: false,
- items: @view_object.all_task_items
- }
-]) %>
+<%= govuk_task_list do |task_list|
+ @view_object.all_task_items.each do |item|
+ task_list.with_item(
+ title: item[:title], href: item[:href], status: render(StatusTag::Component.new(item[:status]))
+ )
+ end
+end %>
<% if @view_object.show_individual_task_items? %>
Qualification specific
@@ -26,12 +27,13 @@
<% @view_object.qualification_requests.map do |qualification_request| %>
<%= qualification_title(qualification_request.qualification) %>
- <%= render TaskList::Component.new([
- {
- indentation: false,
- items: @view_object.individual_task_items_for(qualification_request:)
- }
- ]) %>
+ <%= govuk_task_list do |task_list|
+ @view_object.individual_task_items_for(qualification_request:).each do |item|
+ task_list.with_item(
+ title: item[:title], href: item[:href], status: render(StatusTag::Component.new(item[:status]))
+ )
+ end
+ end %>
<% end %>
<% end %>
diff --git a/app/views/assessor_interface/reference_requests/index.html.erb b/app/views/assessor_interface/reference_requests/index.html.erb
index ba42090ad2..c6acb62716 100644
--- a/app/views/assessor_interface/reference_requests/index.html.erb
+++ b/app/views/assessor_interface/reference_requests/index.html.erb
@@ -8,18 +8,16 @@
You can review those that have the status RECEIVED.
-<%= render TaskList::Component.new([
- {
- title: "References to verify",
- indentation: false,
- items: @reference_requests.map do |reference_request|
- {
- name: work_history_name_and_duration(reference_request.work_history),
- link: [:verify, :assessor_interface, @application_form, @assessment, reference_request],
- status: reference_request.status
- }
- end
- }
-]) %>
+References to verify
+
+<%= govuk_task_list do |task_list|
+ @reference_requests.each do |reference_request|
+ task_list.with_item(
+ title: work_history_name_and_duration(reference_request.work_history),
+ href: [:verify, :assessor_interface, @application_form, @assessment, reference_request],
+ status: render(StatusTag::Component.new(reference_request.status))
+ )
+ end
+end %>
<%= govuk_button_link_to "Back to overview", [:assessor_interface, @application_form] %>
diff --git a/app/views/teacher_interface/application_forms/show/_draft.html.erb b/app/views/teacher_interface/application_forms/show/_draft.html.erb
index 60b91073db..6925fd0ef2 100644
--- a/app/views/teacher_interface/application_forms/show/_draft.html.erb
+++ b/app/views/teacher_interface/application_forms/show/_draft.html.erb
@@ -47,7 +47,15 @@
<% end %>
-<%= render TaskList::Component.new(view_object.task_list_sections) %>
+<% view_object.task_list_sections.each do |section| %>
+ <%= section[:title] %>
+
+ <%= govuk_task_list(id_prefix: section[:title].parameterize) do |task_list|
+ section[:items].each do |item|
+ task_list.with_item(title: item[:name], href: item[:link], status: render(StatusTag::Component.new(item[:status])))
+ end
+ end %>
+<% end %>
<% if errored_task_list_sections.present? %>
You cannot submit your application until all errors have been fixed.
diff --git a/app/views/teacher_interface/consent_requests/index.html.erb b/app/views/teacher_interface/consent_requests/index.html.erb
index ea06d5a73e..d62898e129 100644
--- a/app/views/teacher_interface/consent_requests/index.html.erb
+++ b/app/views/teacher_interface/consent_requests/index.html.erb
@@ -3,7 +3,15 @@
Consent documents overview
-<%= render(TaskList::Component.new(@view_object.task_list_sections)) %>
+<% @view_object.task_list_sections.each do |section| %>
+ <%= section[:title] %>
+
+ <%= govuk_task_list(id_prefix: section[:title].parameterize) do |task_list|
+ section[:items].each do |item|
+ task_list.with_item(title: item[:name], href: item[:link], status: render(StatusTag::Component.new(item[:status])))
+ end
+ end %>
+<% end %>
<% if @view_object.can_submit? %>
diff --git a/app/views/teacher_interface/further_information_requests/show.html.erb b/app/views/teacher_interface/further_information_requests/show.html.erb
index fb3242a210..fd8cad0baf 100644
--- a/app/views/teacher_interface/further_information_requests/show.html.erb
+++ b/app/views/teacher_interface/further_information_requests/show.html.erb
@@ -3,12 +3,17 @@
Apply for qualified teacher status (QTS)
-<%= render TaskList::Component.new(@view_object.task_list_sections) %>
+
Further information requested
+
+<%= govuk_task_list do |task_list|
+ @view_object.task_list_items.each do |item|
+ task_list.with_item(title: item[:title], href: item[:href], status: render(StatusTag::Component.new(item[:status])))
+ end
+end %>
<% if @view_object.can_check_answers? %>
Once you’ve checked your response on the next screen, you’ll be able to submit it.
- <%= govuk_button_link_to t("teacher_interface.further_information_request.show.check"), edit_teacher_interface_application_form_further_information_request_path(@view_object.further_information_request) %>
+ <%= govuk_button_link_to t("teacher_interface.further_information_request.show.check"), [:edit, :teacher_interface, :application_form, @view_object.further_information_request] %>
<% end %>
-
<%= govuk_button_link_to t("teacher_interface.application_forms.show.draft.save"), destroy_teacher_session_path, secondary: true %>
diff --git a/spec/components/task_list_spec.rb b/spec/components/task_list_spec.rb
deleted file mode 100644
index 66d413b8de..0000000000
--- a/spec/components/task_list_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-require "rails_helper"
-
-RSpec.describe TaskList::Component, type: :component do
- subject(:component) { render_inline(described_class.new(sections)) }
-
- let(:sections) do
- [
- {
- title: "Section A",
- items: [{ name: "Item A", href: "/item-a", status: "not_started" }],
- },
- { title: "Section B", items: [{ name: "Item B", status: "completed" }] },
- ]
- end
-
- it "numbers the section titles" do
- expect(component.text.squish).to include("1. Section A")
- expect(component.text.squish).to include("2. Section B")
- end
-
- it "shows the item statuses" do
- expect(component.text.squish).to include("Item A Not started")
- expect(component.text.squish).to include("Item B Completed")
- end
-end
diff --git a/spec/support/autoload/page_objects/assessor_interface/application.rb b/spec/support/autoload/page_objects/assessor_interface/application.rb
index a8688cbba9..a5df93f8e6 100644
--- a/spec/support/autoload/page_objects/assessor_interface/application.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/application.rb
@@ -10,11 +10,7 @@ class Application < SitePrism::Page
element :add_note_button, ".app-inline-action .govuk-button"
section :summary_list, GovukSummaryList, ".govuk-summary-list"
- section :task_list, TaskList, ".app-task-list"
-
- section :management_tasks, ".app-task-list + .govuk-warning-text" do
- elements :links, ".govuk-link"
- end
+ sections :task_lists, GovukTaskList, ".govuk-task-list"
def name_summary
summary_list.find_row(key: "Name")
@@ -32,64 +28,68 @@ def status_summary
summary_list.find_row(key: "Status")
end
+ def find_task_list_item(name)
+ task_lists.map { |task_list| task_list.find_item(name) }.compact.first
+ end
+
def preliminary_check_task
- task_list.find_item("Preliminary check (qualifications)")
+ find_task_list_item("Preliminary check (qualifications)")
end
def awaiting_professional_standing_task
- task_list.find_item("Awaiting third-party professional standing")
+ find_task_list_item("Awaiting third-party professional standing")
end
def personal_information_task
- task_list.find_item("Check personal information")
+ find_task_list_item("Check personal information")
end
def qualifications_task
- task_list.find_item("Check qualifications")
+ find_task_list_item("Check qualifications")
end
def age_range_subjects_task
- task_list.find_item("Verify age range and subjects")
+ find_task_list_item("Verify age range and subjects")
end
def english_language_proficiency_task
- task_list.find_item("Check English language proficiency")
+ find_task_list_item("Check English language proficiency")
end
def work_history_task
- task_list.find_item("Check work history")
+ find_task_list_item("Check work history")
end
def professional_standing_task
- task_list.find_item("Check professional standing")
+ find_task_list_item("Check professional standing")
end
def review_requested_information_task
- task_list.find_item("Review requested information from applicant")
+ find_task_list_item("Review requested information from applicant")
end
- def verify_qualifications_task
- task_list.find_item("Verify qualifications")
+ def verify_professional_standing_task
+ find_task_list_item("Verify LoPS")
end
- def verify_references_task
- task_list.find_item("Verify references")
+ def verify_qualifications_task
+ find_task_list_item("Verify qualifications")
end
- def verify_professional_standing_task
- task_list.find_item("Verify LoPS")
+ def verify_references_task
+ find_task_list_item("Verify references")
end
def assessment_decision_task
- task_list.find_item("Assessment decision")
+ find_task_list_item("Assessment decision")
end
def review_verifications_task
- task_list.find_item("Review verifications")
+ find_task_list_item("Review verifications")
end
def verification_decision_task
- task_list.find_item("Verification decision")
+ find_task_list_item("Verification decision")
end
end
end
diff --git a/spec/support/autoload/page_objects/assessor_interface/professional_standing_request.rb b/spec/support/autoload/page_objects/assessor_interface/professional_standing_request.rb
index c8c2af925b..84cab78b33 100644
--- a/spec/support/autoload/page_objects/assessor_interface/professional_standing_request.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/professional_standing_request.rb
@@ -6,7 +6,7 @@ class ProfessionalStandingRequest < SitePrism::Page
set_url "/assessor/applications/{reference}/assessments/{assessment_id}" \
"/professional-standing-request"
- section :task_list, TaskList, ".app-task-list"
+ section :task_list, GovukTaskList, ".govuk-task-list"
element :status_tag, ".govuk-tag"
def request_lops_verification_task
diff --git a/spec/support/autoload/page_objects/assessor_interface/qualification_requests.rb b/spec/support/autoload/page_objects/assessor_interface/qualification_requests.rb
index b6052bb67a..a519dfc00c 100644
--- a/spec/support/autoload/page_objects/assessor_interface/qualification_requests.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/qualification_requests.rb
@@ -6,7 +6,7 @@ class QualificationRequests < SitePrism::Page
set_url "/assessor/applications/{reference}/assessments/{assessment_id}" \
"/qualification-requests"
- sections :task_lists, TaskList, ".app-task-list"
+ sections :task_lists, GovukTaskList, ".govuk-task-list"
element :continue_button, ".govuk-button:not(.govuk-button--secondary)"
end
diff --git a/spec/support/autoload/page_objects/assessor_interface/reference_requests.rb b/spec/support/autoload/page_objects/assessor_interface/reference_requests.rb
index 12559cb438..0d72788eea 100644
--- a/spec/support/autoload/page_objects/assessor_interface/reference_requests.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/reference_requests.rb
@@ -6,7 +6,7 @@ class ReferenceRequests < SitePrism::Page
set_url "/assessor/applications/{reference}/assessments/{assessment_id}" \
"/reference-requests"
- section :task_list, TaskList, ".app-task-list"
+ section :task_list, GovukTaskList, ".govuk-task-list"
element :continue_button, ".govuk-button:not(.govuk-button--secondary)"
end
diff --git a/spec/support/autoload/page_objects/assessor_interface/review_verifications.rb b/spec/support/autoload/page_objects/assessor_interface/review_verifications.rb
index a3b6f3b4fe..f0b0c7c24a 100644
--- a/spec/support/autoload/page_objects/assessor_interface/review_verifications.rb
+++ b/spec/support/autoload/page_objects/assessor_interface/review_verifications.rb
@@ -5,7 +5,7 @@ module AssessorInterface
class ReviewVerifications < SitePrism::Page
set_url "/assessor/applications/{reference}/assessments/{assessment_id}/review"
- section :task_list, TaskList, ".app-task-list"
+ section :task_list, GovukTaskList, ".govuk-task-list"
element :back_to_overview_button, ".govuk-button"
end
diff --git a/spec/support/autoload/page_objects/govuk_task_list.rb b/spec/support/autoload/page_objects/govuk_task_list.rb
new file mode 100644
index 0000000000..d18eaa9973
--- /dev/null
+++ b/spec/support/autoload/page_objects/govuk_task_list.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module PageObjects
+ class GovukTaskList < SitePrism::Section
+ sections :items, ".govuk-task-list__item" do
+ section :name_and_hint, ".govuk-task-list__name-and-hint" do
+ element :link, "a"
+ end
+ element :status_tag, ".govuk-tag"
+ end
+
+ def find_item(text)
+ items.find { |item| item.name_and_hint.text == text }
+ end
+
+ def click_item(link_text)
+ find_item(link_text).click
+ end
+ end
+end
diff --git a/spec/support/autoload/page_objects/task_list.rb b/spec/support/autoload/page_objects/task_list.rb
deleted file mode 100644
index 1a342923ca..0000000000
--- a/spec/support/autoload/page_objects/task_list.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-module PageObjects
- class TaskList < SitePrism::Section
- sections :sections, TaskListSection, ".app-task-list > li"
-
- def find_item(text)
- sections.flat_map(&:items).find { |item| item.name.text == text }
- end
-
- def click_item(link_text)
- find_item(link_text).click
- end
- end
-end
diff --git a/spec/support/autoload/page_objects/task_list_item.rb b/spec/support/autoload/page_objects/task_list_item.rb
deleted file mode 100644
index a4ba2c2d8a..0000000000
--- a/spec/support/autoload/page_objects/task_list_item.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-module PageObjects
- class TaskListItem < SitePrism::Section
- element :name, "span"
- element :link, "a"
- element :status_tag, ".govuk-tag"
-
- def_delegator :link, :click
- end
-end
diff --git a/spec/support/autoload/page_objects/task_list_section.rb b/spec/support/autoload/page_objects/task_list_section.rb
deleted file mode 100644
index 08981f2f9f..0000000000
--- a/spec/support/autoload/page_objects/task_list_section.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module PageObjects
- class TaskListSection < SitePrism::Section
- element :heading, "h2"
- sections :items, TaskListItem, ".app-task-list__item"
- end
-end
diff --git a/spec/support/autoload/page_objects/teacher_interface/application.rb b/spec/support/autoload/page_objects/teacher_interface/application.rb
index 5a9469baac..9007708179 100644
--- a/spec/support/autoload/page_objects/teacher_interface/application.rb
+++ b/spec/support/autoload/page_objects/teacher_interface/application.rb
@@ -11,42 +11,46 @@ class Application < SitePrism::Page
element :save_and_sign_out, ".govuk-button.govuk-button--secondary"
element :start_now_button, ".govuk-button:not(.govuk-button--secondary)"
- section :task_list, TaskList, ".app-task-list"
+ sections :task_lists, GovukTaskList, ".govuk-task-list"
+
+ def find_task_list_item(name)
+ task_lists.map { |task_list| task_list.find_item(name) }.compact.first
+ end
def personal_information_task_item
- task_list.find_item("Enter your personal information")
+ find_task_list_item("Enter your personal information")
end
def qualifications_task_item
- task_list.find_item("Add your teaching qualifications")
+ find_task_list_item("Add your teaching qualifications")
end
def age_range_task_item
- task_list.find_item("Enter the age range you can teach")
+ find_task_list_item("Enter the age range you can teach")
end
def subjects_task_item
- task_list.find_item("Enter the subjects you can teach")
+ find_task_list_item("Enter the subjects you can teach")
end
def english_language_task_item
- task_list.find_item("Verify your English language proficiency")
+ find_task_list_item("Verify your English language proficiency")
end
def work_history_task_item
- task_list.find_item("Add your work history")
+ find_task_list_item("Add your work history")
end
def registration_number_task_item
- task_list.find_item("Enter your registration number")
+ find_task_list_item("Enter your registration number")
end
def upload_written_statement_task_item
- task_list.find_item("Upload your written statement")
+ find_task_list_item("Upload your written statement")
end
def provide_written_statement_task_item
- task_list.find_item("Provide your written statement")
+ find_task_list_item("Provide your written statement")
end
end
end
diff --git a/spec/support/autoload/page_objects/teacher_interface/consent_requests.rb b/spec/support/autoload/page_objects/teacher_interface/consent_requests.rb
index 2afb6f9187..ed458887ef 100644
--- a/spec/support/autoload/page_objects/teacher_interface/consent_requests.rb
+++ b/spec/support/autoload/page_objects/teacher_interface/consent_requests.rb
@@ -5,7 +5,7 @@ module TeacherInterface
class ConsentRequests < SitePrism::Page
set_url "/teacher/application/consent-requests"
- section :task_list, TaskList, ".app-task-list"
+ sections :task_lists, GovukTaskList, ".govuk-task-list"
element :check_your_answers_button,
".govuk-button:not(.govuk-button--secondary)"
diff --git a/spec/support/autoload/page_objects/teacher_interface/further_information_requested.rb b/spec/support/autoload/page_objects/teacher_interface/further_information_requested.rb
index d4b445209a..b25f0f48b5 100644
--- a/spec/support/autoload/page_objects/teacher_interface/further_information_requested.rb
+++ b/spec/support/autoload/page_objects/teacher_interface/further_information_requested.rb
@@ -1,10 +1,12 @@
+# frozen_string_literal: true
+
module PageObjects
module TeacherInterface
class FurtherInformationRequested < SitePrism::Page
set_url "/teacher/application/further_information_requests/{request_id}"
element :heading, ".govuk-heading-l"
- section :task_list, TaskList, ".app-task-list"
+ section :task_list, GovukTaskList, ".govuk-task-list"
element :check_your_answers_button,
".govuk-button:not(.govuk-button--secondary)"
diff --git a/spec/system/assessor_interface/checking_submitted_details_spec.rb b/spec/system/assessor_interface/checking_submitted_details_spec.rb
index f1b9277e90..c122afd10c 100644
--- a/spec/system/assessor_interface/checking_submitted_details_spec.rb
+++ b/spec/system/assessor_interface/checking_submitted_details_spec.rb
@@ -256,12 +256,6 @@ def when_i_choose_check_personal_information_yes
assessor_check_personal_information_page.form.continue_button.click
end
- def personal_information_task_item
- assessor_application_page.task_list.tasks.first.items.find do |item|
- item.link.text == "Check personal information"
- end
- end
-
def and_i_see_check_personal_information_completed
expect(
assessor_application_page.personal_information_task.status_tag.text,
diff --git a/spec/system/assessor_interface/pre_assessment_tasks_spec.rb b/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
index 69d67c8e4a..4d3feac57b 100644
--- a/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
+++ b/spec/system/assessor_interface/pre_assessment_tasks_spec.rb
@@ -80,7 +80,7 @@ def and_i_see_a_assessment_not_started_status
end
def and_i_see_an_unstarted_preliminary_check_task
- expect(assessor_application_page.task_list).to have_content(
+ expect(assessor_application_page.task_lists.first).to have_content(
"Preliminary check (qualifications)",
)
expect(assessor_application_page.preliminary_check_task).to have_content(
@@ -154,7 +154,7 @@ def and_the_assessor_is_unassigned
end
def and_i_click_awaiting_professional_standing
- assessor_application_page.awaiting_professional_standing_task.link.click
+ assessor_application_page.awaiting_professional_standing_task.click
end
def when_i_fill_in_the_locate_form
diff --git a/spec/system/assessor_interface/reverse_decision_spec.rb b/spec/system/assessor_interface/reverse_decision_spec.rb
index 65d374cd07..0f2eb6bd33 100644
--- a/spec/system/assessor_interface/reverse_decision_spec.rb
+++ b/spec/system/assessor_interface/reverse_decision_spec.rb
@@ -36,13 +36,13 @@ def given_there_is_an_application_form
end
def and_i_see_the_reverse_decision_link
- expect(assessor_application_page.task_list).to have_content(
+ expect(assessor_application_page.task_lists.last).to have_content(
"Reverse decision",
)
end
def when_i_click_on_reverse_decision
- assessor_application_page.task_list.click_on("Reverse decision")
+ assessor_application_page.task_lists.last.click_on("Reverse decision")
end
def when_i_confirm_the_reversal
diff --git a/spec/system/assessor_interface/reviewing_further_information_spec.rb b/spec/system/assessor_interface/reviewing_further_information_spec.rb
index 771f996c58..ef33aae4d2 100644
--- a/spec/system/assessor_interface/reviewing_further_information_spec.rb
+++ b/spec/system/assessor_interface/reviewing_further_information_spec.rb
@@ -68,7 +68,7 @@ def given_there_is_further_information_received
end
def and_i_click_review_requested_information
- assessor_application_page.review_requested_information_task.link.click
+ assessor_application_page.review_requested_information_task.click
end
def and_i_see_the_check_your_answers_items
diff --git a/spec/system/assessor_interface/reviewing_professional_standing_spec.rb b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
index 806d263b15..ec077d397d 100644
--- a/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
+++ b/spec/system/assessor_interface/reviewing_professional_standing_spec.rb
@@ -105,7 +105,7 @@ def when_i_click_on_assessment_decision
end
def when_i_click_on_lops
- assessor_application_page.task_list.click_item(
+ assessor_review_verifications_page.task_list.click_item(
"Relevant competent authority",
)
end
diff --git a/spec/system/assessor_interface/reviewing_qualifications_spec.rb b/spec/system/assessor_interface/reviewing_qualifications_spec.rb
index 19b62b35f0..0d7636b414 100644
--- a/spec/system/assessor_interface/reviewing_qualifications_spec.rb
+++ b/spec/system/assessor_interface/reviewing_qualifications_spec.rb
@@ -105,7 +105,7 @@ def when_i_click_on_assessment_decision
end
def when_i_click_on_the_qualification
- assessor_application_page.task_list.click_item("BSc Teaching")
+ assessor_review_verifications_page.task_list.click_item("BSc Teaching")
end
def when_i_submit_yes_on_the_review_form
diff --git a/spec/system/assessor_interface/verifying_professional_standing_spec.rb b/spec/system/assessor_interface/verifying_professional_standing_spec.rb
index 63e898f9a2..a8b738ac29 100644
--- a/spec/system/assessor_interface/verifying_professional_standing_spec.rb
+++ b/spec/system/assessor_interface/verifying_professional_standing_spec.rb
@@ -168,7 +168,7 @@ def given_the_professional_standing_request_has_expired
end
def and_i_click_professional_standing_task
- assessor_application_page.verify_professional_standing_task.link.click
+ assessor_application_page.verify_professional_standing_task.click
end
def when_i_click_request_lops_verification
diff --git a/spec/system/assessor_interface/verifying_qualifications_spec.rb b/spec/system/assessor_interface/verifying_qualifications_spec.rb
index b7d3e26e60..e382d3002d 100644
--- a/spec/system/assessor_interface/verifying_qualifications_spec.rb
+++ b/spec/system/assessor_interface/verifying_qualifications_spec.rb
@@ -159,7 +159,7 @@ def given_the_admin_has_requested_the_qualification_requests
end
def and_i_click_the_verify_qualifications_task
- assessor_application_page.verify_qualifications_task.link.click
+ assessor_application_page.verify_qualifications_task.click
end
def and_the_check_and_select_consent_method_task_is_not_started
diff --git a/spec/system/assessor_interface/verifying_references_spec.rb b/spec/system/assessor_interface/verifying_references_spec.rb
index b8f5e80989..969708fa5e 100644
--- a/spec/system/assessor_interface/verifying_references_spec.rb
+++ b/spec/system/assessor_interface/verifying_references_spec.rb
@@ -151,15 +151,17 @@ def and_i_see_a_waiting_on_status
end
def and_i_click_verify_references
- assessor_application_page.verify_references_task.link.click
+ assessor_application_page.verify_references_task.click
end
def and_the_reference_request_status_is(status)
- expect(reference_request_task_item.status_tag.text).to eq(status)
+ expect(
+ assessor_reference_requests_page.task_list.items.first.status_tag.text,
+ ).to eq(status)
end
def when_i_click_on_the_reference_request
- reference_request_task_item.click
+ assessor_reference_requests_page.task_list.items.first.click
end
def and_i_see_the_reference_summary
@@ -251,14 +253,7 @@ def and_i_submit_an_internal_note
def then_i_see_the_reference_request_status_is_accepted
expect(
- assessor_reference_requests_page
- .task_list
- .sections
- .first
- .items
- .first
- .status_tag
- .text,
+ assessor_reference_requests_page.task_list.items.first.status_tag.text,
).to eq("Completed")
end
@@ -268,14 +263,7 @@ def when_i_verify_that_all_references_are_accepted
def then_i_see_the_verify_references_task_is_completed
expect(
- assessor_reference_requests_page
- .task_list
- .sections
- .first
- .items
- .first
- .status_tag
- .text,
+ assessor_application_page.verify_references_task.status_tag.text,
).to eq("Completed")
end
diff --git a/spec/system/assessor_interface/view_application_form_spec.rb b/spec/system/assessor_interface/view_application_form_spec.rb
index e359ed7748..94bb16f1e9 100644
--- a/spec/system/assessor_interface/view_application_form_spec.rb
+++ b/spec/system/assessor_interface/view_application_form_spec.rb
@@ -30,11 +30,11 @@ def then_i_see_the_application
end
def and_i_see_the_assessment_tasks
- expect(assessor_application_page.task_list.sections.count).to eq(1)
+ expect(assessor_application_page.task_lists.count).to eq(1)
section_links =
- assessor_application_page.task_list.sections.first.items.map do |item|
- item.name.text
+ assessor_application_page.task_lists.first.items.map do |item|
+ item.name_and_hint.text
end
expect(section_links).to eq(
diff --git a/spec/system/assessor_interface/withdraw_application_spec.rb b/spec/system/assessor_interface/withdraw_application_spec.rb
index a6a1b1abe0..101fde7867 100644
--- a/spec/system/assessor_interface/withdraw_application_spec.rb
+++ b/spec/system/assessor_interface/withdraw_application_spec.rb
@@ -36,11 +36,13 @@ def given_there_is_an_application_form
end
def and_i_see_the_withdraw_link
- expect(assessor_application_page.task_list).to have_content("Withdraw")
+ expect(assessor_application_page.task_lists.last).to have_content(
+ "Withdraw",
+ )
end
def when_i_click_on_withdraw
- assessor_application_page.task_list.click_on("Withdraw")
+ assessor_application_page.task_lists.last.click_on("Withdraw")
end
def when_i_confirm_the_withdrawal
diff --git a/spec/system/teacher_interface/consent_spec.rb b/spec/system/teacher_interface/consent_spec.rb
index cb00c73468..dc3539898a 100644
--- a/spec/system/teacher_interface/consent_spec.rb
+++ b/spec/system/teacher_interface/consent_spec.rb
@@ -85,15 +85,15 @@ def and_i_see_qualification_consent_sign_out_content
end
def and_i_see_the_download_and_upload_tasks
- task_list = teacher_consent_requests_page.task_list
- expect(task_list.sections.count).to eq(1)
+ task_lists = teacher_consent_requests_page.task_lists
+ expect(task_lists.count).to eq(1)
- task_list_section = task_list.sections.first
- expect(task_list_section.items.count).to eq(2)
+ task_list = task_lists.first
+ expect(task_list.items.count).to eq(2)
end
def when_i_click_the_download_task
- teacher_consent_requests_page.task_list.sections.first.items.first.click
+ teacher_consent_requests_page.task_lists.first.items.first.click
end
def when_i_check_the_downloaded_checkbox
@@ -102,7 +102,7 @@ def when_i_check_the_downloaded_checkbox
end
def when_i_click_the_upload_task
- teacher_consent_requests_page.task_list.sections.first.items.second.click
+ teacher_consent_requests_page.task_lists.first.items.second.click
end
def when_i_upload_a_file
diff --git a/spec/system/teacher_interface/further_information_spec.rb b/spec/system/teacher_interface/further_information_spec.rb
index a80d35314a..7e65bb476d 100644
--- a/spec/system/teacher_interface/further_information_spec.rb
+++ b/spec/system/teacher_interface/further_information_spec.rb
@@ -100,15 +100,15 @@ def and_i_see_the_completed_work_history_contact_list_item
end
def when_i_click_the_text_task_list_item
- text_task_list_item.link.click
+ text_task_list_item.click
end
def when_i_click_the_work_history_contact_task_list_item
- work_history_task_list_item.link.click
+ work_history_task_list_item.click
end
def when_i_click_the_document_task_list_item
- document_task_list_item.link.click
+ document_task_list_item.click
end
def when_i_fill_in_the_response
diff --git a/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb b/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb
index d321fac056..71df688c3d 100644
--- a/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb
+++ b/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb
@@ -28,8 +28,8 @@
is_expected.to eq(
[
{
- name: "Check and select consent method",
- link: [
+ title: "Check and select consent method",
+ href: [
:consent_methods,
:assessor_interface,
application_form,
@@ -49,8 +49,8 @@
is_expected.to eq(
[
{
- name: "Check and select consent method",
- link: [
+ title: "Check and select consent method",
+ href: [
:check_consent_methods,
:assessor_interface,
application_form,
@@ -60,8 +60,8 @@
status: "completed",
},
{
- name: "Generate consent document",
- link: [
+ title: "Generate consent document",
+ href: [
:unsigned_consent_document,
:assessor_interface,
application_form,
@@ -71,13 +71,13 @@
status: "not_started",
},
{
- name: "Request Ecctis verification",
- link: nil,
+ title: "Request Ecctis verification",
+ href: nil,
status: "cannot_start",
},
{
- name: "Record Ecctis response",
- link: nil,
+ title: "Record Ecctis response",
+ href: nil,
status: "cannot_start",
},
],
@@ -122,8 +122,8 @@
is_expected.to eq(
[
{
- name: "Generate consent document",
- link: [
+ title: "Generate consent document",
+ href: [
:unsigned_consent_document,
:assessor_interface,
application_form,
@@ -133,13 +133,13 @@
status: "not_started",
},
{
- name: "Request Ecctis verification",
- link: nil,
+ title: "Request Ecctis verification",
+ href: nil,
status: "cannot_start",
},
{
- name: "Record Ecctis response",
- link: nil,
+ title: "Record Ecctis response",
+ href: nil,
status: "cannot_start",
},
],
@@ -158,8 +158,8 @@
is_expected.to eq(
[
{
- name: "Upload consent document",
- link: [
+ title: "Upload consent document",
+ href: [
:check_upload,
:assessor_interface,
application_form,
@@ -169,23 +169,23 @@
status: "not_started",
},
{
- name: "Send consent document to applicant",
- link: nil,
+ title: "Send consent document to applicant",
+ href: nil,
status: "cannot_start",
},
{
- name: "Record applicant response",
- link: nil,
+ title: "Record applicant response",
+ href: nil,
status: "cannot_start",
},
{
- name: "Request Ecctis verification",
- link: nil,
+ title: "Request Ecctis verification",
+ href: nil,
status: "cannot_start",
},
{
- name: "Record Ecctis response",
- link: nil,
+ title: "Record Ecctis response",
+ href: nil,
status: "cannot_start",
},
],
diff --git a/spec/view_objects/teacher_interface/further_information_request_view_object_spec.rb b/spec/view_objects/teacher_interface/further_information_request_view_object_spec.rb
index 58beecebb9..360c6aec1c 100644
--- a/spec/view_objects/teacher_interface/further_information_request_view_object_spec.rb
+++ b/spec/view_objects/teacher_interface/further_information_request_view_object_spec.rb
@@ -26,8 +26,8 @@
}
end
- describe "#task_list_sections" do
- subject(:task_list_sections) { view_object.task_list_sections }
+ describe "#task_list_items" do
+ subject(:task_list_items) { view_object.task_list_items }
let!(:text_item) do
create(
@@ -46,32 +46,34 @@
end
it do
- is_expected.to include_task_list_item(
- "Further information requested",
- "Tell us more about the subjects you can teach",
- link: [
- :edit,
- :teacher_interface,
- :application_form,
- further_information_request,
- text_item,
- ],
- status: "not_started",
+ is_expected.to include(
+ {
+ title: "Tell us more about the subjects you can teach",
+ href: [
+ :edit,
+ :teacher_interface,
+ :application_form,
+ further_information_request,
+ text_item,
+ ],
+ status: "not_started",
+ },
)
end
it do
- is_expected.to include_task_list_item(
- "Further information requested",
- "Upload your identity document",
- link: [
- :edit,
- :teacher_interface,
- :application_form,
- further_information_request,
- document_item,
- ],
- status: "not_started",
+ is_expected.to include(
+ {
+ title: "Upload your identity document",
+ href: [
+ :edit,
+ :teacher_interface,
+ :application_form,
+ further_information_request,
+ document_item,
+ ],
+ status: "not_started",
+ },
)
end
end