>
- <%= render "govuk_publishing_components/components/title", - context: local_assigns[:context], - margin_top: 0, - title: title %> + <% if local_assigns[:context] %> + <%= local_assigns[:context] %> + <% end %> + <%= render "govuk_publishing_components/components/heading", { + text: title, + font_size: "xl", + margin_bottom: 8, + heading_level: 1, + } %>
diff --git a/app/views/simple_smart_answers/_outcome.html.erb b/app/views/simple_smart_answers/_outcome.html.erb index c95e68ad6c..c6160a2d91 100644 --- a/app/views/simple_smart_answers/_outcome.html.erb +++ b/app/views/simple_smart_answers/_outcome.html.erb @@ -16,13 +16,14 @@ data-module="ga4-auto-tracker" data-ga4-auto="<%= ga4_attributes %>" > - <%= render "govuk_publishing_components/components/title", { - context: content_item.title, + <% if content_item.title %> + <%= content_item.title %> + <% end %> + <%= render "govuk_publishing_components/components/heading", { + text: outcome.title, font_size: "l", margin_bottom: 4, - margin_top: 0, - average_title_length: "long", - title: outcome.title, + heading_level: 1, } %> <% if outcome.body %> diff --git a/spec/system/licence_transaction_spec.rb b/spec/system/licence_transaction_spec.rb index 50587125c8..a66d5fd939 100644 --- a/spec/system/licence_transaction_spec.rb +++ b/spec/system/licence_transaction_spec.rb @@ -48,7 +48,7 @@ expect(page).to have_title("Licence to kill - GOV.UK", exact: true) end within("#content") do - within(".gem-c-title") { expect(page).to have_title("Licence to kill") } + within("h1.gem-c-heading") { expect(page).to have_title("Licence to kill") } within(".postcode-search-form") do expect(page).to have_field("Enter a postcode") expect(page).to have_css("button", text: "Find") diff --git a/spec/system/place_spec.rb b/spec/system/place_spec.rb index 1acbe6159b..a43e707ece 100644 --- a/spec/system/place_spec.rb +++ b/spec/system/place_spec.rb @@ -78,7 +78,7 @@ end within("#content") do - within(".gem-c-title") do + within("h1.gem-c-heading") do expect(page).to have_title("Find a passport interview office") end diff --git a/spec/system/transaction_spec.rb b/spec/system/transaction_spec.rb index 442d29a7c3..89369c75f5 100644 --- a/spec/system/transaction_spec.rb +++ b/spec/system/transaction_spec.rb @@ -43,7 +43,7 @@ end within("#content") do - within(".gem-c-title") { expect(page).to have_title("Carrots") } + within("h1.gem-c-heading") { expect(page).to have_title("Carrots") } within(".article-container") do within("section.intro") do expect(page).to have_selector(".get-started-intro", text: "This is the introduction to carrots") @@ -159,7 +159,7 @@ expect(page.status_code).to eq(200) expect(page).to have_button_as_link("Start now", href: "http://cti-staging.voa.gov.uk/cti/inits.asp") - within(".gem-c-title") do + within("h1.gem-c-heading") do expect(page).to have_title("Check your Council Tax band (staging)") end