-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AP-5592: Update scope limits on check provider answers
>[!IMPORTANT] >Set up a feature test for expected current behaviour > >This changes the proceeding_details partial IDs quite heavily to make testing easier. Running first to see if it affects multiple tests
- Loading branch information
1 parent
691ec50
commit 8d16c6f
Showing
5 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,7 @@ | |
.print-no-break>.govuk-body { | ||
word-wrap: break-word; | ||
} | ||
|
||
.single-scope-limit-bold-heading { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,59 @@ | |
Then("the \"Partner details\" check your answers section should contain:") do |table| | ||
expect_questions_and_answers_in(selector: "#partner-details-questions", expected: table) | ||
end | ||
|
||
Given(/^I have created an application with (.*) proceedings (with|without) delegated functions$/) do |proceedings, df| | ||
proceeding_array = proceedings.split(",").map(&:to_sym) | ||
df_options = df == "with" ? proceeding_array.map { |p| { p.upcase => [10.days.ago, 10.days.ago] } }[0] : {} | ||
applicant = create( | ||
:applicant, | ||
first_name: "Test", | ||
last_name: "Test", | ||
national_insurance_number: "JA123456A", | ||
date_of_birth: "01-01-1970", | ||
email: "[email protected]", | ||
has_partner: false, | ||
) | ||
create( | ||
:address, | ||
address_line_one: "Transport For London", | ||
address_line_two: "98 Petty France", | ||
city: "London", | ||
postcode: "SW1H 9EA", | ||
lookup_used: true, | ||
applicant:, | ||
) | ||
@legal_aid_application = create( | ||
:legal_aid_application, | ||
:with_non_passported_state_machine, | ||
:at_entering_applicant_details, | ||
:with_proceedings, | ||
:with_delegated_functions_on_proceedings, | ||
explicit_proceedings: proceeding_array, | ||
set_lead_proceeding: proceeding_array.first, | ||
df_options:, | ||
applicant:, | ||
) | ||
login_as @legal_aid_application.provider | ||
end | ||
|
||
And("I view the check provider answers page") do | ||
visit(providers_legal_aid_application_check_provider_answers_path(@legal_aid_application)) | ||
steps %(Then I should be on a page showing 'Check your answers') | ||
end | ||
|
||
Then("the {string} proceeding check your answers section should contain:") do |proceeding_code, table| | ||
expect_questions_and_answers_in(selector: "##{proceeding_code}-questions", expected: table) | ||
end | ||
|
||
Then(/^the (emergency|substantive) scope limitation (.*) heading for (.*) should (be|not be) bold$/) do |type, text, proceeding_code, match| | ||
within("##{proceeding_code}-questions") do | ||
within("#app-check-your-answers__#{proceeding_code}_#{type}_scope_limitations") do | ||
if match == "be" | ||
expect(page).to have_css("span.single-scope-limit-heading", text:, visible: :visible) | ||
else | ||
expect(page).to have_no_css("span.single-scope-limit-heading", text:) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters