Browse Source

More robust styles for interuption panel, use smart quotes

pull/372/head
Paul Robert Lloyd 3 years ago committed by baarkerlounger
parent
commit
4089fa7303
  1. 18
      app/webpacker/styles/_panel.scss
  2. 2
      config/locales/en.yml
  3. 2
      spec/features/form/validations_spec.rb
  4. 2
      spec/helpers/interuption_screen_helper_spec.rb

18
app/webpacker/styles/_panel.scss

@ -1,19 +1,9 @@
.app-panel--informational {
background-color: govuk-colour("blue");
color: govuk-colour("white");
text-align: left;
.app-panel__body {
@include govuk-font($size: 19);
margin: 0;
}
}
.app-panel--interruption {
background-color: govuk-colour("blue");
color: govuk-colour("white");
text-align: left;
p,
.govuk-body,
.govuk-label,
.govuk-fieldset__legend,
@ -21,6 +11,10 @@
color: govuk-colour("white");
}
a:not(:focus) {
color: inherit;
}
*:last-child {
margin-bottom: 0;
}
@ -31,4 +25,4 @@
border-color: govuk-colour("black");
background-color: govuk-colour("white");
}
}
}

2
config/locales/en.yml

@ -144,7 +144,7 @@ en:
soft_validations:
net_income:
hint_text: "<p class='govuk-body'>You told us the main tenant's working situation is: <strong>%{ecstat1}</strong></p><p class='govuk-body'>The household income you have entered is <strong>%{earnings}</strong></p>"
hint_text: "<p>You told us the main tenant’s working situation is: <strong>%{ecstat1}</strong></p><p>The household income you have entered is <strong>%{earnings}</strong></p>"
in_soft_min_range:
message: "Net income is lower than expected based on the main tenant’s working situation. Are you sure this is correct?"
in_soft_max_range:

2
spec/features/form/validations_spec.rb

@ -131,7 +131,7 @@ RSpec.describe "validations" do
click_button("Save and continue")
expect(page).to have_current_path("/logs/#{case_log.id}/net-income-value-check")
expect(page).to have_content("Net income is outside the expected range based on the main tenant’s working situation")
expect(page).to have_content("You told us the main tenant's working situation is: Full-time – 30 hours or more")
expect(page).to have_content("You told us the main tenants working situation is: Full-time – 30 hours or more")
expect(page).to have_content("The household income you have entered is £750.00 every week")
choose("case-log-net-income-value-check-0-field", allow_label_click: true)
click_button("Save and continue")

2
spec/helpers/interuption_screen_helper_spec.rb

@ -25,7 +25,7 @@ RSpec.describe InteruptionScreenHelper do
"argument" => %w[ecstat1 earnings],
}
expect(display_informative_text(informative_text, case_log))
.to eq("<p class='govuk-body'>You told us the main tenant's working situation is: <strong>Full-time – 30 hours or more</strong></p><p class='govuk-body'>The household income you have entered is <strong>£750.00 every week</strong></p>")
.to eq("<p>You told us the main tenant’s working situation is: <strong>Full-time – 30 hours or more</strong></p><p>The household income you have entered is <strong>£750.00 every week</strong></p>")
end
end

Loading…
Cancel
Save