Skip to content

Commit

Permalink
Create herbarium_form_system_test.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 20, 2024
1 parent de1c951 commit 7dc5d0b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/system/herbarium_form_system_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# frozen_string_literal: true

require("application_system_test_case")

class HerbariumFormSystemTest < ApplicationSystemTestCase
def test_format_new_location_name
# browser = page.driver.browser
rolf = users("rolf")
login!(rolf)

visit("/locations/new")
assert_selector("body.locations__new")

assert_selector("#location_display_name")
assert_button(:form_locations_find_on_map.l)
# be sure the map is loaded!
assert_selector("#map_div div div")
fill_in("location_display_name", with: "genohlac gard france")
click_button(:form_locations_find_on_map.l)

assert_selector("#location_display_name.geocoded")
assert_field("location_display_name",
with: "Génolhac, Gard, Occitanie, France")

assert_field("location_north", with: "44.3726")
assert_field("location_east", with: "3.985")
assert_field("location_south", with: "44.3055")
assert_field("location_west", with: "3.9113")
assert_field("location_high", with: "1388.2098")
assert_field("location_low", with: "287.8201")
end
end

0 comments on commit 7dc5d0b

Please sign in to comment.