-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only display list of application types of the same type when updating
- Loading branch information
1 parent
234447a
commit 9164bd7
Showing
4 changed files
with
42 additions
and
6 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
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 |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
travel_to(DateTime.new(2023, 1, 1)) | ||
sign_in(assessor) | ||
create(:application_type, :prior_approval) | ||
create(:application_type, :ldc_existing) | ||
visit "/planning_applications/#{planning_application.reference}" | ||
end | ||
|
||
|
@@ -41,7 +42,7 @@ | |
|
||
expect(page).to have_content("An applicant or agent email is required.") | ||
|
||
select("Prior Approval - Larger extension to a house") | ||
select("Lawful Development Certificate - Existing use") | ||
|
||
within(find(:fieldset, text: "Agent information")) do | ||
fill_in("Email address", with: "[email protected]") | ||
|
@@ -69,8 +70,8 @@ | |
find("span", text: "Application information") | ||
click_link("Edit details") | ||
|
||
expect(page).to have_content("Application number: 23-00100-PA1A") | ||
expect(page).to have_select("planning-application-application-type-id-field", selected: "Prior Approval - Larger extension to a house") | ||
expect(page).to have_content("Application number: 23-00100-LDCE (Previously: 23-00100-LDCP)") | ||
expect(page).to have_select("planning-application-application-type-id-field", selected: "Lawful Development Certificate - Existing use") | ||
fill_in("Address 1", with: "125 High Street") | ||
click_button("Save") | ||
planning_application.reload | ||
|
@@ -88,7 +89,7 @@ | |
within("#audit_#{Audit.find_by(activity_information: "Application type").id}") do | ||
expect(page).to have_content("Application type updated") | ||
expect(page).to have_content( | ||
"Application type changed from: Lawfulness certificate / Changed to: Prior approval, Reference changed from 23-00100-LDCP to 23-00100-PA1A" | ||
"Application type changed from: Lawfulness certificate / Changed to: Lawfulness certificate, Reference changed from 23-00100-LDCP to 23-00100-LDCE" | ||
) | ||
expect(page).to have_content(assessor.name) | ||
expect(page).to have_content(Audit.last.created_at.strftime("%d-%m-%Y %H:%M")) | ||
|