Skip to content

Commit cf6179a

Browse files
authored
[NUOPEN-235] Autocoplete username on estimates edit screen (#5345)
* Autocoplete username on estimates edit screen * Fix comment
1 parent 57bf14e commit cf6179a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/views/facility_estimates/_form.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
= f.label :custom_name, Estimate.human_attribute_name(:user)
1414
= f.input_field :custom_name,
1515
class: "js--user-autocomplete",
16+
value: (@estimate.user_display_name),
1617
data: { search_url: search_facility_estimates_path, user_input_id: "estimate_user_id" }
1718
= f.hidden_field :user_id
1819

spec/system/admin/editing_an_estimate_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
click_link "Edit"
8686
expect(page).to have_content "Edit Estimate"
8787

88+
user_input = find_field("User")
89+
expect(user_input.value).to eq user.full_name
90+
8891
fill_in "User", with: "Custom Name"
8992

9093
click_button "Update"

0 commit comments

Comments
 (0)