Skip to content

Commit

Permalink
RUBY 3081 wcr unblock northern ireland location continue journey (#1535)
Browse files Browse the repository at this point in the history
* [RUBY-3081] Remove MustRegisterInNorthernIrelandForm and replace with RegisterInNorthernIrelandForm

- Delete MustRegisterInNorthernIrelandFormsController and associated views, specs, and locales
- Rename state and transitions in workflow from must_register_in_northern_ireland_form to register_in_northern_ireland_form
- Update Analytics::UserJourney to remove must_register_in_northern_ireland_form from COMPLETION_PAGES
- Modify locales for register_in_northern

* [RUBY-3081] Add transition from NI registration to business type form and update content on NI registration page

* [RUBY-3081] Update contact instruction in NI registration form localization
  • Loading branch information
jjromeo committed May 8, 2024
1 parent 999c3e0 commit 576d9e9
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 95 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module CanUseNewRegistrationWorkflow

# Location
state :location_form
state :must_register_in_northern_ireland_form
state :register_in_northern_ireland_form
state :must_register_in_scotland_form
state :must_register_in_wales_form

Expand Down Expand Up @@ -84,7 +84,7 @@ module CanUseNewRegistrationWorkflow
transitions from: :start_form, to: :renewal_stop_form

# Location
transitions from: :location_form, to: :must_register_in_northern_ireland_form,
transitions from: :location_form, to: :register_in_northern_ireland_form,
if: :should_register_in_northern_ireland?

transitions from: :location_form, to: :must_register_in_scotland_form,
Expand All @@ -98,6 +98,8 @@ module CanUseNewRegistrationWorkflow

transitions from: :location_form, to: :business_type_form

transitions from: :register_in_northern_ireland_form, to: :business_type_form

# Business type
transitions from: :business_type_form, to: :your_tier_form,
if: :switch_to_lower_tier_based_on_business_type?,
Expand Down
1 change: 0 additions & 1 deletion app/models/waste_carriers_engine/analytics/user_journey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class UserJourney
COMPLETION_PAGES = %w[
copy_cards_order_completed_form
edit_complete_form
must_register_in_northern_ireland_form
must_register_in_scotland_form
must_register_in_wales_form
registration_completed_form
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@
<%= form_for(@register_in_northern_ireland_form) do |f| %>
<legend class="govuk-visually-hidden"><%= t(".heading") %></legend>
<h1 class="govuk-heading-l"><%= t(".heading") %></h1>
<p class="govuk-body"><%= t(".paragraph_1") %></p>
<p class="govuk-body"><%= t(".paragraph_2") %> <a href="https://www.daera-ni.gov.uk/articles/registration-carriers-and-brokers"><%= t(".service_link") %></a>.</p>
<p class="govuk-body"><%= t(".paragraph_1_1") %>
<a href="https://www.daera-ni.gov.uk/articles/registration-carriers-and-brokers">
<%= t(".service_link") %>
</a>
&nbsp; <%= t(".paragraph_1_2") %>
</p>
<p class="govuk-body"><%= t(".paragraph_2") %> </p>
<p class="govuk-body"><%= t(".paragraph_3") %></p>
<%= f.govuk_submit t(".next_button") %>
<p class="govuk-body"><%= t(".contact_ea") %></p>
<% end %>
</div>
</div>

This file was deleted.

16 changes: 9 additions & 7 deletions config/locales/forms/register_in_northern_ireland_forms/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ en:
waste_carriers_engine:
register_in_northern_ireland_forms:
new:
title: You can register in Northern Ireland
heading: You can register in Northern Ireland
paragraph_1: You can continue to renew in England, but you are encouraged to register with the appropriate authority for your region. This allows customers to verify that you’re a registered waste carrier.
paragraph_2: In Northern Ireland, you need to register with the Northern Ireland Environment Agency (NIEA). For details on how, visit
service_link: Register or renew as a waste carrier, broker or dealer (Northern Ireland)
paragraph_3: If you have any questions about this, please contact our helpline on 03708 506 506.
next_button: Continue to register in England
title: Register where you carry, broker or deal waste
heading: Register where you carry, broker or deal waste
paragraph_1_1: You must
service_link: register with the Northern Ireland Environment Agency (NIEA)
paragraph_1_2: if you carry, broker or deal waste in Northern Ireland (NI).
paragraph_2: You must register with the Environment Agency (EA) if you also carry, broker or deal waste in England.
paragraph_3: Select continue to register with the Environment Agency in England.
next_button: Continue
contact_ea: Contact the Environment Agency on 03708 506 506 if you have questions or need help to register.
activemodel:
errors:
models:
Expand Down
5 changes: 0 additions & 5 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@
path: "location",
path_names: { new: "" }

resources :must_register_in_northern_ireland_forms,
only: %i[new create],
path: "must-register-in-northern-ireland",
path_names: { new: "" }

resources :register_in_northern_ireland_forms,
only: %i[new create],
path: "register-in-northern-ireland",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module WasteCarriersEngine
context "when the location is northern_ireland" do
let(:location) { "northern_ireland" }

include_examples "has next transition", next_state: "must_register_in_northern_ireland_form"
include_examples "has next transition", next_state: "register_in_northern_ireland_form"
end

context "when the location is scotland" do
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ module Analytics
%w[
edit_complete_form
copy_cards_order_completed_form
must_register_in_northern_ireland_form
must_register_in_scotland_form
must_register_in_wales_form
registration_completed_form
Expand Down

0 comments on commit 576d9e9

Please sign in to comment.