mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-11 01:05:01 -04:00
poltergeist work around not needed anymore
This commit is contained in:
@@ -43,10 +43,10 @@ describe "Alternate names", js: true do
|
||||
it "Crop wranglers can delete alternate names" do
|
||||
visit crop_path(alternate_eggplant.crop)
|
||||
click_link 'aubergine'
|
||||
expect(page).to have_link "Delete",
|
||||
href: alternate_name_path(alternate_eggplant)
|
||||
within('.alternate_names') { click_on "Delete" }
|
||||
dismiss_confirm {click_link 'OK'}
|
||||
expect(page).to have_link "Delete", href: alternate_name_path(alternate_eggplant)
|
||||
accept_confirm do
|
||||
click_link 'Delete'
|
||||
end
|
||||
expect(pending_alt_name.status_code).to equal 200
|
||||
expect(page).not_to have_content alternate_eggplant.name
|
||||
expect(page).to have_content 'Alternate name was successfully deleted'
|
||||
|
||||
@@ -207,11 +207,7 @@ describe "Planting a crop", :js, :elasticsearch do
|
||||
fill_in "When?", with: "2014-07-01"
|
||||
check "Mark as finished"
|
||||
fill_in "Finished date", with: "2014-08-30"
|
||||
|
||||
# Trigger click instead of using Capybara"s uncheck
|
||||
# because a date selection widget is overlapping
|
||||
# the checkbox preventing interaction.
|
||||
find("#planting_finished").trigger 'click'
|
||||
uncheck 'Mark as finished'
|
||||
end
|
||||
|
||||
# Javascript removes the finished at date when the
|
||||
@@ -219,7 +215,7 @@ describe "Planting a crop", :js, :elasticsearch do
|
||||
expect(find("#planting_finished_at").value).to eq("")
|
||||
|
||||
within "form#new_planting" do
|
||||
find("#planting_finished").trigger 'click'
|
||||
check 'Mark as finished'
|
||||
end
|
||||
|
||||
# The finished at date was cached in Javascript in
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
module FeatureHelpers
|
||||
def fill_autocomplete(field, options = {})
|
||||
Crop.reindex if ENV["GROWSTUFF_ELASTICSEARCH"] == "true"
|
||||
|
||||
fill_in field, with: options[:with]
|
||||
|
||||
# Not needed if using a real browser headless instead of poltergeist
|
||||
# page.execute_script " $('##{field}').trigger('focus'); "
|
||||
# page.execute_script " $('##{field}').trigger('keydown'); "
|
||||
end
|
||||
|
||||
def select_from_autocomplete(select)
|
||||
|
||||
Reference in New Issue
Block a user