Skip to content

Commit

Permalink
Fix change link on partnership check your answers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored and JamieCleare2525 committed Jul 29, 2024
1 parent cc4e408 commit afaa015
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= t(".title") %>
</label>

<%= render "shared/organisations/organisation_details", organisation: @wizard.partner_organisation, change_link: step_path(:organisation) %>
<%= render "shared/organisations/organisation_details", organisation: @wizard.partner_organisation, change_link: step_path(:partnership) %>
<% if @wizard.partner_organisation.is_a?(School) %>
<h2 class="govuk-heading-m govuk-!-margin-top-9"><%= t(".additional_details") %></h2>
<%= render "shared/schools/additional_details", school: @wizard.partner_organisation %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
then_i_see_an_error("Enter a school name, unique reference number (URN) or postcode")
end

scenario "User reconsiders selecting a school", :js, retry: 3 do
scenario "User reconsiders selecting a school using back link", :js, retry: 3 do
when_i_view_the_partner_schools_page
and_i_click_on("Add partner school")
and_i_enter_a_school_named("School 1")
Expand All @@ -62,6 +62,20 @@
then_i_see_the_check_details_page_for_school("School 1")
end

scenario "User reconsiders selecting a school using change link", :js, retry: 3 do
when_i_view_the_partner_schools_page
and_i_click_on("Add partner school")
and_i_enter_a_school_named("School 1")
then_i_see_a_dropdown_item_for("School 1")
when_i_click_the_dropdown_item_for("School 1")
and_i_click_on("Continue")
then_i_see_the_check_details_page_for_school("School 1")
when_i_click_on("Change")
then_i_see_the_search_input_pre_filled_with("School 1")
and_i_click_on("Continue")
then_i_see_the_check_details_page_for_school("School 1")
end

scenario "User adds a partner school, which is not onboarded on the placements service", :js, retry: 3 do
given_the_school_is_not_onboarded_on_placements_service(school)
when_i_view_the_partner_schools_page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
then_i_see_an_error("Enter a provider name, United Kingdom provider number (UKPRN), unique reference number (URN) or postcode")
end

scenario "User reconsiders selecting a provider", :js, retry: 3 do
scenario "User reconsiders selecting a provider using back link", :js, retry: 3 do
when_i_view_the_partner_providers_page
and_i_click_on("Add partner provider")
and_i_enter_a_provider_named("Provider 1")
Expand All @@ -62,6 +62,20 @@
then_i_see_the_check_details_page_for_provider("Provider 1")
end

scenario "User reconsiders selecting a provider using change link", :js, retry: 3 do
when_i_view_the_partner_providers_page
and_i_click_on("Add partner provider")
and_i_enter_a_provider_named("Provider 1")
then_i_see_a_dropdown_item_for("Provider 1")
when_i_click_the_dropdown_item_for("Provider 1")
and_i_click_on("Continue")
then_i_see_the_check_details_page_for_provider("Provider 1")
when_i_click_on("Change")
then_i_see_the_search_input_pre_filled_with("Provider 1")
and_i_click_on("Continue")
then_i_see_the_check_details_page_for_provider("Provider 1")
end

scenario "User adds a partner provider, which is not onboarded on the placements service", :js, retry: 3 do
given_the_provider_is_not_onboarded_on_placements_service(provider)
when_i_view_the_partner_providers_page
Expand Down

0 comments on commit afaa015

Please sign in to comment.