From 41079d9c8d79d3ee35fa862cf26e0cad94269d3c Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Fri, 13 Oct 2023 11:30:37 +0100 Subject: [PATCH] Content changes, rubocop and formatting --- app/helpers/ukims_helper.rb | 17 ++++++++++++++--- app/views/steps/trader_scheme/show.html.erb | 2 ++ spec/helpers/ukims_helper_spec.rb | 18 +++++++++++++++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/app/helpers/ukims_helper.rb b/app/helpers/ukims_helper.rb index a67c4a88..c1883f53 100644 --- a/app/helpers/ukims_helper.rb +++ b/app/helpers/ukims_helper.rb @@ -12,7 +12,7 @@ def market_scheme_type def trader_scheme_header if after_cut_off_date? - 'Are you authorised under the UK Internal Market Scheme - Online Tariff Duty calculator' + 'Are you authorised under the UK Internal Market Scheme' else 'Were you authorised under the UK Trader Scheme (UKTS) or the UK Internal Market Scheme (UKIMS)' end @@ -22,8 +22,19 @@ def trader_scheme_body if after_cut_off_date? "If you are moving goods into Northern Ireland which are for sale to, or final use by, end consumers located in the UK and you are authorised under the UK Internal Market Scheme, then you may declare your goods as being 'not at risk' where the requirements are met. A 'not at risk' good entering Northern Ireland from Great Britain will not be subject to duty." else - "If you were moving goods into Northern Ireland which are for sale to, or final use by, end consumers located in the UK and you were authorised under the UK Trader Scheme or the UK Internal Market Scheme, then you may declare your goods as being 'not at risk' where the requirements are met. A 'not at risk' good entering Northern Ireland from Great Britain will not be subject to duty. - Please note that UK Internal Market scheme trades cannot benefit from expanded processing rules before 30 September 2023. Trades before this date will use the UK Trader Scheme rules on processing" + "If you were moving goods into Northern Ireland which are for sale to, or final use by, end consumers located in the UK and you were authorised under the UK Trader Scheme or the UK Internal Market Scheme, then you may declare your goods as being 'not at risk' where the requirements are met. A 'not at risk' good entering Northern Ireland from Great Britain will not be subject to duty." + end + end + + def internal_market_scheme_note + if after_cut_off_date? + '' + else + < + Please note that UK Internal Market scheme trades cannot benefit from expanded processing rules before 30 September 2023. Trades before this date will use the UK Trader Scheme rules on processing +

+NOTE end end diff --git a/app/views/steps/trader_scheme/show.html.erb b/app/views/steps/trader_scheme/show.html.erb index a252e1f5..10c704e1 100644 --- a/app/views/steps/trader_scheme/show.html.erb +++ b/app/views/steps/trader_scheme/show.html.erb @@ -7,6 +7,8 @@ <%= f.govuk_collection_radio_buttons :trader_scheme, @step.options, :id, :name, legend: { text: "#{trader_scheme_header}?", size: 'xl', tag: 'h1' }, hint: { text: "#{trader_scheme_body}" }, include_hidden: true %> + <%= internal_market_scheme_note.html_safe %> + <%= f.govuk_submit %> <% end %> diff --git a/spec/helpers/ukims_helper_spec.rb b/spec/helpers/ukims_helper_spec.rb index a1d118af..92fdb63d 100644 --- a/spec/helpers/ukims_helper_spec.rb +++ b/spec/helpers/ukims_helper_spec.rb @@ -32,7 +32,7 @@ describe '#trader_scheme_header' do context 'when the import date is after the cut off' do it 'returns the corect string when the import_date is after cut off date' do - expect(helper.trader_scheme_header).to eq('Are you authorised under the UK Internal Market Scheme - Online Tariff Duty calculator') + expect(helper.trader_scheme_header).to eq('Are you authorised under the UK Internal Market Scheme') end end @@ -61,6 +61,22 @@ end end + describe '#internal_market_scheme_note' do + context 'when the import date is after the cut off' do + it 'returns the corect string when the import_date is after cut off date' do + expect(helper.internal_market_scheme_note).to eq('') + end + end + + context 'when the import date is before the cut off' do + let(:import_date) { Date.new(2023, 9, 29).strftime('%Y-%m-%d') } + + it 'returns the corect string when the import_date is after cut off date' do + expect(helper.internal_market_scheme_note).to include('cannot benefit from expanded processing rules before 30 September 2023') + end + end + end + describe '#trader_scheme_bullet_point_true' do context 'when the import date is after the cut off' do it 'returns the corect string when the import_date is after cut off date' do