mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-25 19:27:40 -05:00
test that input value is not affected by auto suggest
This commit is contained in:
@@ -16,6 +16,7 @@ jQuery ->
|
||||
el.autocomplete
|
||||
minLength: 1,
|
||||
source: el.attr( 'data-source-url' ),
|
||||
autoFocus: true,
|
||||
focus: ( event, ui ) ->
|
||||
el.val( ui.item.name )
|
||||
id.val( ui.item.id )
|
||||
|
||||
@@ -24,4 +24,13 @@ shared_examples "crop suggest" do |resource|
|
||||
expect(page).to have_selector("input##{resource}_crop_id[value='#{pear.id}']", :visible => false)
|
||||
end
|
||||
|
||||
scenario "Typing and pausing does not affect input" do
|
||||
within "form#new_#{resource}" do
|
||||
fill_autocomplete "crop", :with => "p"
|
||||
end
|
||||
|
||||
expect(page).to have_content("pear")
|
||||
expect(find_field("crop").value).to eq("p")
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user