@ -22,6 +22,7 @@ export default class extends Controller {
}
},
autoselect: true,
placeholder: 'Start typing to search',
templates: { suggestion: (value) => suggestion(value, options) },
name: rawFieldName,
onConfirm: (val) => {
@ -63,6 +63,10 @@ RSpec.describe "Accessible Autocomplete" do
page.go_back
expect(page).to have_selector("input", class: "autocomplete__input", count: 1)
end
it "displays the placeholder text", js: true do
expect(find("#lettings-log-prevloc-field")["placeholder"]).to eq("Start typing to search")
context "when searching schemes" do